Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Confusing Mouse Click


Reply
 
Thread Tools Display Modes
  #1  
Old 09-22-2004, 09:09 PM
jaredsr05 jaredsr05 is offline
Freshman
 
Join Date: Sep 2004
Posts: 26
Default Confusing Mouse Click


Hello everyone. I'm sure this question has been asked a million times, and I apologize in advance for asking it again. Here's my problem:

A want to be able to click a radio button inside a web page i open on my form. I can set the cursor position to the radio button, but i'm lost from there. I know it is possible to use APIs to simulate a click on objects on your form, but i need to click in a specific place on the webbrowser object. I'm not sure how to do this with the SendInput api. Any ideas?

Thanks
JRob
Reply With Quote
  #2  
Old 09-22-2004, 11:47 PM
robertdeniro robertdeniro is offline
Junior Contributor
 
Join Date: Feb 2003
Location: Durban, South Africa
Posts: 306
Default

From your question it seems that you have figured out how to get the mouse over the button (wherever that may be on the screen).

To simulate a click, you can use either the:
mouse_event OR
SendInput
Windows API functions.
Search MSDN or the Platform SDK for help on how to use them.

Pay attention to which operating systems support these functions, and which OS you're writing for.
Reply With Quote
  #3  
Old 09-23-2004, 02:43 AM
herilane's Avatar
herilane herilane is offline
Unashamed geek

Retired Moderator
* Expert *
 
Join Date: Jul 2003
Location: London, England
Posts: 8,988
Default

In most cases, you don't need to simulate mouse clicks in order to set a radio button on a web page to true/false. Use the document object model to toggle the value instead.
http://www.xtremevbtalk.com/showthread.php?t=149732

Edit: Also, please don't start multiple threads for the same question. It'll only confuse people.

Last edited by herilane; 09-23-2004 at 03:25 AM.
Reply With Quote
  #4  
Old 09-23-2004, 12:21 PM
jaredsr05 jaredsr05 is offline
Freshman
 
Join Date: Sep 2004
Posts: 26
Default

I thank you for your help, but i still am not able to accomplish my task.
I use Win XP home with SP2

To be specific:My program starts and a webbrowser on one side of my form opens the page "http://www.1037theq.com/schoolspirit.html"
I use the complete function so my mouse moves to the radio button i want to click. Then i click a button which should activate the "document object model" you showed me. but it doesn't. do you know of anymore examples or have any more ideas? thanks in advance.

JROB
Reply With Quote
  #5  
Old 09-23-2004, 03:18 PM
herilane's Avatar
herilane herilane is offline
Unashamed geek

Retired Moderator
* Expert *
 
Join Date: Jul 2003
Location: London, England
Posts: 8,988
Default

What is the code you are using at the moment?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->