| View previous topic :: View next topic |
| Author |
Message |
WillPwnYou Expert Cheater
Reputation: 0
Joined: 31 Jul 2007 Posts: 189
|
Posted: Sat Aug 11, 2007 2:08 pm Post subject: [HELP ME D:<] Visual Basic |
|
|
Can I make a command button open a new window? If so, whats the code and do I use a second form?
_________________
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6301
|
Posted: Sat Aug 11, 2007 2:13 pm Post subject: |
|
|
You use a second form to open a new window.
1. Add a new form.
2. On form 1 and a button and then add this code.
| Code: | Private Sub Command1_Click()
Form2.Show
End Sub |
|
|
| Back to top |
|
 |
WillPwnYou Expert Cheater
Reputation: 0
Joined: 31 Jul 2007 Posts: 189
|
Posted: Sat Aug 11, 2007 2:15 pm Post subject: |
|
|
Now...
[HELP ME D:<] How do you rep?
xD
_________________
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6301
|
Posted: Sat Aug 11, 2007 2:19 pm Post subject: |
|
|
Dont worry about a rep for me, Just got to work now
|
|
| Back to top |
|
 |
Kumori Guardian I'm a spammer
Reputation: 0
Joined: 19 Jun 2007 Posts: 6517 Location: http://forum.cheatengine.org/viewtopic.php?t=452539
|
Posted: Sat Aug 11, 2007 2:40 pm Post subject: |
|
|
Speaking of Vb help, can some1 help me with Keyboard events?
I tried
| Code: | Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.Escape Then
Button136.PerformClick()
MsgBox("Now Stopped", MessageBoxIcon.Information)
End If |
and
| Code: | Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
Select Case e.KeyValue.ToString
Case Windows.Forms.Keys.A
Timer3.Enabled = False
Timer4.Enabled = False
Timer5.Enabled = False
Case Windows.Forms.Keys.B
Timer3.Enabled = False
Case Windows.Forms.Keys.C
Timer4.Enabled = False
Case Windows.Forms.Keys.D
Timer5.Enabled = False
End Select
End Sub |
Nothing works, and i'm using Visual Basic 2008 Express Edition
Waht i'm basicly trying to do is when i press a key it stops my timer
_________________
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6301
|
Posted: Sun Aug 12, 2007 10:58 am Post subject: |
|
|
Far as i know this is how to stop and start timers
| Code: | Private Sub cmdStart_Click()
Timer1.Enabled = True 'Starts the time To start counting
End Sub
Private Sub cmdStop_Click()
Timer1.Enabled = False 'Stops the timer
End Sub |
|
|
| Back to top |
|
 |
i__h4x Grandmaster Cheater Supreme
Reputation: 0
Joined: 09 Jun 2007 Posts: 1005 Location: i__<3's__wpe
|
Posted: Sun Aug 12, 2007 11:19 am Post subject: |
|
|
SCRN, i already tried to explain.
That code is correct, if you try it on a blank form it will work. The reason it dosnt work is because that is the handle for MyBase.KeyDown.
You have the flashcontrol focused and so that is what needs to handle the key event, not the form.
_________________
Mes'a back!
 |
|
| Back to top |
|
 |
Kumori Guardian I'm a spammer
Reputation: 0
Joined: 19 Jun 2007 Posts: 6517 Location: http://forum.cheatengine.org/viewtopic.php?t=452539
|
Posted: Sun Aug 12, 2007 11:47 am Post subject: |
|
|
so all i need to change is
| Code: | | Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown |
?
_________________
|
|
| Back to top |
|
 |
i__h4x Grandmaster Cheater Supreme
Reputation: 0
Joined: 09 Jun 2007 Posts: 1005 Location: i__<3's__wpe
|
Posted: Sun Aug 12, 2007 11:51 am Post subject: |
|
|
No because i also said that the flash control dosnt have a keydown event handler.
http://msdn2.microsoft.com/en-us/library/k2kt7a7y(vs.80).aspx
Thats a short thing on writing event handlers, i didnt really read it but it might help, if not google something like 'Create event handle visual basic .net'
_________________
Mes'a back!
 |
|
| Back to top |
|
 |
Kumori Guardian I'm a spammer
Reputation: 0
Joined: 19 Jun 2007 Posts: 6517 Location: http://forum.cheatengine.org/viewtopic.php?t=452539
|
Posted: Sun Aug 12, 2007 12:05 pm Post subject: |
|
|
in other words it's impossible to make 1
_________________
|
|
| Back to top |
|
 |
i__h4x Grandmaster Cheater Supreme
Reputation: 0
Joined: 09 Jun 2007 Posts: 1005 Location: i__<3's__wpe
|
Posted: Sun Aug 12, 2007 12:13 pm Post subject: |
|
|
No. Its not.
Right, give me till 8pm and ill have done it (thats in 20 mins.)
_________________
Mes'a back!
 |
|
| Back to top |
|
 |
Pseudo Xero I post too much
Reputation: 0
Joined: 16 Feb 2007 Posts: 2607
|
Posted: Sun Aug 12, 2007 12:16 pm Post subject: |
|
|
| SCRN wrote: | in other words it's impossible to make 1  |
It's not... I've done it before in VB6 (Which is what I use)
|
|
| Back to top |
|
 |
Tosy How do I cheat?
Reputation: 0
Joined: 20 Jul 2007 Posts: 5
|
Posted: Sun Aug 12, 2007 12:19 pm Post subject: |
|
|
Zomg add a form rename it form2 and add this code to Command
Form2.Visible = True 'thats all
|
|
| Back to top |
|
 |
Pseudo Xero I post too much
Reputation: 0
Joined: 16 Feb 2007 Posts: 2607
|
Posted: Sun Aug 12, 2007 12:20 pm Post subject: |
|
|
| _ToSy_ wrote: | Zomg add a form rename it form2 and add this code to Command
Form2.Visible = True 'thats all |
You would use .Show, not .Visible for opening new forms.
|
|
| Back to top |
|
 |
i__h4x Grandmaster Cheater Supreme
Reputation: 0
Joined: 09 Jun 2007 Posts: 1005 Location: i__<3's__wpe
|
Posted: Sun Aug 12, 2007 12:36 pm Post subject: |
|
|
ok SCRN its done.
Ill post it in the dragonfable section later.
_________________
Mes'a back!
 |
|
| Back to top |
|
 |
|