ThePentiumGuy Posted March 17, 2004 Posted March 17, 2004 hey, in form1_mousemove, how would i accomplish something like "if you moved the mouse DOWN then...etc" "if you moved the mouse UP then...etc" "if you moved the mouse LEFT then...etc" "if you moved the mouse RIGHT then...etc" and upon doing that, how would u be able to tell how MUCH the mouse moved from its original position Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
Administrators PlausiblyDamp Posted March 17, 2004 Administrators Posted March 17, 2004 Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove Static lastX, lastY As Integer If e.X > lastX Then 'moved to right 'difference is e.x-lastx label1.text = e.X - lastX End If 'etc lastX = e.X lastY = e.Y End Sub as a starter should ge tyou going. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
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.