From: erewhon@nowhere.uk   
      
   On Tue, 19 Jul 2005 15:13:12 +0200, "MFC"    
   wrote:   
      
   >Hi   
   >   
   >I'm from Denmark so I hope you understand my English. Well, I have a filebox   
   >and when I click on a picture-file, then I have a small picturebox, where I   
   >can preview the file. When I double-click on a file, then should the program   
   >load the file to a editor, but no matter how fast I double-click, then the   
   >filebox assume it's a single click. How can I use the Click and the DblClick   
   >with the filebox control ?? I hope someone is able to help me and thanks   
   >for reading my post.   
      
   You could try doing something like this :-   
      
   Private Sub File1_Click()   
    Timer1.Interval = 500   
    Timer1.Enabled = True   
   End Sub   
      
   Private Sub File1_DblClick()   
    Timer1.Enabled = False   
    Me.Print "Double"   
   End Sub   
      
   Private Sub Timer1_Timer()   
    Timer1.Enabled = False   
    Me.Print "Click"   
   End Sub   
      
   You should really get the system's DoubleClickTime   
      
   Private Declare Function GetDoubleClickTime _   
    Lib "user32" () As Long   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|