|
-
Jun 7th, 2007, 01:42 AM
#1
[RESOLVED] [2005] Missing Public events.
Hi,
Last night I had a problem with a missing Public event in the declarations (method name) of VB 2005.
The picturebox keydown event wasn't in the method name.
After some search found that event and others in the public event list.
Why isn't the keydown, keypress and keyup showing in the method name and are there others who exist, but also not showing in that list.
How can I show all the eevents in the declarations method name.
Wkr,
sparrow1
-
Jun 7th, 2007, 01:48 AM
#2
Re: [2005] Missing Public events.
Your terminology is a bit all over the place. A "method name" is the name of a method. Events are not methods and have nothing to do with methods. I presume you mean "member", not "method". A types members includes its properties, methods, events, etc. I guess you mean you want those events included in the member list displayed by Intellisense.
The PictureBox class inherits the Control class, so it has all the members that any other control does. Those events are hidden from Intellisense though, because a PictureBox cannot receive focus. If a control cannot receive focus then it can't ever receive keyboard input so it can't ever raise those events. There's no point showing members that can never serve a useful purpose so they are hidden.
-
Jun 7th, 2007, 02:08 AM
#3
Re: [2005] Missing Public events.
Hi Jm,
I included a n image so you can see what I mean with the Method Name declarationsbox.
And in that box I didn't found the Keydown event, however I found the keydown event in the Public event list of the picturebox.
Why he isn't showing in the declarationbox?
Wkr,
sparrow1
Last edited by sparrow1; Oct 11th, 2007 at 10:07 AM.
-
Jun 7th, 2007, 03:24 AM
#4
Re: [2005] Missing Public events.
That box is not a method name declarations box. It is a list of events. A method is a procedure or a function. An event is an event.
I have already explained why those events are not listed: they are useless because a control that cannot receive input focus cannot receive keyboard input so it cannot raise keyboard events. There's no point including KeyDown, KeyPress or KeyUp in that event list because there's no point handling them because they can never be raised. If you want to handle them then you can go ahead and write an event handler yourself but what's the point? They will never be raised so your event handlers will never be executed.
-
Jun 7th, 2007, 03:39 AM
#5
Re: [2005] Missing Public events.
Jm,
Thanks for your explanation.
So, There's nothing missing, it was me who missed the basics.
Perhaps you can help me with this also: Is there a book, and I don't mean Visual Basic.Net for beginners or advanced programmers, but a real Language grammar book that I can buy to learn the real basics of this language.
Wkr,
sparrow1
-
Jun 7th, 2007, 03:59 AM
#6
Re: [2005] Missing Public events.
I don't know of one but that certainly doesn't mean they don't exist.
-
Jun 7th, 2007, 04:10 AM
#7
Re: [2005] Missing Public events.
Jm,
Thanks again.
Wkr,
sparrow1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|