[RESOLVED] Controlling A Program Through A Webpage
Not sure where to post this, so please move if you see it should be elsewhere.
Now basically what i want to do is, similar to what a few programs these days do. Where a website, wether on the Internet, or a HTML page on your computer can control your program. For example, a HTML page that shows up in a Web Browser object in the application, and there are links (either images or text) that when clicked will react with the program to click a button, change settings, open windows or dialogs, etc. Is this possible? I've seen it in a few programs before, so I'm guessing it is possible, properly hard to do though.
So any ideas how i would go about doing it?
Cheers, and thanks for your help. :)
Re: Controlling A Program Through A Webpage
It's in the right place, and I think what you're looking for is the webbrowser_beforenavigate option
If you had links like "vb:clickbutton" in your HTML and clicked it in the webbrowser, beforenavigate would be fired and you would get URL sent with it...URL would in that case be "vb:clickbutton" and you would know to webbrowser.stop and then do what you wanted with the URL...you see?
Re: Controlling A Program Through A Webpage
Quote:
Originally Posted by smUX
It's in the right place, and I think what you're looking for is the webbrowser_beforenavigate option
If you had links like "vb:clickbutton" in your HTML and clicked it in the webbrowser, beforenavigate would be fired and you would get URL sent with it...URL would in that case be "vb:clickbutton" and you would know to webbrowser.stop and then do what you wanted with the URL...you see?
Ah, i see, thats interesting. I see exactly what you mean. Could you give me a small example of how the code should look and what objects i would need?
Re: Controlling A Program Through A Webpage
Only object you need is the webbrowser and of course the button you want clicked (or action you want taken, of course. And regarding code, I should be able to write a quick project, I'll post it soon
1 Attachment(s)
Re: Controlling A Program Through A Webpage
This mostly works...I have it grabbing the info and actioning it, but it doesn't stop the webbrowser...maybe someone else can help you there
You need to put the HTML in C:\ or change the location in the form_load
Re: Controlling A Program Through A Webpage
Thanks mate, this will be a big help. Thank you so much :).
Re: Controlling A Program Through A Webpage
Re: Controlling A Program Through A Webpage
Now that we've helped you, you can pull down the Thread Tools menu and Mark Thread Resolved, so people will know you got your answer ;)
Re: Controlling A Program Through A Webpage
Quote:
Originally Posted by gavio
Now that we've helped you, you can pull down the Thread Tools menu and Mark Thread Resolved, so people will know you got your answer ;)
Ah yes, sorry. There, done. Neally forgot about that, thank you for reminding me :).