urbycoz
New member
- Joined
- Jul 29, 2007
- Messages
- 3
- Programming Experience
- Beginner
I'm new to VB.net, and I'm trying to create make program that draws shapes. The trouble is, I'm using tabs and the shapes appear in the background, rather than within the tab window.
eg.
Public Sub draw_Rectangle(ByVal frm As Windows.Forms.Form)
Dim objGraphics As Graphics
Dim recDrawRectangle As Rectangle
recDrawRectangle = frm.DisplayRectangle
recDrawRectangle.Inflate(-80, -120)
objGraphics = frm.CreateGraphics
objGraphics.Clear(System.Drawing.SystemColors.Control)
objGraphics.DrawRectangle(System.Drawing.Pens.Black, recDrawRectangle)
objGraphics.FillRectangle(System.Drawing.Brushes.Blue, recDrawRectangle)
objGraphics.Dispose()
End Sub
How do I make the shapes appear in the tab window?
eg.
Public Sub draw_Rectangle(ByVal frm As Windows.Forms.Form)
Dim objGraphics As Graphics
Dim recDrawRectangle As Rectangle
recDrawRectangle = frm.DisplayRectangle
recDrawRectangle.Inflate(-80, -120)
objGraphics = frm.CreateGraphics
objGraphics.Clear(System.Drawing.SystemColors.Control)
objGraphics.DrawRectangle(System.Drawing.Pens.Black, recDrawRectangle)
objGraphics.FillRectangle(System.Drawing.Brushes.Blue, recDrawRectangle)
objGraphics.Dispose()
End Sub
How do I make the shapes appear in the tab window?