creating a VB6 project that will take input from the user from two text boxes, then save this input to a batch file and then run the batch file in the background (vbhide)
[quote] Private Sub sendbtn_Click() Dim task As Integer Write #1, lbl_netsend.Caption & " " & IP_text.Text & " " & msg_text.Text Close #1 task = Shell("spam.bat", vbHide) End Sub Private Sub Form_Load() Dim filename As String filename = App.Path & "\spam.bat" Open filename For Output As #1 End Sub [/quote]
thats the code so far
lbl_netsend is just a invisible label saying net send IP_text is where you add the IP/Computer name or a * to send to a the current workgroup msg_text is where you add the message
Net send IP_text Msg_text on the first line
first line has speech marks surrounding the text which stops the batch file working properly...
This thread is now locked and can not be replied to.