[RESOLVED] Displaying from the same application Path
Hi Guy's :wave:
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
Re: Displaying from the same application Path
App.Path returns the path of the application, so:
Code:
WebBrowser1.Navigate2 App.Path & "\page.htm"
Re: Displaying from the same application Path
Thanks many thanks for your fast support > Today, 04:14 PM
Re: [RESOLVED] Displaying from the same application Path
Sorry Guy's
How to can I print displayed page
Pls advice me !
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