Results 1 to 9 of 9

Thread: [RESOLVED] Controlling A Program Through A Webpage

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2006
    Posts
    50

    Resolved [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.

  2. #2
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    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?
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2006
    Posts
    50

    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?

  4. #4
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    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
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  5. #5
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    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
    Attached Files Attached Files
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  6. #6

    Thread Starter
    Member
    Join Date
    Jun 2006
    Posts
    50

    Re: Controlling A Program Through A Webpage

    Thanks mate, this will be a big help. Thank you so much .

  7. #7
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: Controlling A Program Through A Webpage

    Glad I could help :-)
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  8. #8
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    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

  9. #9

    Thread Starter
    Member
    Join Date
    Jun 2006
    Posts
    50

    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 .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width