Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Drawing at design time.
 

Drawing at design time.

Ok what I want is to be able to click in a custom control and place grab handles into the control on click. I want to be able to move those grab handles around and have a black line going in a loop though all the grab handles. I want to be able to hit the black line and create another grab handle and use that grab handle to change the shape of the graphic. 

I want to be able to create polygons at design time. 

Any idea's?

Joe
MigrationUser 1  Wednesday, September 17, 2003 12:38 PM
Check out this <a href="http://windowsforms.net/articles/usingregionmastercontrols.aspx">sample</a> for good information on this.
MigrationUser 1  Thursday, September 18, 2003 10:59 AM
Well I already understood how to use regions to a control or form.

I want to be able to create regions in the control via grabhandles at design time. Though I haven't been able to figure out how to get the control (usercontrol) to respond to click to add a grab handle. I want to be able to draw a line between every grab handle and move the grab handles around. the end result when ran would be a transparent button control in the shape i set in design mode with a click event. That way I can place it over pictures to make hot spots.

any help would be great

Joe
MigrationUser 1  Monday, September 22, 2003 11:05 AM
That sounds like it would be pretty cool.  I *think* that you may be able to approach this strictly through the ControlDesigner.  I'm think the OnPaintAdornments method.  The problem, though, is going to be getting the Designer to respond to a click.  OnMouseEnter, OnMouseLeave, and OnMouseHover are exposed, but no OnMouseDown or OnClick.  I think that you are going to have to resort to overriding WndProc and look for the specific messages that you need.  WM_LBUTTONDOWN (&H201), specifically...
MigrationUser 1  Monday, September 22, 2003 1:56 PM
Do you have any samples you can point me to?  I figured out how to do what you stated above, but it only seems to work at runtime and not at design time.

Thanks for the help.

Joe
MigrationUser 1  Monday, September 22, 2003 3:07 PM

You can use google to search for other answers

Custom Search

More Threads

• Scrolling textbox
• Crazy PrintPreviewDialog not in intellisense
• Designer Problem With Visual Studio 2005
• TabOrder for multiple groupboxes and other container controls
• Adding controls on the fly
• Why does the Visual Studio Designer Serialize Generics (e.g. List<>, SortedDictionary<>, etc.) when used as a property in a custom control
• MaskedTextbox problem when 1st digit enter
• How to integrate webcam function in a form using vb.net
• In VS2005, the Visual Designer keeps rearranging the order and position of Toolstrips.
• Disable tabPage?