|
-
Sep 8th, 2009, 12:14 PM
#1
Thread Starter
Lively Member
Last edited by _-Rs-_; Sep 9th, 2009 at 10:17 AM.
Reason: RESOLVED
-
Sep 8th, 2009, 12:21 PM
#2
Frenzied Member
Re: How To Load In Combo Box ?
if u mean on a form...
cboControl.AddItem "Male"
cboControl.additem "Female"
-
Sep 8th, 2009, 12:23 PM
#3
-
Sep 9th, 2009, 03:33 AM
#4
Thread Starter
Lively Member
Re: How To Load In Combo Box ?
Hay All I Found Out How To Add In Combo Box I Used AddItem But I Still Dont No How To Set It's value
-
Sep 9th, 2009, 03:46 AM
#5
Thread Starter
Lively Member
Re: How To Load In Combo Box ?
I Think It Needs To Be Some Thing Like This
vb Code:
If Combo1.Text = "Starts With" Then ???????? (cons).Value = starts
I Dont No If It's Right But I Think The Code Maybe Some Thing Like That
-
Sep 9th, 2009, 05:36 AM
#6
Re: How To Load In Combo Box ?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Sep 9th, 2009, 05:44 AM
#7
Thread Starter
Lively Member
Re: How To Load In Combo Box ?
 Originally Posted by koolsid
What is "cons" ?
This Bro
--------> <select name="cons"> <--------
See The Html Source
-
Sep 9th, 2009, 05:45 AM
#8
Re: How To Load In Combo Box ?
try
wb.document.all("cons").value = combo1.text
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Sep 9th, 2009, 05:56 AM
#9
Re: How To Load In Combo Box ?
Yeah I saw that... but what is it?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Sep 9th, 2009, 05:58 AM
#10
Thread Starter
Lively Member
Re: How To Load In Combo Box ?
 Originally Posted by westconn1
try
wb.document.all("cons").value = combo1.text
Not Working Bro
Ok Here's More Info
See This Link https://in.edit.yahoo.com/registration?
It registration For Yahoo Id Now I make A Test Tool Like
This http://i30.tinypic.com/2ekhurl.jpg
at The Yahoo Page It's Asking For Gender Now I select Male In My Tool How Can I Make My Tool Do It In web browser Html Soure Is
Code:
<select name="gender" id="gender" class="" tabindex="3">
<option value="" SELECTED >- Select One -</option>
<option value="m" >Male</option>
<option value="f" >Female</option></select>
Last edited by _-Rs-_; Sep 9th, 2009 at 06:04 AM.
-
Sep 9th, 2009, 06:29 AM
#11
Re: How To Load In Combo Box ?
This has nothing to do with VB6 - Moved to HTML
-
Sep 9th, 2009, 06:35 AM
#12
Re: How To Load In Combo Box ?
this works in the yahoo
wb.document.all("gender").Value = "f"
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Sep 9th, 2009, 06:36 AM
#13
Re: How To Load In Combo Box ?
@ hack
maybe vb6, he is using webbrowser control
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Sep 9th, 2009, 06:40 AM
#14
Frenzied Member
Re: How To Load In Combo Box ?
-
Sep 9th, 2009, 06:56 AM
#15
Thread Starter
Lively Member
Re: How To Load In Combo Box ?
thanks for All The Info Guys but As I Said I Am Newbie Here What I Really Want Is
One Of My friend Asked Me To Try To Make A Tool That Will Search Here
http://www.apcentralpower.com/search/search_hyd2.jsp
So I Posted A Post Here
http://www.vbforums.com/showthread.php?t=583275
I Used That Info In My Tool All Was Ok But Not The Combo In That Page i Had No Idea How To Put That Combo Box In My Tool
The Html Source i Put In This Post is From That Page
So Guys What Should I Do If
possible Please explain in detail
I tried Some Thing Like This
vb Code:
Private Sub Combo2_Change()
If Combo2.Text = "Starts With" Then
WebBrowser1.Document.All(cons).Value = starts
ElseIf Combo2.Text = "Contains" Then
WebBrowser1.Document.All(cons).Value = contains
ElseIf Combo2.Text = "is Exactly" Then
WebBrowser1.Document.All(cons).Value = exactly
End Sub
But It Did not Work
Last edited by _-Rs-_; Sep 9th, 2009 at 07:21 AM.
-
Sep 9th, 2009, 07:24 AM
#16
Re: How To Load In Combo Box ?
they are strings, not variables
WebBrowser1.Document.All(cons).Value = "starts"
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Sep 9th, 2009, 07:57 AM
#17
Thread Starter
Lively Member
Re: How To Load In Combo Box ?
[B]
 Originally Posted by westconn1
