home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,623 of 10,840   
   J French to All   
   Re: Trouble with Click and DblClick   
   20 Jul 05 07:56:32   
   
   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)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca