|
-
Apr 21st, 2009, 06:18 AM
#1
Thread Starter
New Member
[RESOLVED] use VB6 form to control htm page function in webBrowser of VB6 form
Hi to you all,
I am a beginner in programming. I am writing a small project with Visual Basic 6.
my project is to have 2 textbox and a "Go" command buttom in a VB6 form witch containing a webBrowser control.
when the project was run, a htm page was loaded into the webBrowser, within the htm page, there were also 2 text input boxes with initial value shown as "12345" and "67890" and a "Go" buttom in it.
the purpose of this project is to input different value to the text1 and text2 boxes, then click the "Go" button in VB6 form, then the result should be the same as input value to text input boxex of the htm page.
the htm page was something look like below:
-------------------------------------
.
.
.
<SCRIPT language=javascript
src="input_value"></SCRIPT>
.
.
.
.
<TR>
<TD align=right><B>Textbox1:</B></TD>
<TD><LABEL><INPUT id=text1_value size=12 value=12345
name=text1_value> </LABEL></TD></TR>
<TR>
<TD align=right><B>Textbox2:</B></TD>
<TD><LABEL><INPUT id=text2_value size=12 value=67890
name=text2_value> </LABEL></TD></TR>
<TR>
<TD> </TD>
<TD><BR><INPUT onclick="javascript:input_value(document.getElementById('text1_value').value, document.getElementById('text2_value').value);" type=submit value=Go name=Submit><BR><BR><LABEL></LABEL></TD></TR>
.
.
.
.
------------------------------------
Now, my problem is, how to input other value in text1 box and text2 box, then click on the "Go" command buttom of VB6 form and should get the same result as input value in the htm page.
or how to change the initial value of the htm page input boxes, to the value of the text boxes of VB6 form.
please help me.
Thanks in advance.
-
Apr 21st, 2009, 08:20 AM
#2
Re: use VB6 form to control htm page function in webBrowser of VB6 form
Up until a few weeks ago I had not used a WBControl or had any experience reading or comprehending HTML code. That said, I was able to write an AutoFill program that filled in over 10 TextBoxes on a tech support page that I use quite often. I used the code found Here to get my feet wet.
Martin2K
This project requires a Reference to the Microsoft HTML Object Library
This project requires a Microsoft Internet Controls/WebBrowser Control & was pieced together from the above links.
Last edited by CDRIVE; Apr 21st, 2009 at 08:39 AM.
Reason: Add link
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
-
Apr 22nd, 2009, 04:15 AM
#3
Thread Starter
New Member
Re: use VB6 form to control htm page function in webBrowser of VB6 form
Hi CDRIVE
Thanks for your code, I made a little modification of your code and have my problem resolved.
Thanks again.
-
Apr 22nd, 2009, 07:42 AM
#4
Re: use VB6 form to control htm page function in webBrowser of VB6 form
 Originally Posted by ipnetfj
Hi CDRIVE
Thanks for your code, I made a little modification of your code and have my problem resolved.
Thanks again.
Glad to read that. Please pull down the Thread Tools and mark this thread Resolved.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|