Results 1 to 22 of 22

Thread: [RESOLVED] i'm tryng clean a string without sucess:(

Hybrid View

  1. #1
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: i'm tryng clean a string without sucess:(

    Logic errors are sometimes the hardest to find
    Syntax errors are the easiest.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  2. #2

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Re: i'm tryng clean a string without sucess:(

    Quote Originally Posted by LaVolpe View Post
    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
    VB6 2D Sprite control

    To live is difficult, but we do it.

  3. #3

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    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
    VB6 2D Sprite control

    To live is difficult, but we do it.

  4. #4

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    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
    VB6 2D Sprite control

    To live is difficult, but we do it.

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