|
-
Aug 14th, 2007, 04:01 AM
#1
Thread Starter
Junior Member
Raising and handling custom events
hi
there's this event-observer model that i intend to incorporate in my design. i want to use several instances of my activex control that are waiting for an event to occur, the event being a timer tick in my case. how do i do it? first i'll have to somehow raise a custom event and it would be attached to the timer tick somehow. ok i can do it. in the timer event i would just say raiseevent tick, for example. the next task i don't have a clue about. i'll have to add an event handler in my activex control which, like resize or any other windows event, would perform certain task. any ideas how to go about it? any books, tutorials on this topic anywhere? thanks.
imran.
-
Aug 21st, 2007, 11:41 AM
#2
Re: Raising and handling custom events
 Originally Posted by mr_m_imran
hi
there's this event-observer model that i intend to incorporate in my design. i want to use several instances of my activex control that are waiting for an event to occur, the event being a timer tick in my case. how do i do it? first i'll have to somehow raise a custom event and it would be attached to the timer tick somehow. ok i can do it. in the timer event i would just say raiseevent tick, for example. the next task i don't have a clue about.
In the code for the form on which the control sits, use
Code:
Private Sub <the name of the control>_Tick()
'code to handle the tick event for that control here
End Sub
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
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
|