sjn78 Posted October 8, 2003 Posted October 8, 2003 Trying to draw a simple line on a form and cannot figure out where I am going wrong. I have done this when I send a doc to print, but the same method isn't working. I have a form with tabpages on it. On one of the tabpages I have a Picture Box where I want the line to be. Dim PSNormal As New Pen(Black, 1) Dim g As Graphics = Me.pb.CreateGraphics g.DrawLine(PSNormal, 5, 50, TabPage5.Width - 5, 50) Also, this is in a function in. Could that be the reason it is not working?? I can create a label on the fly and have it appear, just not the line. Thanks Quote
*Experts* mutant Posted October 8, 2003 *Experts* Posted October 8, 2003 The tabs have the paint event fired everytime you switch back to them. So what probably happens is that when you switch to it everything gets earased because of the paint event. If what Im talking about is not the case please correct me :). Quote
sjn78 Posted October 9, 2003 Author Posted October 9, 2003 I think that is what was happening. I put a picture box on the tab, then on the picture box paint event i drew the lines. This works. Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.