.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 9th, 2003, 12:33 AM
oni9 oni9 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Brisbane, Australia
Posts: 50 oni9 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Question is it possible to "move" mouse cursor ?

Is it possible to change the position of the mouse cursor/pointer?

What I want to do is to place mouse cursor/pointer to a control (button) when certin event occured (form load)

Possible? how?

Reply With Quote
  #2  
Old December 3rd, 2003, 05:55 PM
Nazer Nazer is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 4 Nazer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Nazer Send a message via Yahoo to Nazer
Thumbs up Move mouse Cursor

Hi,
On the form Load event, Paste the following code if button1 is the control where you want to move the mouse cursor

Windows.Forms.Cursor.Position = New System.Drawing.Point(Button1.Location.X + Me.Location.X + 50, Button1.Location.Y + Me.Location.Y + 30)

Nazer Mohideen

Last edited by Nazer : December 3rd, 2003 at 06:02 PM.

Reply With Quote
  #3  
Old December 4th, 2003, 10:39 AM
Watever Watever is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Montreal, Canada
Posts: 486 Watever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 20 sec
Reputation Power: 8
I am just wondering why you are using the Location.X and Y and the +50 +30 ? is it only to center the cursor in the middle of the button or something else ?

cause I don't think it's a necessity, just that the cursor will be at the top left. ??

Reply With Quote
  #4  
Old December 4th, 2003, 12:36 PM
Nazer Nazer is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 4 Nazer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Nazer Send a message via Yahoo to Nazer
Exclamation

Ya it is just to center the cursor

Reply With Quote
  #5  
Old December 4th, 2003, 02:21 PM
Watever Watever is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Montreal, Canada
Posts: 486 Watever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 20 sec
Reputation Power: 8
Quote:
Originally posted by Nazer
Ya it is just to center the cursor


if you really want to center it

Windows.Forms.Cursor.Position = New System.Drawing.Point(Button1.Location.X + (button1.width /2) , Button1.Location.Y + (button1.height /2) )

should work better. You are sure it's always the case.
unless you are using all the time a standart button


btw : thank you for your information
__________________

Reply With Quote
  #6  
Old December 4th, 2003, 05:51 PM
oni9 oni9 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Brisbane, Australia
Posts: 50 oni9 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
thank you very much.

I was trying to change MousePosition, however it is read only.

now I know I should take Cursor.Position...

thanks guys

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > is it possible to "move" mouse cursor ?




Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.


© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 10