|
-
Jul 21st, 2005, 03:09 AM
#1
Thread Starter
Lively Member
[RESOLVED] Hidden Trick
I'm nearing completion on a product for the company I work at and I want to add a little extra to it...
The app loads up fine, im just adding a reporting feature at the moment, but what I want to add is this:
When the app loads, if the user holds down - Ctrl + Alt + J + N
Those four keys, a popup box will come up saying "Coded by Justin Nel" and possibly loads up an image file which would be embedded into the actual EXE.
How could I do such a thing?
Cheers
-
Jul 21st, 2005, 03:41 AM
#2
Re: Hidden Trick
I don't think you'll be able to do it with Ctrl+Alt because you can't detect consecutive KeyDown events for different keys with the Alt key down. This works with Ctrl+Shift. Set the form's KeyPreview property to True and:
VB Code:
Private jDown As Boolean = False 'Whether the J key is depressed.
Private nDown As Boolean = False 'Whether the N key is depressed.
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.J Then
Me.jDown = True
ElseIf e.KeyCode = Keys.N Then
Me.nDown = True
End If
If e.Control AndAlso e.Shift AndAlso Me.jDown AndAlso Me.nDown Then
MessageBox.Show("Coded by Justin Nel")
End If
End Sub
Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp
If e.KeyCode = Keys.J Then
Me.jDown = False
ElseIf e.KeyCode = Keys.N Then
Me.nDown = False
End If
End Sub
-
Jul 21st, 2005, 05:20 AM
#3
Thread Starter
Lively Member
-
Jul 21st, 2005, 06:21 AM
#4
Re: [RESOLVED] Hidden Trick
I did something similar where you clicked the form hit space 3 times and then let go of the mouse.
I don't live here any more.
-
Jul 21st, 2005, 06:33 AM
#5
Thread Starter
Lively Member
Re: [RESOLVED] Hidden Trick
 Originally Posted by wossname
I did something similar where you clicked the form hit space 3 times and then let go of the mouse.
Sounds interesting, care to share?
-
Jul 26th, 2005, 08:26 PM
#6
Re: [RESOLVED] Hidden Trick
By the way, this type of "hidden goodie" is called an Easter Egg.
-
Dec 29th, 2005, 05:11 AM
#7
Hyperactive Member
Re: [RESOLVED] Hidden Trick
 Originally Posted by wossname
I did something similar where you clicked the form hit space 3 times and then let go of the mouse.
How can I do something like that?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|