Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 29th, 2007, 4:45 PM   #1
Megabyte
Hand Crafted
 
Megabyte's Avatar
 
Join Date: Nov 2007
Location: The Pit
Posts: 13
Rep Power: 0 Megabyte is on a distinguished road
Webpage in VB6 Program

I have figured out how to launch an internet browser in Visual Basic, but I want to be able to, when I press a button, launch the web page in the actual program.

After it is launched, I would want to be able to click a button and then have interact with the web page by clicking at a given position.

So, is that possible?

For more of an example ...
http://img227.imageshack.us/img227/974/exampleuq8.png

And is there any way I would be able to make it so the web page is launched in the text box? (The text box being where it would launch, and not that I want it to have to launch in a text box)
Megabyte is offline   Reply With Quote
Old Nov 29th, 2007, 9:02 PM   #2
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 532
Rep Power: 4 Ancient Dragon is on a distinguished road
Re: Webpage in VB6 Program

why launch IE or any other browser, just write your own. See this tutorial. I have not done this myself so can't vouch for how good a tutorial it is.

Hope it helps.
Ancient Dragon is offline   Reply With Quote
Old Nov 29th, 2007, 9:09 PM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,835
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Re: Webpage in VB6 Program

@Ancient Dragon: Yes. He was already saying he didn't want to launch IE or any other browser.

@Megabyte: I would go with your initial idea. Why create something when you already have resources at your disposal? Sure, it's another window that pops up, but a small price to pay.

Unless you just want to simply render a single page of HTML. Then that sounds like a more suitable situation. And the tutorial Ancient Dragon linked you to probably explains how to do that.

I know you're also maybe asking if you could embed a prexisting web browser into your frame. I've never seen it done before, but maybe it can be, similar to the idea behind frames in HTML. I'll let someone else answer that...
Sane is offline   Reply With Quote
Old Nov 29th, 2007, 9:14 PM   #4
Megabyte
Hand Crafted
 
Megabyte's Avatar
 
Join Date: Nov 2007
Location: The Pit
Posts: 13
Rep Power: 0 Megabyte is on a distinguished road
Re: Webpage in VB6 Program

It sounds like making my own would work then. Thanks Ancient Dragon.

But yeah ... if that is not the only way I might as well just use something like IE, though I usually use Firefox.

I thought making it so a web page launched in the application would in the long run be easier but yeah, maybe not.

Is there any way I could still use a browser like IE or Firefox, and have the VB6 application interact with it so that it would click on certain places in the browser, even when the window is not in focus?
Megabyte is offline   Reply With Quote
Old Nov 29th, 2007, 9:18 PM   #5
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,835
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Re: Webpage in VB6 Program

Why do you need it interacting with the VB6 application? I don't see any situation where the motive behind that could not be satisfied some other way. Explain what you're trying to accomplish, and we might be able to provide insight into "better" ways of doing what you're trying to do.
Sane is offline   Reply With Quote
Old Nov 29th, 2007, 9:46 PM   #6
Megabyte
Hand Crafted
 
Megabyte's Avatar
 
Join Date: Nov 2007
Location: The Pit
Posts: 13
Rep Power: 0 Megabyte is on a distinguished road
Re: Webpage in VB6 Program

Interacting might not have been an ideal word choice there.

But what I meant was, that when a command button is clicked, it would begin clicking on certain places in the screen (I wanted it to click on a place on the vb program, which is the reason for wanting a web page in it). It would do it so many times, and then be finished.

I may end up making this a program to launch a game from another community I am a part of, with resources added in to help out. None illegal like hacking the game or breaking the rules, but links for tips at certain places and stuff like that.

But in the process I wanted to see if I could start on a certain web page, then after having it click at a certain place any number of times, end up at another. Just think that part would be sort of neat.

Edit: About the tutorial Ancient posted.
I did it, and it was actually pretty simple.

Is there any way though to make it so it would load on a specific web page and not a totally blank one?

Edit II: A little backtracking though ...

