|
-
Jan 2nd, 2005, 11:12 PM
#1
Thread Starter
Member
Open Webpge [Resolved]
I’m sure someone knows about the Google API service, so far I was able to get a list of 10 URL in a list box. My question is how do I make it possible for a user to double click on a URL and have the page to it open in a web browser window?
Last edited by tonyrueb; Jan 3rd, 2005 at 11:10 PM.
-
Jan 2nd, 2005, 11:20 PM
#2
Frenzied Member
Re: Open Webpge
heres a lil sample.... could do something like this: wud open explorer (IE) and go to whatever is in the selected list1's text.
in the click event for list1.
dim site as string
site = list1.text
shell "explorer " & site
:::`DISCLAIMER`:::
Do NOT take anything i have posted to be truthful in any way, shape or form.
Thank You!
--------------------------------
"Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
"Finaly I can look as gay as I want..." - NoteMe
Languages: VB6, BASIC, Java, C#. C++
-
Jan 2nd, 2005, 11:26 PM
#3
Frenzied Member
Re: Open Webpge
did a lil test. this works fine
VB Code:
Private Sub Form_Load()
List1.AddItem "www.google.com"
List1.AddItem "www.yahoo.com"
List1.AddItem "www.vbforums.com"
End Sub
Private Sub List1_DblClick()
Dim site As String
site = List1.Text
Shell "explorer http://" & site, vbNormalFocus
End Sub
:::`DISCLAIMER`:::
Do NOT take anything i have posted to be truthful in any way, shape or form.
Thank You!
--------------------------------
"Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
"Finaly I can look as gay as I want..." - NoteMe
Languages: VB6, BASIC, Java, C#. C++
-
Jan 2nd, 2005, 11:27 PM
#4
Frenzied Member
Re: Open Webpge
Also remember you can use shellexecute api to launch default browser...in my code i just launch IE.
:::`DISCLAIMER`:::
Do NOT take anything i have posted to be truthful in any way, shape or form.
Thank You!
--------------------------------
"Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
"Finaly I can look as gay as I want..." - NoteMe
Languages: VB6, BASIC, Java, C#. C++
-
Jan 3rd, 2005, 08:33 PM
#5
Thread Starter
Member
Re: Open Webpge
Thank you for taking the time to answer my question, I did have to make a few changes but it got me in the right direction, thank you again
Here is the code I had to use:
VB Code:
Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick
Dim site As String
site = ListBox1.SelectedItem.ToString
Shell("explorer " & site, vbNormalFocus)
End Sub
-
Jan 3rd, 2005, 08:35 PM
#6
Frenzied Member
Re: Open Webpge
Didn't know you were using .NET
Glad i could help though.
Also Welcome to the forums!
please add [resolved] and a checkmark to your orginal post since your post has been solved.
:::`DISCLAIMER`:::
Do NOT take anything i have posted to be truthful in any way, shape or form.
Thank You!
--------------------------------
"Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
"Finaly I can look as gay as I want..." - NoteMe
Languages: VB6, BASIC, Java, C#. C++
-
Jan 3rd, 2005, 11:08 PM
#7
Thread Starter
Member
Re: Open Webpge
I thought I specified, guess not. Even I know there is a big difference between them
-
Jan 31st, 2005, 06:55 PM
#8
Addicted Member
Re: Open Webpge [Resolved]
How can I get the browser to display? when I use the code the browser opens already minimized.
212 will lead you to the truth
-
Jan 31st, 2005, 07:05 PM
#9
Re: Open Webpge [Resolved]
vbMaximized should do it. (I think it's also in .Net)
-
Jan 31st, 2005, 08:50 PM
#10
Frenzied Member
Re: Open Webpge [Resolved]
vbMaximizedFocus
:::`DISCLAIMER`:::
Do NOT take anything i have posted to be truthful in any way, shape or form.
Thank You!
--------------------------------
"Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
"Finaly I can look as gay as I want..." - NoteMe
Languages: VB6, BASIC, Java, C#. C++
-
Feb 10th, 2005, 06:22 PM
#11
Addicted Member
Re: Open Webpge [Resolved]
it doesn't. That was the first thing I tried.
212 will lead you to the truth
-
Feb 10th, 2005, 06:29 PM
#12
Frenzied Member
Re: Open Webpge [Resolved]
 Originally Posted by Doc Scheinder
it doesn't. That was the first thing I tried.
It should work..... vbMaximizedFocus
if it isnt, try vbnormalfocus or something else to see if they have any effect.
When push comes to shove, go with the showwindow api or sendmessag + an sw message to show or maximize.
:::`DISCLAIMER`:::
Do NOT take anything i have posted to be truthful in any way, shape or form.
Thank You!
--------------------------------
"Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
"Finaly I can look as gay as I want..." - NoteMe
Languages: VB6, BASIC, Java, C#. C++
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
|