pdf`s und bat`s

sascha 1974

Grünschnabel
zwei fragen an dieser stelle.

1.) ich kann keine pdf-datein via command button öffnen, habe schon die pdf.ocx hinzugefügt aber wie ist der kontext dazu

2.) beim ausführen von bat-datein via command button werden die zwar ausgefürht nur laufen dies minimiert, würde aber gerne das fenster im vordergrund sehen

thx schon mal für hilfe
 
Moin Sascha,

zu 1 fällt mir folgende Lösung ein.
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 Const SW_MAXIMIZE = 3

Private Sub Command1_Click()
[tab]Dim szFile As String
szFile = "irgendwo\irgendwas.pdf"

Call ShellExecute(Me.hwnd, "open", szFile, vbNullString, vbNullString, SW_MAXIMIZE)
End Sub[/tab]

zu 2 gibt die Onlinehilfe was her. Versuchs mal mit "Shell "Deine_Batch_Datei.bat", vbMaximized"


Hope it helps

Das Orakel
 
Zurück