|
-
Apr 22nd, 2009, 04:53 AM
#11
Re: Select Case Statement Question
 Originally Posted by Pradeep1210
The .Top is never changing. You should better use SELECT.. CASE on the .Height property.
vb Code:
If .Top <= 0 Then
Select Case .Height
Case Is < UserControl.Height
MsgBox("")
Case Is > UserControl.Height
MsgBox("")
End Select
End If
This is very similar to my code in post#7 that I brought UserControl.Height up to Select Case line, by that way the code needs to access to UserControl's properties at maximum of once, perhaps 1 nano second can be saved!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|