Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Event handling in design time mode
 

Event handling in design time mode

Hello.

Can i handle event in my custom control, when it mode - design time?
For example, my control contain Button. Can i handle Button.Click event?

Thanks all, for any help.
MigrationUser 1  Tuesday, March 08, 2005 8:02 AM
yes, if it is clickable (not created on the document surface unlike your custom control).  just like it is executing at runtime.  btw: what kind of handling will you do?
MigrationUser 1  Wednesday, March 09, 2005 12:29 AM
I want to handle click event.

I am developing custom control. This control similar to System.Windows.Forms.Tab. My control contains some pages. Only one page can be displayed at a time. Other pages will be displayed in short-cut mode. I want to handle click event on chort-cut panel. When it occurs short-cut panel will be displayed. 

PROBLEM: i must realize this behavior in design time. But i do not know, how i can handle click event on control in design time...

Thank you. 
MigrationUser 1  Wednesday, March 09, 2005 1:28 AM
your design is vague for me, perhaps you might want to give a better description of the components involved.  But here is the basics

If your custom TabControl has the shortcut panel visible within its bounds, you just have to create a designer class for it.  Override the GetHitTest method and test if the mouse coordinates is within the shortcutpanel bounds utilizing PointToClient method of the control.  If it is within the bounds, return TRUE meaning the mouse events will be forwarded to the underlying control at design time.  If you already have a MouseClick handler attached to the shortcut panel (whatever that is), it will be triggered.  

hope i make some sense, :p.
MigrationUser 1  Thursday, March 10, 2005 8:15 PM
Thank you very much.
I understood this idea. It`s not difficult...
Thank you.
MigrationUser 1  Saturday, March 12, 2005 9:11 AM

You can use google to search for other answers

Custom Search

More Threads

• Help!! Please Help (Timers problem)
• Pasteboard
• can't save collection in disgner
• Integrating Outlook for sending email
• Custom Shaped form question
• Handle delete of a Tab from a TabControl collection, at design time
• Need to do a context Menu on the design surface
• Scrollbar in Control Panel. please help
• properties set in the designer depend on each other
• Hosting .NET 2.0 forms designer.