Like to see how other would do this
:)
VB 6.5
VB 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
Sub Main()
Const SW_SHOWDEFAULT As Long = 10
Dim strFullPathToFile As String
''''''''''''''''''''''''''''''''''\ The name of
'''''Note'''''''''''''''''''''''''\ document goes
''''''''''''''''''''''''''''''''''\ here
strFullPathToFile = App.Path & "\SCVR 4C Acknowledgment and Consent.doc"
Call ShellExecute(0, "Open", strFullPathToFile _
, 0&, 0&, SW_SHOWDEFAULT)
End
End Sub
:p How I do it in .Net
VB Code:
Option Strict Off
Option Explicit On
Module SCVRPrintForm4C
Dim i As Integer
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA"(ByVal hwnd As Integer, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Integer) As Integer
Public Sub Main()
Const SW_SHOWDEFAULT As Integer = 10
Dim strFullPathToFile As String
''''''''''''''''''''''''''''''''''\ The name of
'''''Note'''''''''''''''''''''''''\ document goes
''''''''''''''''''''''''''''''''''\ here
strFullPathToFile = Application.StartupPath & "\SCVR 4C Acknowledgment and Consent.doc"
i = ShellExecute(0, "Open", strFullPathToFile, CStr(0), CStr(0), SW_SHOWDEFAULT)
End
End Sub
End Module
:eek:
I get this line when I use the wizard to convert!
strFullPathToFile = VB6.GetPath & "\SCVR 4C Acknowledgment and Consent.doc"
VB6.GetPath
What is this VB6, some kind of funtion to convert?
:D