Results 1 to 5 of 5

Thread: how to make a button open a blank IE page?

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2002
    Posts
    56

    how to make a button open a blank IE page?

    When I click the button.IE will open a blank page.How to do that in VB?Thanks a lot.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, _
    2.                                                                                ByVal lpOperation As String, _
    3.                                                                                ByVal lpFile As String, _
    4.                                                                                ByVal lpParameters As String, _
    5.                                                                                ByVal lpDirectory As String, _
    6.                                                                                ByVal nShowCmd As Long) _
    7.                                                                                As Long
    8.  
    9. Private Sub Command1_Click()
    10.     Call ShellExecute(0&, "OPEN", "about:blank", vbNullString, vbNullString, 3)
    11. End Sub
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2002
    Posts
    56
    Thank you,but it doesnot work at my computer.After I click the button,nothing happens.

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Sorry, just noticed that the forum screwed with the post.

    "about :blank" should be "about:blank"

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5

    Thread Starter
    Member
    Join Date
    Sep 2002
    Posts
    56
    Thanks.It works after I change it.

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