novena88
05-11-2006, 09:12 AM
ok so i have to create the back ground of a form and make it a drawing surfaceand the direction for this i dont get....how would this be done? this isnt the main part of the project im just wondering what the code would look like for this....i dont understand where you would put these things...heres the directions so u can get the idea
Visual Basic .NET includes the Graphics class with methods for creating circles, lines, rectangles, and other shapes on a drawing surface. A drawing surface can be the surface of a form or the surface of other objects like buttons. To declare a surface on a particular form or button, use the following format:
Dim FormSurface As Graphics = Me.CreateGraphics
Dim ButtonSurface As Graphics = Me.btn1.CreateGraphics
However, to draw a shape on a drawing surface requires a Pen object. The pen name, pen color, and line thickness are all declared in the same statement, as in the following:
Dim ThinRedPen As New Pen(Color.Red, 1)
Dim ThickBlackPen As New Pen(Color.Black, 5)
To draw a filled shape on a drawing surface requires a Brush object. The brush name and brush color are declared in the same statement, as in the following:
Dim BlueBrush As New SolidBrush(Color.Blue)
the assinments after this...i just cant figure out how to get the drawing surface to work...PLEASE HELP
Visual Basic .NET includes the Graphics class with methods for creating circles, lines, rectangles, and other shapes on a drawing surface. A drawing surface can be the surface of a form or the surface of other objects like buttons. To declare a surface on a particular form or button, use the following format:
Dim FormSurface As Graphics = Me.CreateGraphics
Dim ButtonSurface As Graphics = Me.btn1.CreateGraphics
However, to draw a shape on a drawing surface requires a Pen object. The pen name, pen color, and line thickness are all declared in the same statement, as in the following:
Dim ThinRedPen As New Pen(Color.Red, 1)
Dim ThickBlackPen As New Pen(Color.Black, 5)
To draw a filled shape on a drawing surface requires a Brush object. The brush name and brush color are declared in the same statement, as in the following:
Dim BlueBrush As New SolidBrush(Color.Blue)
the assinments after this...i just cant figure out how to get the drawing surface to work...PLEASE HELP