469,575 Members | 1,441 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

Control Drawing Issue

I have created a transparent control and I am using to to create drawing objects Inside the transparent objects I have created I am trying to using the draw shapes oval, rectangle etc. An example would be like in word are when you drag an oval onto the screen, the drawing resizes as the control does. The problem I am running into is actually drawing the rectangle. I am attempting to use this code here:

Rect = new Rectangle(this.Bounds.X - 10, (this.Bounds.Y -10), (this.Bounds.Width - 10), (this.Bounds.Height - 10))

I have placed this code in the Resize event. It does draw, however it seems to be reponsive to the bounds of it's container rather then the control itself. What I could like is if someone can help me figure out how to draw a rectangle close to the edges of the custom control and the drawing would resize itself as the control does. Please help!!! If anyone has any examples please email them mi*********@hotmail.com
Nov 15 '05 #1
0 1075

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mevar81 | last post: by
4 posts views Thread by CP Developer | last post: by
reply views Thread by gxl034000 | last post: by
1 post views Thread by Sin Jeong-hun | last post: by
4 posts views Thread by Anni V | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.