Results 1 to 5 of 5

Thread: [RESOLVED] Displaying from the same application Path

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2007
    Posts
    140

    Resolved [RESOLVED] Displaying from the same application Path

    Hi Guy's

    I'll put Page File in the same location of my application and I want to get the Path from the same location , I do not like to define the Path of the web inside the code , I want to get the path from the same location of the application as the web in the same location of the application
    Code:
    Private Sub Form_Load()
    
    WebBrowser1.Navigate2 "c:\page.htm"
    
    End Sub
    web page in the same location of the application so I want to get the location from the path of page from the same location of the applicaion

    Please your advice me to the correct code

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Displaying from the same application Path

    App.Path returns the path of the application, so:
    Code:
    WebBrowser1.Navigate2 App.Path & "\page.htm"

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2007
    Posts
    140

    Re: Displaying from the same application Path

    Thanks many thanks for your fast support > Today, 04:14 PM

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2007
    Posts
    140

    Re: [RESOLVED] Displaying from the same application Path

    Sorry Guy's

    How to can I print displayed page

    Pls advice me !

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [RESOLVED] Displaying from the same application Path

    What are you sorry about?

    Use ShellExecute
    Code:
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
    (ByVal hwnd As Long, _
    ByVal lpOperation As String, _
    ByVal lpFile As String, _
    ByVal lpParameters As String, _
    ByVal lpDirectory As String, _
    ByVal nShowCmd As Long) As Long
    
    Private Sub Command1_Click()
    Dim PrintIt As Long
    PrintIt = ShellExecute(Me.hwnd, "PRINT", "C:\page.htm", "", "", -1)
    End Sub

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