Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 2nd, 2008, 10:57 AM
Registered User
 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cursor.Position

Hi,

i'm working on a laser shoot simulation..
I've solved, the parts related to image process but i have a problem about cursor..

When i've detect the laser point i can set it's new position by
Cursor.Position property

Although it moves the cursor in any windows form, it doesn't effect the cursor during the game..

How can i solve this?

 
Old January 2nd, 2008, 11:10 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

'Cursor' is a property of the current form, so setting Cursor.Position should set the cursor's position on the current form.

What do you therefore mean by 'during the game' - how is that different from being on a form?

/- Sam Judson : Wrox Technical Editor -/
 
Old January 2nd, 2008, 11:32 AM
Registered User
 
Join Date: Jan 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by samjudson
What do you therefore mean by 'during the game' - how is that different from being on a form?
if i open any game, full screen mode (half life, virtua cop.. etc) i couldn't move the cursor with my cursor property like any other application.

 
Old January 2nd, 2008, 11:41 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Most of these games completely take over the display, more than likely using DirectX, so I wouldn't expect setting Cursor.Position to work.

This is probably a measure to stop it being very easy to write auto aim bots and hence avoid easy cheating.



/- Sam Judson : Wrox Technical Editor -/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting cursor position from grid view yuenli C# 2005 0 August 6th, 2008 03:48 AM
keyboard cursor position rahesh VB.NET 1 May 8th, 2008 01:27 PM
How to set cursor position in a textbox? zayasv VB.NET 2 April 29th, 2006 07:09 AM
aspx cursor position nutrino ASP.NET 1.0 and 1.1 Basics 6 December 29th, 2005 10:51 AM
position cursor at certain field on user form kliu9 Excel VBA 1 January 21st, 2005 06:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.