-
I am making a perl editor which requires a text box in which you write the code. Perl files come with the extensions (.pl) & (.CGI). Please could someone tell me how I could make it so when someone clicks on a .pl file, my program opens (I can get this far) but with the text box containing the file contents
Thank you
Richard Charlton
-
use Command() to grab command line parameters which should be the filename of the file you want to open then read it into the text box
eg:
Code:
Option Explicit
Private Sub Form_Load()
Dim filename As String
Dim fnum As Byte
Dim strtemp As String
filename = Command()
If filename <> "" Then
fnum = FreeFile
Open filename For Binary As fnum
strtemp = Space(LOF(fnum))
Get fnum, , strtemp
Close fnum
End If
Text1.Text = strtemp
End Sub
-