|
-
Jan 3rd, 2010, 01:50 PM
#1
Re: i'm tryng clean a string without sucess:(
Logic errors are sometimes the hardest to find 
Syntax errors are the easiest.
-
Jan 3rd, 2010, 01:56 PM
#2
Thread Starter
PowerPoster
Re: i'm tryng clean a string without sucess:(
 Originally Posted by LaVolpe
Logic errors are sometimes the hardest to find 
Syntax errors are the easiest.
yes, that true. and sometimes can give n "headheck".
sorry, if i bored you with my code problems
and thank you for help me
-
Jan 3rd, 2010, 02:07 PM
#3
Thread Starter
PowerPoster
Re: i'm tryng clean a string without sucess:(
at leats i can delete the string value. now i must do the animater cursor be show, only when the mouse is in uc
-
Jan 3rd, 2010, 02:14 PM
#4
Thread Starter
PowerPoster
Re: i'm tryng clean a string without sucess:(
finally i resolve the problem
Code:
Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If x > MousePos.x Then
mdMouseDirection = MouseDirectionRight
ElseIf x < MousePos.x Then
mdMouseDirection = MouseDirectionLeft
ElseIf y < MousePos.y Then
mdMouseDirection = MouseDirectionUp
ElseIf y > MousePos.y Then
mdMouseDirection = MouseDirectionDown
ElseIf x < MousePos.x And y < MousePos.y Then
mdMouseDirection = MouseDirectionLeftUp
ElseIf x < MousePos.x And y > MousePos.y Then
mdMouseDirection = MouseDirectionLeftDown
ElseIf x > MousePos.x And y < MousePos.y Then
mdMouseDirection = MouseDirectionRightDown
ElseIf x < MousePos.x And y > MousePos.y Then
mdMouseDirection = MouseDirectionRightUp
End If
MousePos.x = x
MousePos.y = y
mbMouseButton = Button
skShift = Shift
With UserControl
If GetCapture <> .hWnd Then SetCapture .hWnd
If ((x < 0 Or y < 0 Or x > .ScaleWidth Or y > .ScaleHeight) Or IIf(traTransparent = TransparentAutomatic Or traTransparent = TransparentManualy, GetPixel(UserControl.hDC, MousePos.x, MousePos.y) = UserControl.Backcolor, GetPixel(UserControl.hDC, MousePos.x, MousePos.y) = -1)) Then ' we're off the form
ReleaseCapture
blnEnter = False
MouseOverControl = 0
RaiseEvent MouseExit(mbMouseButton, skShift, CLng(MousePos.x), CLng(MousePos.y), mdMouseDirection)
mdMouseDirection = MouseDirectionNone
If UCase(strMouseIcon) Like "*.ANI" = True And UserControl.MousePointer = 99 Then
RestoreLastCursor
End If
Else
If blnEnter = False Then
blnEnter = True
lngOldMouseX = MousePos.x
lngOldMouseY = MousePos.y
MouseOverControl = UserControl.hWnd
RaiseEvent MouseEnter(mbMouseButton, skShift, x, y, mdMouseDirection)
If UCase(strMouseIcon) Like "*.ANI" = True Then
SaveLastCursor
StartAnimatedCursor strMouseIcon
End If
End If
End If
End With
RaiseEvent MouseMove(mbMouseButton, skShift, x, y, mdMouseDirection)
End Sub
Public Property Get MouseIcon() As String
MouseIcon = strMouseIcon
End Property
Public Property Let MouseIcon(ByVal vNewValue As String)
strMouseIcon = vNewValue
If ValidMouse(UCase(strMouseIcon)) = False Then
UserControl.MousePointer = 0
UserControl.MouseIcon = Nothing
Exit Property
End If
If UCase(strMouseIcon) Like "*.ANI" = True Then
UserControl.MousePointer = 99
Else
UserControl.MousePointer = 99
UserControl.MouseIcon = LoadPicture(strMouseIcon)
End If
PropertyChanged "MouseIcon"
End Property
nothing better that reduce some lines
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
|