Visual Basic - COMMONdialog

Life is soft - evento anual de software empresarial
 
Vista:

COMMONdialog

Publicado por JULIOESCOBAR (98 intervenciones) el 26/01/2005 03:40:47
AMIGOS: QUIERO ABRIR POR MEDIO DEL COMMONDIALOG (SHOWopen) un archivo .txt EN EL BLOC DE NOTAS (WORpad), CUAL SERIA EL PROCEDIMIENTO???
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:COMMONdialog

Publicado por POLA (522 intervenciones) el 26/01/2005 10:00:46
Con la siguiente API, abriras cualquier archivo con la aplicación predeterminada.

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 res As Long
res = ShellExecute(Form1.hWnd, "open", "C:\texto.txt", "", "", 1)

End Sub

Donde aparece el nombre del archivo 'texto.txt' lo déberás de sustituir por la propieda FileName del objeto CommandDialog.

Espero te sirva. Saludos Pola
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar