|
-
Feb 7th, 2001, 02:55 PM
#1
Thread Starter
Member
is there a way to hook events? so if i have form1 and a module full of subs could is there a way to insert a hook into a form event so that it would call a sub when the event has been raised?
Thanx, for your reply(s)
Zhang Tian Hao
Visual Studio Enterprise 6.0 SP 4
[email protected]
-
Feb 9th, 2001, 02:04 AM
#2
Member
hook events? ...those are two different things, hooks, and events. Hooks are something initiated by YOU. Events, on the other hand, is something initiated by an object, and sent to you.
However, this is what I understand from your explanation:
--- You wanna call a sub/function from one of your modules from an event handler in your form. Yes, thats is perfectly possible. In fact, that is highly recommended 
For example: When the user clicks a form...
'This is on the form
Private Sub Form_Click()
Call NotifyUser
End Sub
'-------------------------------------------
'This is in the module
Public Sub NotifyUser()
Msgbox "hey! you clicked the form!"
End Sub
================================
As for hooks, ....bahh ...tell me if that did not solve your problem.
And please be more specific with your questions.
Programmers dont byte, they just nibble a bit.
-
Feb 9th, 2001, 04:34 PM
#3
Thread Starter
Member
sorry, what i was looking for was the api subclassing function. thank for your help any way. do you know where i could find the message constants by the way?
thanx
Thanx, for your reply(s)
Zhang Tian Hao
Visual Studio Enterprise 6.0 SP 4
[email protected]
-
Feb 10th, 2001, 07:03 AM
#4
Member
yes... I know of a good site. I dont know if this site has a listing of API Functions and constants, but as far as my experience goes, I dont get that info from this one.
For an API Functions Listing:
http://www.allapi.net
--- Download their API-Guide (Explanations and Examples), and their API-Toolshed (An almost complete listing of all API-Functions, replacement for VB`s API Viewer)
--- The website itself has a listing, together with examples, so if you dont wanna download, browse thru the site. I`m not sure whether they have a listing of Constants too... but I think its there somewhere...
For a listing of Windows messages, and their explanations:
http://www.vbAPI.com
For discussions about subclassing forms and windows:
1.> http://www.vbsquare.com/articles/sizegrip/index2.html
2.> http://www.vbsquare.com/articles/subcls/
Good Luck.
Hope that helps.
Programmers dont byte, they just nibble a bit.
-
Feb 10th, 2001, 01:17 PM
#5
Thread Starter
Member
thanx, that waz exactly what i wanted...
Thanx, for your reply(s)
Zhang Tian Hao
Visual Studio Enterprise 6.0 SP 4
[email protected]
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
|