Q: Shell command
I just purchased Visual Basic 5.0 learning edition and as a first development, I'm making a simple program, which just encrypts and decrypts using a cipher exe file. The trouble is:
1.I've created a text box which displays the file path eg c:\cyber\encryptme.txt. and a command button which encrypts the file using the following code: Private Sub Encrypt_Click() Dim Retval Retval = Shell("\cyber\cipher.EXE -e", 1) End Sub But how do I get the path information from the textbox and place it after the "cipher.exe -e" so that I encrypt that certain file???? Not just run the program without encrypting anything.
A: just make use of a variable: Private Sub Encrypt_Click() Dim Retval, cString$ cString$ = "\cyber\cipher.exe -e " & text1.text Retval = Shell(cString$, 1) End Sub Don't forget the space behind -e!
BTW this is only possible if the executable cipher.exe accepts of course a filename as a parameter!!!!