CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2000
    Posts
    72

    can i generate an event?

    i want generate a click event in a list box without actually clicking.ie, through the program.

    exact problem:
    at the end of adding items in a listbox,i would like to eliminate multiple entries.
    in my click event is the code for the same.can i generate a click event through code?


  2. #2
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: can i generate an event?

    If you have Code in your Lists Click Event, just Call it like you would a Sub, ie.

    List1_Click

    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

  3. #3
    Join Date
    Jan 2000
    Posts
    72

    Re: can i generate an event?

    are u sure?
    can i do that from a module?
    formname.list1_click does not seem to work for me.


  4. #4
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: can i generate an event?

    Now you never mentioned wanting to call it from a Module...

    To do that you would have to change the List1_Click Sub Declaration from Private to Public, then use:

    Formname.List1_Click

    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

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

Featured