| View previous topic :: View next topic |
| Author |
Message |
cildor666 Advanced Cheater
Reputation: 0
Joined: 08 Mar 2008 Posts: 95
|
Posted: Wed Sep 24, 2008 12:59 am Post subject: [Visual Basic 2008 Express] Help needed. |
|
|
I have a Text Box and a button when you click the button i want it to type "ping" (TextBox1.Text) -l 65500" So in other words i want it to type ping then copy what is in TextBox1.Text and then type -l 65500, but i want it to do this as soon as it opens CMD, (I want it to type it in CMD).
I am trying to use this code : Shell("C:\WINDOWS\System32\CMD.exe", "ping (TextBox1.Text) -l 65500")
Which is not working i get the error "Conversion from string "ping (TextBox1.Text) -l 65500" to type 'Short' is not valid.'
|
|
| Back to top |
|
 |
RAKO Master Cheater
Reputation: 0
Joined: 26 Jun 2006 Posts: 454
|
Posted: Wed Sep 24, 2008 2:52 am Post subject: |
|
|
| Code: | Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Shell("ping " + TextBox1.Text + " -l 65500")
End Sub |
vb 2008 works for me.
_________________
| Dark Byte wrote: | | Who knows, perhaps i'm a maple gm!!!! |
|
|
| Back to top |
|
 |
cildor666 Advanced Cheater
Reputation: 0
Joined: 08 Mar 2008 Posts: 95
|
Posted: Wed Sep 24, 2008 2:58 am Post subject: |
|
|
| RAKO wrote: | | Code: | Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Shell("ping " + TextBox1.Text + " -l 65500")
End Sub |
vb 2008 works for me. |
That command doesn't even open up CMD I need it to open CMD and automatically ping as soon as it opens (I will need to be able to open CMD multiple times to do the same thign as well.)
|
|
| Back to top |
|
 |
RAKO Master Cheater
Reputation: 0
Joined: 26 Jun 2006 Posts: 454
|
Posted: Wed Sep 24, 2008 3:02 am Post subject: |
|
|
it opens a cmd for me. the cmd isn't put into focus when it is run and closes when it is finished. i barley ever program in vb but I will look for something else.
_________________
| Dark Byte wrote: | | Who knows, perhaps i'm a maple gm!!!! |
|
|
| Back to top |
|
 |
cildor666 Advanced Cheater
Reputation: 0
Joined: 08 Mar 2008 Posts: 95
|
Posted: Wed Sep 24, 2008 3:04 am Post subject: |
|
|
| Ok, thanks for the help. Remember i need the command to be typed in and to be entered as soon as it is open.
|
|
| Back to top |
|
 |
RAKO Master Cheater
Reputation: 0
Joined: 26 Jun 2006 Posts: 454
|
Posted: Wed Sep 24, 2008 3:24 am Post subject: |
|
|
| Code: | Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Shell("cmd.exe /k ping " + TextBox1.Text, vbNormalFocus)
End Sub
|
this is in visual studio 2008 pro but tell me how it goes.
_________________
| Dark Byte wrote: | | Who knows, perhaps i'm a maple gm!!!! |
|
|
| Back to top |
|
 |
Shepherd Expert Cheater
Reputation: 0
Joined: 28 Sep 2007 Posts: 186
|
Posted: Wed Sep 24, 2008 5:53 am Post subject: |
|
|
| Cildor, I doubt you know any VB at all. Keep asking this kind of questions. Try following some "beginner" tut's first. Btw, I replied to you question in RS yesterday.
|
|
| Back to top |
|
 |
cildor666 Advanced Cheater
Reputation: 0
Joined: 08 Mar 2008 Posts: 95
|
Posted: Wed Sep 24, 2008 9:05 am Post subject: |
|
|
| To0k wrote: | | Cildor, I doubt you know any VB at all. Keep asking this kind of questions. Try following some "beginner" tut's first. Btw, I replied to you question in RS yesterday. |
I came for help, not for stupid comments. The 'General Programming' section can be used for help as well. This is how people learn they ask questions and find out.
|
|
| Back to top |
|
 |
RAKO Master Cheater
Reputation: 0
Joined: 26 Jun 2006 Posts: 454
|
Posted: Wed Sep 24, 2008 9:24 pm Post subject: |
|
|
| cildor666 wrote: | | To0k wrote: | | Cildor, I doubt you know any VB at all. Keep asking this kind of questions. Try following some "beginner" tut's first. Btw, I replied to you question in RS yesterday. |
I came for help, not for stupid comments. The 'General Programming' section can be used for help as well. This is how people learn they ask questions and find out. |
his point is that what you are asking for is very simple. you could easily learn this stuff from google and its only one line. this is a hacking forum and if you need help on simple stuff like this why not use a general programming forum?
_________________
| Dark Byte wrote: | | Who knows, perhaps i'm a maple gm!!!! |
|
|
| Back to top |
|
 |
|