Results 1 to 2 of 2

Thread: Opening web page in a new window [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    131

    Resolved Opening web page in a new window [RESOLVED]

    I have the code to open a web page when a button is clicked, but it just changes the current IE window. How do I modify this code to open the page in a new window?

    VB Code:
    1. Option Explicit
    2. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
    3. ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    4.  
    5. Private Const SW_SHOWNORMAL As Long = 1
    6. Private Const SW_SHOWMINIMIZED As Long = 2
    7. Private Const SW_SHOWMAXIMIZED As Long = 3

    and the button code:
    VB Code:
    1. Private Sub cmdCRKC_Click()
    2. ShellExecute Me.hwnd, "Open", "http://localhost/indexCRKCG1_G2.asp", vbNullString, "C:\", SW_SHOWNORMAL
    3. End Sub
    Last edited by espylacopa; Mar 9th, 2005 at 01:51 PM.
    Things fall apart which the center cannot hold...

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