Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 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 March 6th, 2007, 07:52 PM
Registered User
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mouse and Keyboard Control

Does anybody know how i can move the mouse to a certain coordinate on the screen and tell it to double click? And how can i make my program hit a button(space bar) on the keyboard? (In visual basic 6)

ty, J4r3|)
 
Old March 7th, 2007, 09:38 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

to press the spacebar just use the function sendkeys("{SPACE}") (the key could be wrong I'm doing this by heart)

do you want to move your mouse inside your app. or outside??? outside will be difficult (you don't have mouse control outside your app.), inside just do the double click yourself (for example in any control just call by yourself the doubleclick procedure.)

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
 
Old March 19th, 2007, 04:54 PM
Registered User
 
Join Date: Mar 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this API: mouse_event
URL: http://msdn.microsoft.com/library/de...ouse_event.asp

Best wishes,
BW





Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse wheel control with combo box Coby Excel VBA 0 January 30th, 2008 06:36 PM
How to control mouse and keyboard in C# nhutcmos C# 2005 1 October 1st, 2007 02:18 PM
How to resize a control using mouse at run time in geetha VB How-To 1 November 6th, 2006 03:36 PM
How to control mouse C#??? nhutcmos General .NET 1 June 2nd, 2006 03:42 AM
Mouse-Keyboard Combinations shadowpug VB.NET 2002/2003 Basics 4 February 11th, 2004 06:21 PM





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