|
-
Aug 23rd, 2003, 04:38 PM
#1
Thread Starter
Lively Member
Text Box, Text Changed Handler HELP
AddHandler cmd.TextChanged, AddressOf TextBox_TextChanged
AddHandler cmd.KeyPress, AddressOf TextBox_TextChanged
Have the above lines so I can do stuff when the text in textbox cmd is changed. Not sure where to put them though.
If I put it in Public Class MainForm I get a syntax error.
If I put it in fMainForm_Load sub I get
Name TextBox_TextChanged is not declared
Any idea what im doing wrong
Thanks
-
Aug 23rd, 2003, 06:23 PM
#2
have you actually got the TextBox_TextChanged event on your form's code screen? eg:
VB Code:
[COLOR=BLUE]Private[/COLOR] [COLOR=BLUE]Sub[/COLOR] TextBox_TextChanged([COLOR=BLUE]ByVal[/COLOR] sender [COLOR=BLUE]As[/COLOR] [COLOR=BLUE]Object[/COLOR], [COLOR=BLUE]ByVal[/COLOR] e [COLOR=BLUE]As[/COLOR] System.EventArgs) [COLOR=BLUE]Handles[/COLOR] TextBox.TextChanged
[COLOR=GREEN]'/// you need this declared in your form.[/color]
[COLOR=BLUE]End[/COLOR] [COLOR=BLUE]Sub[/COLOR]
if you haven't got the above on your code screen it will give you the error
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
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
|