| Welcome to Abstracted.View. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Note program; Visual Basic.NET | |
|---|---|
| Topic Started: Jul 18 2006, 05:37 PM (254 Views) | |
| Hacker-X | Jul 18 2006, 05:37 PM Post #1 |
|
Dedicated Member
![]() ![]() ![]() ![]() ![]() ![]()
|
You should end up having something like this at the end of the tutorial:![]() Lets start by creating a textbox with these settings: Anchor: Top, Bottom, Left, Right Multiline: True ScrollBars: Vertical Add a font dialog. Add a timer with these settings: Name: TmrListen Interval: 10 Make a label with these settings: Name: Label1 Anchor: Top, Left Text: Notes Next we'll make a checkbox with these settings: Anchor: Top, Right Text: Make me topmost To hide our form we'll need a button with these settings: Name: Button4 Anchor: Top, Right Text: Hide To minimize our form we'll need another button with these settings: Name: Button2 Anchor: Top, Right Text: - In order to close our form we'll need an additional button with these settings: Name: Button1 Anchor: Top, Right Text: X To change font we'll need to add one last button, with these settings: Name: Button3 Anchor: Bottom, Left Text: Change Font We'll need a label, with these settings: Name: Label2 Anchor: Bottom, Right Text: Opacity And the final control, a trackbar, with these settings: Anchor: Bottom, Right Maximum: 100 Tickfrequency: 20 Tickstyle: TopLeft Value: 100 Change the form settings to: BackColor: White Controlbox: False FormBorderStyle: Sizeable Showintaskbar: False Text: (None) On to the code: This API is used to listen for keys to be pressed. We have to use the integer data type otherwise we'll cause a PInvoke error.
This'll allow the form to close when the close button is clicked.
This code will change the form opacity when the trackbar moves.
This will let the form move when you click on the form.
Minimizes the form.
Make the font dialog pop-up.
Assign the timer to listen for keys. (If you want to change the key combination then scroll down to the end of the tutorial.)
Pops-up a message box telling the user what key combination to use to show the form again.
Decides whether or not to make the form topmost or not.
Put a check in the "Make me topmost" checkbox on form load.
Changing the key combination. If you want to use different key combinations then navigate your browser to http://www.xamlon.com/docs/swfnative/SwfNative.KeyCode.html to get the correct keycode. Here's an example,
The GetAsyncKeyState is calling the API and in order to use this API we must specify what key using keycodes. If you want multiple keys to show the note program we just made you can use the OR, or AND operators. Not bad for 10 minutes of work, right? |
![]() |
|
| + Missingo | Jul 18 2006, 07:07 PM Post #2 |
|
Dedicated member
![]() ![]() ![]() ![]() ![]()
|
Very nice. |
| Its too late its too late....they wont let go...they wont let go...follow my foot steps through that open door...open door....It must be very under the heart that makes this place so insane youll find in time that the gates have been upon | |
![]() |
|
| Hacker-X | Jul 19 2006, 09:56 AM Post #3 |
|
Dedicated Member
![]() ![]() ![]() ![]() ![]() ![]()
|
Thanks, took a while to write. Did you get VB.NET running? |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Visual Basic · Next Topic » |





![]](http://209.85.12.237/static/1/pip_r.png)




12:07 AM Nov 25