Results 1 to 2 of 2

Thread: Text Box, Text Changed Handler HELP

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2001
    Posts
    83

    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

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    have you actually got the TextBox_TextChanged event on your form's code screen? eg:
    VB Code:
    1. [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
    2.     [COLOR=GREEN]'/// you need this declared in your form.[/color]
    3. [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
  •  



Click Here to Expand Forum to Full Width