473,666 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A question about finding class methods in the Help

usually I'd do: Drawing.Image.F romFile(

I noticed I once did without thinking: Drawing.Bitmap. FromFile(

I assumed this worked because Bitmap inherits from Image, but for fun I
thought I'd check the Doc and see what it says for Bitmap.FromFile . I
expected it to say "(inherited from Image)". But I could find no reference
to Bitmap.FromFile anywhere in the help.

There were times when I looked for something and couldn't find it so I'm now
wondering if I'm expecting something that is not there.

Is the help for Bitmap.FromFile someplace in the Docs and I'm missing it?

If I want the complete help on a class do I need to manually examine all the
classes it inherits from?

Thanks
Jan 24 '06 #1
6 1376
**Developer**,
Bitmap.FromFile is not in the help per se, as Bitmap itself does not
directly have a FromFile method, as you point out its inherited from Image.
If Bitmap had Shadowed or Overrode FromFile, then help would have listed it.

What I normally do is look at the "Bitmap Members" page:

http://msdn.microsoft.com/library/de...mbersTopic.asp

It lists all the members of Bitmap, including inherited members. I would see
that Bitmap FromFile is inherited, clicking the link would take me to where
its inherited from...

A lot of times I use the Object Browser to look for classes I may need, once
I find it in Object Browser I then refer to help to get more specifics...

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
" **Developer**" <RE************ *@a-znet.com> wrote in message
news:uy******** *****@TK2MSFTNG P15.phx.gbl...
| usually I'd do: Drawing.Image.F romFile(
|
| I noticed I once did without thinking: Drawing.Bitmap. FromFile(
|
| I assumed this worked because Bitmap inherits from Image, but for fun I
| thought I'd check the Doc and see what it says for Bitmap.FromFile . I
| expected it to say "(inherited from Image)". But I could find no reference
| to Bitmap.FromFile anywhere in the help.
|
| There were times when I looked for something and couldn't find it so I'm
now
| wondering if I'm expecting something that is not there.
|
| Is the help for Bitmap.FromFile someplace in the Docs and I'm missing it?
|
| If I want the complete help on a class do I need to manually examine all
the
| classes it inherits from?
|
|
|
| Thanks
|
|
Jan 24 '06 #2

"Jay B. Harlow [MVP - Outlook]" <Ja************ @tsbradley.net> wrote in
message news:ON******** ******@TK2MSFTN GP15.phx.gbl...
**Developer**,
Bitmap.FromFile is not in the help per se, as Bitmap itself does not
directly have a FromFile method, as you point out its inherited from
Image.
If Bitmap had Shadowed or Overrode FromFile, then help would have listed
it.
Are you saying that if it is inherited but not Shadowed nor Overrode it
would not appear in the help that shows the Bitmap methods?

What I normally do is look at the "Bitmap Members" page:

http://msdn.microsoft.com/library/de...mbersTopic.asp

It lists all the members of Bitmap,
I understood the above to mean it would not show unless it had Shadowed nor
Overrode - if so it would not show here

including inherited members. I would see that Bitmap FromFile is inherited, clicking the link would take me to
where
its inherited from...
But when I look at the site or my equivalent Help I don't see FromFile. You
do?

Thanks

A lot of times I use the Object Browser to look for classes I may need,
once
I find it in Object Browser I then refer to help to get more specifics...

--
Hope this helps
Jay [MVP - Outlook]
.NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
" **Developer**" <RE************ *@a-znet.com> wrote in message
news:uy******** *****@TK2MSFTNG P15.phx.gbl...
| usually I'd do: Drawing.Image.F romFile(
|
| I noticed I once did without thinking: Drawing.Bitmap. FromFile(
|
| I assumed this worked because Bitmap inherits from Image, but for fun I
| thought I'd check the Doc and see what it says for Bitmap.FromFile . I
| expected it to say "(inherited from Image)". But I could find no
reference
| to Bitmap.FromFile anywhere in the help.
|
| There were times when I looked for something and couldn't find it so I'm
now
| wondering if I'm expecting something that is not there.
|
| Is the help for Bitmap.FromFile someplace in the Docs and I'm missing
it?
|
| If I want the complete help on a class do I need to manually examine all
the
| classes it inherits from?
|
|
|
| Thanks
|
|

Jan 24 '06 #3
" **Developer**" <RE************ *@a-znet.com> schrieb:
usually I'd do: Drawing.Image.F romFile(

I noticed I once did without thinking: Drawing.Bitmap. FromFile(

I assumed this worked because Bitmap inherits from Image, but for fun I
thought I'd check the Doc and see what it says for Bitmap.FromFile . I
expected it to say "(inherited from Image)". But I could find no reference
to Bitmap.FromFile anywhere in the help.


In addition to the other replies: Note that 'Image.FromFile ' is a shared
method and thus cannot be overridden in a class derived from 'Image'. I
strongly recommend to use 'Image.FromFile ' instead of 'Bitmap.FromFil e' as
the latter will make the user think that the method's formal return type is
'Bitmap', but instead it's still 'Image' and a cast is necessary when the
resulting reference should be assigned to a variable of type 'Bitmap'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jan 24 '06 #4
| Are you saying that if it is inherited but not Shadowed nor Overrode it
| would not appear in the help that shows the Bitmap methods?
I'm saying if its inherited, it will not show in the Index or Table of
Contents unless its Shadowed or Overrode.

Whether its Shadowed or Overrode or not, it will always show on the Bitmap
members page itself.

| But when I look at the site or my equivalent Help I don't see FromFile.
You
| do?
DOH! Bitmap members won't show it, as its shared! The above is for
instance members.

Although VB allows you to call shared members of base clases, only the base
class has the Shared member. VB quietly changes Bitmap.FromFile to
Image.FromFile in the IL.
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
" **Developer**" <RE************ *@a-znet.com> wrote in message
news:uE******** ******@TK2MSFTN GP15.phx.gbl...
|
| "Jay B. Harlow [MVP - Outlook]" <Ja************ @tsbradley.net> wrote in
| message news:ON******** ******@TK2MSFTN GP15.phx.gbl...
| > **Developer**,
| > Bitmap.FromFile is not in the help per se, as Bitmap itself does not
| > directly have a FromFile method, as you point out its inherited from
| > Image.
| > If Bitmap had Shadowed or Overrode FromFile, then help would have listed
| > it.
|
| Are you saying that if it is inherited but not Shadowed nor Overrode it
| would not appear in the help that shows the Bitmap methods?
|
| >
| > What I normally do is look at the "Bitmap Members" page:
| >
| >
http://msdn.microsoft.com/library/de...mbersTopic.asp
| >
| > It lists all the members of Bitmap,
|
| I understood the above to mean it would not show unless it had Shadowed
nor
| Overrode - if so it would not show here
|
| including inherited members. I would see
| > that Bitmap FromFile is inherited, clicking the link would take me to
| > where
| > its inherited from...
|
| But when I look at the site or my equivalent Help I don't see FromFile.
You
| do?
|
| Thanks
|
| >
| > A lot of times I use the Object Browser to look for classes I may need,
| > once
| > I find it in Object Browser I then refer to help to get more
specifics...
| >
| > --
| > Hope this helps
| > Jay [MVP - Outlook]
| > .NET Application Architect, Enthusiast, & Evangelist
| > T.S. Bradley - http://www.tsbradley.net
| >
| >
| > " **Developer**" <RE************ *@a-znet.com> wrote in message
| > news:uy******** *****@TK2MSFTNG P15.phx.gbl...
| > | usually I'd do: Drawing.Image.F romFile(
| > |
| > | I noticed I once did without thinking: Drawing.Bitmap. FromFile(
| > |
| > | I assumed this worked because Bitmap inherits from Image, but for fun
I
| > | thought I'd check the Doc and see what it says for Bitmap.FromFile . I
| > | expected it to say "(inherited from Image)". But I could find no
| > reference
| > | to Bitmap.FromFile anywhere in the help.
| > |
| > | There were times when I looked for something and couldn't find it so
I'm
| > now
| > | wondering if I'm expecting something that is not there.
| > |
| > | Is the help for Bitmap.FromFile someplace in the Docs and I'm missing
| > it?
| > |
| > | If I want the complete help on a class do I need to manually examine
all
| > the
| > | classes it inherits from?
| > |
| > |
| > |
| > | Thanks
| > |
| > |
| >
| >
|
|
Jan 24 '06 #5
got it, thanks
"Jay B. Harlow [MVP - Outlook]" <Ja************ @tsbradley.net> wrote in
message news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
| Are you saying that if it is inherited but not Shadowed nor Overrode it
| would not appear in the help that shows the Bitmap methods?
I'm saying if its inherited, it will not show in the Index or Table of
Contents unless its Shadowed or Overrode.

Whether its Shadowed or Overrode or not, it will always show on the Bitmap
members page itself.

| But when I look at the site or my equivalent Help I don't see FromFile.
You
| do?
DOH! Bitmap members won't show it, as its shared! The above is for
instance members.

Although VB allows you to call shared members of base clases, only the
base
class has the Shared member. VB quietly changes Bitmap.FromFile to
Image.FromFile in the IL.
--
Hope this helps
Jay [MVP - Outlook]
.NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
" **Developer**" <RE************ *@a-znet.com> wrote in message
news:uE******** ******@TK2MSFTN GP15.phx.gbl...
|
| "Jay B. Harlow [MVP - Outlook]" <Ja************ @tsbradley.net> wrote in
| message news:ON******** ******@TK2MSFTN GP15.phx.gbl...
| > **Developer**,
| > Bitmap.FromFile is not in the help per se, as Bitmap itself does not
| > directly have a FromFile method, as you point out its inherited from
| > Image.
| > If Bitmap had Shadowed or Overrode FromFile, then help would have
listed
| > it.
|
| Are you saying that if it is inherited but not Shadowed nor Overrode it
| would not appear in the help that shows the Bitmap methods?
|
| >
| > What I normally do is look at the "Bitmap Members" page:
| >
| >
http://msdn.microsoft.com/library/de...mbersTopic.asp
| >
| > It lists all the members of Bitmap,
|
| I understood the above to mean it would not show unless it had Shadowed
nor
| Overrode - if so it would not show here
|
| including inherited members. I would see
| > that Bitmap FromFile is inherited, clicking the link would take me to
| > where
| > its inherited from...
|
| But when I look at the site or my equivalent Help I don't see FromFile.
You
| do?
|
| Thanks
|
| >
| > A lot of times I use the Object Browser to look for classes I may
need,
| > once
| > I find it in Object Browser I then refer to help to get more
specifics...
| >
| > --
| > Hope this helps
| > Jay [MVP - Outlook]
| > .NET Application Architect, Enthusiast, & Evangelist
| > T.S. Bradley - http://www.tsbradley.net
| >
| >
| > " **Developer**" <RE************ *@a-znet.com> wrote in message
| > news:uy******** *****@TK2MSFTNG P15.phx.gbl...
| > | usually I'd do: Drawing.Image.F romFile(
| > |
| > | I noticed I once did without thinking: Drawing.Bitmap. FromFile(
| > |
| > | I assumed this worked because Bitmap inherits from Image, but for
fun
I
| > | thought I'd check the Doc and see what it says for Bitmap.FromFile .
I
| > | expected it to say "(inherited from Image)". But I could find no
| > reference
| > | to Bitmap.FromFile anywhere in the help.
| > |
| > | There were times when I looked for something and couldn't find it so
I'm
| > now
| > | wondering if I'm expecting something that is not there.
| > |
| > | Is the help for Bitmap.FromFile someplace in the Docs and I'm
missing
| > it?
| > |
| > | If I want the complete help on a class do I need to manually examine
all
| > the
| > | classes it inherits from?
| > |
| > |
| > |
| > | Thanks
| > |
| > |
| >
| >
|
|

Jan 24 '06 #6

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:%2******** *******@TK2MSFT NGP15.phx.gbl.. .
" **Developer**" <RE************ *@a-znet.com> schrieb:
usually I'd do: Drawing.Image.F romFile(

I noticed I once did without thinking: Drawing.Bitmap. FromFile(

I assumed this worked because Bitmap inherits from Image, but for fun I
thought I'd check the Doc and see what it says for Bitmap.FromFile . I
expected it to say "(inherited from Image)". But I could find no
reference to Bitmap.FromFile anywhere in the help.
In addition to the other replies: Note that 'Image.FromFile ' is a shared
method and thus cannot be overridden in a class derived from 'Image'. I
strongly recommend to use 'Image.FromFile ' instead of 'Bitmap.FromFil e' as

agree, thanks
the latter will make the user think that the method's formal return type
is 'Bitmap', but instead it's still 'Image' and a cast is necessary when
the resulting reference should be assigned to a variable of type 'Bitmap'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jan 24 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

51
6952
by: Noam Raphael | last post by:
Hello, I thought about a new Python feature. Please tell me what you think about it. Say you want to write a base class with some unimplemented methods, that subclasses must implement (or maybe even just declare an interface, with no methods implemented). Right now, you don't really have a way to do it. You can leave the methods with a "pass", or raise a NotImplementedError, but even in the best solution that I know of,
5
3716
by: trint | last post by:
I know that this function IS in this dll that comes with windows xp that allows bidirectional printing (you can search "bidispl.dll" on MSDN). However, I keep getting the same error all day, go to bed, get up, get the same error over and over. PLEASE Help! Here is the code and I'm just trying to get the FIRST function to work and there are three more: IBidiRequest Methods Method - Description SetSchema Sets the bidi schema string....
12
1381
by: Josema | last post by:
Hi, Im starting develop a portal, and i never used interfaces in the past. As any portal will be possible register (add), delete, modify a user. In this portal also will be possible register(add) , delete, modify bussiness... I have a class called user, and another called bussiness... Yesterday i was reading about the using of the interfaces and gives to me an
9
2224
by: Gustaf | last post by:
I'm confused about structured error handling. The following piece of code is a simplification of a class library I'm working on. It works, and it does what I want, but I'm still not convinced that I have been doing it right. I think I overdo it. Please have a look: -- using System; using System.IO;
161
7809
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.. (After reading that
13
3024
by: usenet | last post by:
How and where can one find out about the basics of VB/Access2003 syntax? I am a died in the wool C/C++/Java Linux/Unix programmer and I am finding it difficult to understand the program format for accessing objects, controls, etc. in VB/Access2003. In particular where will I find explanations of:- Actions, Functions, Methods, Properties - I'm understand the
3
2165
by: redefined.horizons | last post by:
I've been reading about Python Classes, and I'm a little confused about how Python stores the state of an object. I was hoping for some help. I realize that you can't create an empty place holder for a member variable of a Python object. It has to be given a value when defined, or set within a method. But what is the difference between an Attribute of a Class, a Descriptor in a Class, and a Property in a Class?
2
1492
by: lcaamano | last post by:
We have a tracing decorator that automatically logs enter/exits to/from functions and methods and it also figures out by itself the function call arguments values and the class or module the function/method is defined on. Finding the name of the class where the method we just entered was defined in is a bit tricky. Here's a snippet of the test code: class Base: @tracelevel(1)
275
12248
by: Astley Le Jasper | last post by:
Sorry for the numpty question ... How do you find the reference name of an object? So if i have this bob = modulename.objectname() how do i find that the name is 'bob'
0
8448
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8783
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8552
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.