Computer problems,Computer help
*AX SOFT>>>Programming & Design

Visual Studio 2005: Visual Basic: Cursor position?


I'm having problems obtaining the cursor position. I'm developing a program for Windows Mobile 6 and the end result I want to do is the ability to move something around the screen. A simple 'MouseDown' to get the cursor position and move around a small image.

GetXCursorPos
CStr(Cursor.Position.X)

neither are working for me

I think your problem here is you are not referencing the cursor from the current form. The form you are working with has a cursor property.


Try this:



If Not Me .Cursor.Equals(Cursors.Default) Then
Me .Cursor = New Cursor(Cursor.Current.Handle)
Cursor.Position = New Point(Cursor.Position.X - 50,Cursor.Position.Y - 50)
Cursor.Clip = New Rectangle( Me .Location, Me .Size )
End If

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • HELPP! with this c++ program please("Find & Replace"), have my annual lab test tomm!!?

    I think we need some more information about this problem before we can help you. First, how are you reading in the paragraph of text? Is the user going to enter it, or do you read it from a file...

  • I am lost ...in VB.NET?

    I'm not sure about the version of VB.net because i never bought it but used in my school first of all learn VB which is simialar to basic (or Qbasic) language and different from java the...

  • How to run my newly created program in Visual C++?

    to compile or build: select Build and then Build Solution will compile once it has been built you can run your program from the Debug menu by selecting Start Without Debugging -------- EDIT:...

  • ASP ==>grid views?

    Yes, you can. The DataSource property in .Net 2.0 and up can accept anything with an IEnumerable interface, and it will use your public properties to auto-populate columns. E.g. List<MyBusi...

  • PLEASE HELP me start writing this PROGRAM in JAVA?

    Damn that's a large program. Might I ask what it's for? So, unless you are familiar with event listeners and things that respond to user input using the keyboard, I recommend you plac...

  • Help with a very simple C# code.?

    Bashar Y was almost there :) but it's a little different. In C# it would be: textbox1.Text = this.Width.ToString(); or Height of course, like he said. Make sure you don't forget T...

  • BlueJ (java) help! due today!?

    System.out.println("Does not look easy, may be you can contact a java expert live at website like ...

  • I hate movie maker...?

    Press cntrl-alt-delete and go to task manager.... close everything. Then, open the file. if this does not work, u saved it on a corrupt file or something.

    ...
  •  

    Categories--Copyright/IP Policy--Contact Webmaster