they are strings, not variables
WebBrowser1.Document.All(cons).Value = "starts"
Newbie Here Bro I Understand they are strings Now What Do I Do With Them
Sorry If I Am taking Too Much Time Of Yours Guys
Last edited by _-Rs-_; Sep 9th, 2009 at 08:49 AM.
-
Sep 9th, 2009, 08:14 AM
#18
Frenzied Member
Re: How To Load In Combo Box ?
 Originally Posted by _-Rs-_
WebBrowser1.Document.All("cons").Value = "starts"
-- again psting back to my origional point above... you realise that you can use the web browser post vars in the navigate sub of the browser to post your values, without needing to load the origional search page????
-
Sep 9th, 2009, 08:16 AM
#19
Frenzied Member
Re: How To Load In Combo Box ?
 Originally Posted by _-Rs-_
Newbie Here Bro Ok I Understand they are strings Now What Do I Do With Them Ware To Put Code In Private Sub Combo2_Change Or Command1_Click Or Form_Load
i would use the combo Validate... - this runs when the control focus is lost...
-
Sep 9th, 2009, 08:41 AM
#20
Thread Starter
Lively Member
Re: How To Load In Combo Box ?
 Originally Posted by wpearsall
i would use the combo Validate...  - this runs when the control focus is lost...
combo Validate Hmmm Bro Can You Make An example Source
With That Site http://www.apcentralpower.com/search/search_hyd2.jsp
It will Give Me A Good Idea About What Your Saying 
peace
-
Sep 9th, 2009, 08:49 AM
#21
Frenzied Member
Re: How To Load In Combo Box ?
Code:
Dim strFormData As String
'Length of the separator string must be 76. I think this is simply a limitation of the component I was using and not a rule.
strFormData = "-------------------------------------------------------------ZkdOkkdKjoHEEdZ" & vbCrLf
strFormData = strFormData & "Content-Disposition: form-data; name=""cons""" & vbCrLf
strFormData = strFormData & vbCrLf 'Extra carriage return before contents of multipart section
strFormData = strFormData & sCons & vbCrLf
strFormData = strFormData & "-------------------------------------------------------------ZkdOkkdKjoHEEdZ" & vbCrLf
strFormData = strFormData & "Content-Disposition: form-data; name=""nameasonbill""" & vbCrLf
strFormData = strFormData & vbCrLf 'Extra carriage return before contents of multipart section
strFormData = strFormData & txtNames.Text & vbCrLf
strFormData = strFormData & "-------------------------------------------------------------ZkdOkkdKjoHEEdZ" & vbCrLf
strFormData = strFormData & "Content-Disposition: form-data; name=""ero""" & vbCrLf
strFormData = strFormData & vbCrLf 'Extra carriage return before contents of multipart section
strFormData = strFormData & sAreaNo & vbCrLf
strFormData = strFormData & "-------------------------------------------------------------ZkdOkkdKjoHEEdZ" & vbCrLf
WebBrowser1.Navigate URL, , , , strFormData, _
"Content-Type: multipart/form-data; " & _
"boundary=-----------------------------------------------------------ZkdOkkdKjoHEEdZ"
if i give you this.... - its not the WHOLE thing, but you can add the fields you need, and need to get the POST URL.. - im not sure if its working, but i used that to send a form to login to my website from an old chat client i made... but my web browser is broke so
-
Sep 9th, 2009, 09:01 AM
#22
Frenzied Member
Re: How To Load In Combo Box ?
 Originally Posted by _-Rs-_
Code:
Private Sub Combo1_Validate(Cancel As Boolean)
Select Case Combo1.ListIndex
Case 0:
WebBrowser1.Document.All("cons").Value = "starts"
Case 1:
WebBrowser1.Document.All("cons").Value = "contains"
Case 2:
WebBrowser1.Document.All("cons").Value = "exactly"
End Select
End Sub
-
Sep 9th, 2009, 10:15 AM
#23
Thread Starter
Lively Member
Re: How To Load In Combo Box ?
 Originally Posted by wpearsall
Code:
Private Sub Combo1_Validate(Cancel As Boolean)
Select Case Combo1.ListIndex
Case 0:
WebBrowser1.Document.All("cons").Value = "starts"
Case 1:
WebBrowser1.Document.All("cons").Value = "contains"
Case 2:
WebBrowser1.Document.All("cons").Value = "exactly"
End Select
End Sub
Thank You So Much Bro It Worked Keep Rocking
Last edited by _-Rs-_; Sep 9th, 2009 at 10:19 AM.
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
|