can u provide any live working sample please
hi there
place following in your Form_Load()
call the Form : Form1
place a textbox (select multiline=true) calles Text1
drag a textfile on top of the program's icon (after compiling an exe)
-
-
Private Sub Form_Load()
-
On Error GoTo fail
-
'see if the program was opened with an argument...
-
FileName = Command()
-
If Not FileName = vbNullString Then
-
Open FileName For Input As #1
-
Line Input #1, p
-
Form1.Text1.Text = p
-
While Not EOF(1)
-
Line Input #1, p
-
Form1.Text1.Text = Form1.Text1.Text & vbCrLf & p
-
Wend
-
Close #1
-
End If
-
End Sub
-
-