|
-
Dec 4th, 2009, 09:45 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Can i make line of codes to tag like dim?
I have whole list of code. If i press button1 then happens.
[----------CODE HERE----------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
If i press enter then happens.
[----------CODE HERE----------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
Can i make it smaller like.
Code =
[----------CODE HERE----------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
[--------ANOTHER LINE---------]
If i press button1 then happens = Code
If i press enter then happens = Code
Thanks!
-
Dec 4th, 2009, 09:57 AM
#2
Re: Can i make line of codes to tag like dim?
You simply put the code in a method and then call that method from multiple places, e.g. a Button Click event handler and a KeyDown event handler. With Buttons specifically, another option is to put the code in the Button Click event handler and then call PerformClick on that Button elsewhere in code.
-
Dec 4th, 2009, 11:07 AM
#3
Thread Starter
Hyperactive Member
Re: Can i make line of codes to tag like dim?
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
|