![]() |
Click here to advertise with us
|
|
|||||||
| Graphics/GDI+ Graphics discussion for VB.NET applications, Winforms, Web, Compact Framework, etc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I am using the following method to draw graphics onto a form.
Code:
Dim palette As Graphics = Me.CreateGraphics palette.DrawImage(image, x, y) |
|
||||
|
You're supposed to do all your GDI+ drawing on the Paint event, so that every time the form gets repainted your drawing gets redone. If you want to change what's being drawn you simply change the variables that control the drawing and then force a repaint. All the old drawing disappears and the new drawing gets done.
__________________
![]() 2007, 2008, 2009, 2010 Why is my data not saved to my database? | Communicating between multiple forms MSDN: Data Walkthroughs | "How Do I?" Videos My Blog: Custom Events | Dynamic GDI+ Drawing |
|
|||
|
As in........
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) MyBase.OnPaint(e) 'Do you drawing inside here. e.Graphics.DrawImage(Image, x, y) End Sub |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|