473,472 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

VB code to automate mouse to click a button

19 New Member
Hi

I use VB6.0 as front end...
I want something like,
When my application displays a particular message, It should trigger an event which clicks the button


Say whenever " Hello World " message is displayed, my program should make my mouse pointer to and click the button "GO"

I should be able to use this function at many places


Is there any way to do it???
Aug 17 '07 #1
4 2655
pureenhanoi
175 New Member
Hi

I use VB6.0 as front end...
I want something like,
When my application displays a particular message, It should trigger an event which clicks the button


Say whenever " Hello World " message is displayed, my program should make my mouse pointer to and click the button "GO"

I should be able to use this function at many places


Is there any way to do it???
Private Sub helloWorldMsg()
msgbox "Hello world"
cmdGo_Click()
End Sub
Private Sub cmdGo_Click()
'do anything for click event of cmdGo
End Sub
'anywhere you need show hello world msg
Call helloWorldMsg()
Aug 18 '07 #2
BSB
19 New Member
Private Sub helloWorldMsg()
msgbox "Hello world"
cmdGo_Click()
End Sub
Private Sub cmdGo_Click()
'do anything for click event of cmdGo
End Sub
'anywhere you need show hello world msg
Call helloWorldMsg()
************************************************
thank u lemme check
Aug 20 '07 #3
Killer42
8,435 Recognized Expert Expert
thank u lemme check
I think that's probably the best you'll get unless you want to go into some fairly complex API calls to watch Windows messages and stuff.
Aug 21 '07 #4
pureenhanoi
175 New Member
I think that's probably the best you'll get unless you want to go into some fairly complex API calls to watch Windows messages and stuff.
I dont know how professional BSB is, but say about watch Windows message, it seem to be a complex thing.
Aug 21 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Gina | last post by:
I need to add the cell generation to a templated program. I am using graphics magician, but my problem is with the math. I cannot figure out my cell generations. I do know that I need two...
1
by: Zaidan | last post by:
I am running Excel2000 under WIN98 2nd edition, and I am writing a VBA code (I will consider using javascript if I have to) that does the following, at the user command: 1- Start MS Explorer and...
7
by: Tyron | last post by:
I need to know if the Left Button of the Mouse is clicked in the WM_NCMOUSEMOVE Notification but this Message doesnt contain the Mouse Button States as WM_MOUSEMOVE does. So how can I get them? ...
13
by: James Bond | last post by:
Hello. My 80+ year old father has recently decided to get his first computer. Due to his age (and I suspect lack of playing pong as a child like I did) he lacks the manual dexterity to use a mouse...
25
by: Romanise | last post by:
An LCD monitor with keyboard and mouse capabilities on it, thinnest possible, to hang on rack-door can be a boon for expensive spaces of datawarehouses. Has anyone come across one? Maybe...
2
by: scott_gui | last post by:
I am creating a Windows application: The mouse event <Double-Button-1> has a conflict when the <Button-1> event also has a binding. Double clicks will first perform the single click action. This...
0
by: effone | last post by:
I have two addins installed in my Outlook 2003, both have their specific functionality, I would like to integrate the functionality of both thru global mouse hooks, here is my senerio 1) Lets say...
5
by: Adeel | last post by:
Hi group! I'm trying to learn C# on my own... I'd appreciate it very much if someone can help me out here. I have a basic form without any controls on it... I want to catch mouse clicks (both...
2
by: wpollans | last post by:
Hello, I need to able to write JS that will click on a link with the middle mouse button - so that the link target will open in a new window or tab - using firefox. Or is there a better (more...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.