Results 1 to 5 of 5

Thread: API hooks?

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    UK, Bedfordshire
    Posts
    49

    Question

    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]

  2. #2
    Member
    Join Date
    Nov 2000
    Location
    Manila, Philippines
    Posts
    51
    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.

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    UK, Bedfordshire
    Posts
    49
    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]

  4. #4
    Member
    Join Date
    Nov 2000
    Location
    Manila, Philippines
    Posts
    51
    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.

  5. #5

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    UK, Bedfordshire
    Posts
    49

    Smile

    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
  •  



Click Here to Expand Forum to Full Width