I closed VB, and the next time I went to load the project it said "File not found 'C:\WINDOWS\system32\ieframe.dll' -- continue loading project?

I clicked yes. The I noticed the button I enabled wasn't there, so I tried to enable it again, and this time got the error "File not found 'C:\WINDOWS\system32\ieframe.dll\1'"

Anybody know where to go from here?

Last edited by Megabyte; Nov 29th, 2007 at 10:02 PM.
Megabyte is offline   Reply With Quote
Old Nov 29th, 2007, 11:03 PM   #7
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 532
Rep Power: 4 Ancient Dragon is on a distinguished road
Re: Webpage in VB6 Program

>>Is there any way though to make it so it would load on a specific web page and not a totally blank one?

Yes, in the Form_Load event (using the example in the tutorial I posted earlier)
Private Sub Form_Load()
 wWeb.Navigate "http:\\www.microsoft.com"
End Sub

>>Anybody know where to go from here?
Did you save your project?
Ancient Dragon is offline   Reply With Quote
Old Nov 29th, 2007, 11:47 PM   #8
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
Re: Webpage in VB6 Program

I think most of the clicking could probably be done by poking around with the Document property. You should be able to do most DOM manipulation possible with javascript, based on a brief glance here: http://msdn2.microsoft.com/en-us/library/aa752052.aspx
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Old Nov 30th, 2007, 5:19 PM   #9
Megabyte
Hand Crafted
 
Megabyte's Avatar
 
Join Date: Nov 2007
Location: The Pit
Posts: 13
Rep Power: 0 Megabyte is on a distinguished road
Re: Webpage in VB6 Program

Quote:
Originally Posted by Ancient Dragon View Post
>>Is there any way though to make it so it would load on a specific web page and not a totally blank one?

Yes, in the Form_Load event (using the example in the tutorial I posted earlier)
Private Sub Form_Load()
 wWeb.Navigate "http:\\www.microsoft.com"
End Sub

>>Anybody know where to go from here?
Did you save your project?
Yeah, I thought about it more today and I figured it had something to do with the wWeb.Nagivate. Thanks though. If I can fix my problem then I'll try that.

And yes I did save my project. I can open the project, except the Web part of it is disabled because I'm apparently missing a file.

I looked around some and came to this article, so if that information is correct and it is a problem with how they have IE 7 now (since I did upgrade) I should hopefully be able to just download a new file or switch it to a different one.

Quote:
Originally Posted by Dameon View Post
I think most of the clicking could probably be done by poking around with the Document property. You should be able to do most DOM manipulation possible with javascript, based on a brief glance here: http://msdn2.microsoft.com/en-us/library/aa752052.aspx
Don't really understand that article. Might not be advanced enough since I recently started coding or I need to take a better look, don't know.
I don't know any java though so if that is involved at all, going that route isn't an option for me right now.
Megabyte is offline   Reply With Quote
Old Dec 1st, 2007, 3:59 PM   #10
Megabyte
Hand Crafted
 
Megabyte's Avatar
 
Join Date: Nov 2007
Location: The Pit
Posts: 13
Rep Power: 0 Megabyte is on a distinguished road
Re: Webpage in VB6 Program

Everything is working fine now and I have all I need except I don't know how to do the final (I think) thing.

What I need is to make it so when a command button is clicked, it will proceed to click at a certain point on my wWeb as many times as are entered in the text box next to it.
What I really just need, I think, is to know how to automate a mouse click.

I checked on google but I don't know what exactly I'm looking for either so it didn't really help.
Megabyte is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hello, I'd like to write a program for my work. blake_jl Community Introductions 13 Nov 23rd, 2007 4:31 PM
Language display in program Prm753 C++ 3 May 30th, 2006 5:45 PM
Help me make a program. read ---> DBZ Visual Basic 8 Mar 10th, 2006 8:53 AM
Creating a program to test a program sixstringartist C 8 Jan 21st, 2006 1:15 PM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 4:12 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:47 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC