[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! :)
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.
Re: Can i make line of codes to tag like dim?