473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

A question about finding class methods in the Help

usually I'd do: Drawing.Image.FromFile(

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 1364
**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*************@TK2MSFTNGP15.phx.gbl...
| usually I'd do: Drawing.Image.FromFile(
|
| 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**************@TK2MSFTNGP15.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*************@TK2MSFTNGP15.phx.gbl...
| usually I'd do: Drawing.Image.FromFile(
|
| 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.FromFile(

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.FromFile' 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**************@TK2MSFTNGP15.phx.gbl...
|
| "Jay B. Harlow [MVP - Outlook]" <Ja************@tsbradley.net> wrote in
| message news:ON**************@TK2MSFTNGP15.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*************@TK2MSFTNGP15.phx.gbl...
| > | usually I'd do: Drawing.Image.FromFile(
| > |
| > | 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****************@TK2MSFTNGP09.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**************@TK2MSFTNGP15.phx.gbl...
|
| "Jay B. Harlow [MVP - Outlook]" <Ja************@tsbradley.net> wrote in
| message news:ON**************@TK2MSFTNGP15.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*************@TK2MSFTNGP15.phx.gbl...
| > | usually I'd do: Drawing.Image.FromFile(
| > |
| > | 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***************@TK2MSFTNGP15.phx.gbl...
" **Developer**" <RE*************@a-znet.com> schrieb:
usually I'd do: Drawing.Image.FromFile(

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.FromFile' 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
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...
5
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...
12
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...
9
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...
161
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.....
13
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...
3
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...
2
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...
275
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.