allora ho modificato il codice in questa maniera
codice:
Private Sub Command1_Click()
ShellExecute Me.hwnd, "Open", "Conversion.bat", 1, App.Path, SW_SHOW
End Sub
Private Sub Command2_Click()
If LabelFormato = ".bmp" Then
FileCopy CommonDialog1.FileName, App.Path & "\preview.bmp"
Else
FileCopy CommonDialog1.FileName, App.Path & "\preview.png"
Call Command1_Click
End If
End sub
ora succede che comunque avviando Command2 la shell (command1) non la esegue però anche dopo aver avviato command2 se avvio manualmente command1 esegue la shell. In conclusione dopo il comando FileCopy la shell non va...soluzione?