CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    15

    Handling multiple clicks

    Hi,
    I need your help badly.
    I have a client of mine who is using TrueDBGrid.
    If he clicks over one of the cells many times
    his grid freezes for sometime.
    I understand that this happens due the fact that
    VB takes time to process those clicks.
    I tried DoEvents however, that makes the program
    to end.
    Is there a way to minimize the time taken by VB
    to process those clicks and so that the grid doesn't
    appear to be frozen?
    Please help me out someone.
    Any kind of pointers would also be appreciated.
    Thanks in advance.
    Regards,
    Purnima



  2. #2
    Join Date
    Jul 2000
    Location
    UK
    Posts
    37

    Re: Handling multiple clicks

    What I do is put a variable in the function which it true if the code is being processed, so the first thing that happens if it is called again is it exits the routine. i.e

    sub grid_click()
    static bWorking as boolean

    if bWorking then exit sub
    bWorking=true
    {code}
    bWorking=false
    exit sub




    Regards

    Anne Wright
    Wright Computing

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