Results 1 to 3 of 3

Thread: Event during the ReadProperties

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2009
    Posts
    2

    Event during the ReadProperties

    i have created a Activex which fills a list during the ReadProperties event. Before filling the list method fires a event to allow the user to set the filter or criteria. when i use this activex in form the first time fill event is not visible i.e during the form load, if i re-fill the activex after loading the form, the event works fine. what is the problem plz help.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Event during the ReadProperties

    I don't think any events will be raised during ReadProperties. You can try this little test for confirmation....

    1. In your usercontrol add this public event
    Public Event EventRaising(FromMethod As String)

    2. In your usercontrol's ReadProperties event, add this:
    RaiseEvent EventRaising("ReadProperties")

    3. Add similar code to other methods/events like Show, Resize
    You should get the event in Show

    4. In your form, respond to the EventRaising event with:
    Debug.Print "Got Event from " & FromMethod

    You may want to test this with a compiled usercontrol also? Maybe behavior is different? Don't know.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2009
    Posts
    2

    Re: Event during the ReadProperties

    Thanks LaVolpe
    I have already checked there are no events raised during readproperies. Let me explain the problem in detail.
    I have created a usercontrol which has many listboxes. i fill the listboxes from database at readproperties but before quering the database i want to let the user set the filter dynamically. So before filling it raise a event Filter (lstIndex as integer, sFilter as string). As the events during readproperties never occurrs so user can't set filter first time. but when after loading the form if refill the listboxes the event works fine. Plz help how i can handle this situation. Is there any way to raise events during readproperties.

    Plz note i have created a Refresh method in usercontrol also, which is called in Form_Active which works but I am not satified with it. it increases loading time for heavily populated tables.

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