![]() |
|
#1
|
|||
|
|||
paint doesn't refreshHello,
Im trying to paint the movement i get from my joystick. I dont have any exceptions and the code flows by the paint line but in the form i only get a line from the initial point (0,0) --(form.width/2, form.height/2) To do the poll from the joystick i have a thread.. it would be the problem? i mean, the refresh is so fast that i can see the change?? While WindowHasFocus = True jst.UpdateStatus() PosicionDesplazamiento = New Point((jst.AxisX * Me.Width) / 65535, (jst.AxisY * Me.Height) / 65535) Console.Out.WriteLine("X " & PosicionDesplazamiento.X & "; Y " & PosicionDesplazamiento.Y) PaintControl() System.Threading.Thread.Sleep(500) Application.DoEvents() End While *************** Private Sub PaintControl(ByVal aGraphics As Drawing.Graphics) Dim grafx As BufferedGraphics mutPintado.WaitOne() try grafx.Graphics.DrawLine(Pens.Red, PosicionDesplazamiento.X, PosicionDesplazamiento.Y, CInt(Me.Width / 2), CInt(Me.Height / 2)) grafx.Render(aGraphics) Finally grafx.Dispose() End Try Finally mutPintado.ReleaseMutex() End Try Thanks in advance for your help. |
|||
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Misunderstanding curses refresh()? | Catus | C++ Forum | 9 | 17-Jun-2008 05:50 |
| CreateDIBitmap won't paint | toolmanx | C++ Forum | 1 | 05-Jan-2008 16:23 |
| auto refresh help exchanged for $$$ | pleasehelpmeout | Computer Programming Advertisements & Offers | 0 | 16-Nov-2007 11:47 |
| Microsoft Paint Simulated Mouse Click | Fromethius | C++ Forum | 1 | 23-Aug-2007 20:03 |
| Paint help | bilbo123 | Java Forum | 1 | 11-Jun-2006 20:57 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The