Results 1 to 12 of 12

Thread: Open Webpge [Resolved]

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2005
    Location
    Minnesota
    Posts
    46

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

  2. #2
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    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++

  3. #3
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Re: Open Webpge

    did a lil test. this works fine

    VB Code:
    1. Private Sub Form_Load()
    2. List1.AddItem "www.google.com"
    3. List1.AddItem "www.yahoo.com"
    4. List1.AddItem "www.vbforums.com"
    5. End Sub
    6.  
    7. Private Sub List1_DblClick()
    8. Dim site As String
    9. site = List1.Text
    10. Shell "explorer http://" & site, vbNormalFocus
    11. 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++

  4. #4
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    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++

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2005
    Location
    Minnesota
    Posts
    46

    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:
    1. Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick
    2.         Dim site As String
    3.         site = ListBox1.SelectedItem.ToString
    4.         Shell("explorer " & site, vbNormalFocus)
    5.  
    6.     End Sub

  6. #6
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    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++

  7. #7

    Thread Starter
    Member
    Join Date
    Jan 2005
    Location
    Minnesota
    Posts
    46

    Re: Open Webpge

    I thought I specified, guess not. Even I know there is a big difference between them

  8. #8
    Addicted Member
    Join Date
    Sep 2000
    Location
    Atlanta, GA
    Posts
    177

    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

  9. #9
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Open Webpge [Resolved]

    vbMaximized should do it. (I think it's also in .Net)

  10. #10
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    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++

  11. #11
    Addicted Member
    Join Date
    Sep 2000
    Location
    Atlanta, GA
    Posts
    177

    Re: Open Webpge [Resolved]

    it doesn't. That was the first thing I tried.
    212 will lead you to the truth

  12. #12
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Re: Open Webpge [Resolved]

    Quote 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
  •  



Click Here to Expand Forum to Full Width