亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xpbutton.ctl

?? 超市管理系統
?? CTL
?? 第 1 頁 / 共 5 頁
字號:
' pretty good way to determine when cursor moves outside of any shape region
' especially useful for my diagonal/round buttons since they are not your typical
' rectangular shape.

Dim mousePt As POINTAPI, cRect As RECT
GetCursorPos mousePt
If WindowFromPoint(mousePt.x, mousePt.y) <> UserControl.hwnd Then
    ' when exits button area, kill the timer
    KillTimer UserControl.hwnd, lvTimerID
    myProps.bStatus = myProps.bStatus And Not 4
    bTimerActive = False
    bNoRefresh = False
    RaiseEvent MouseOnButton(False)
    bKeyDown = False
    Refresh
End If
End Sub

Private Sub CalculateBoundingRects(adjWidth As Long, bFullRecalc As Boolean, Optional lEdge As Long)

' Routine measures and places the rectangles to draw
' the caption and image on the control. The results
' are cached so this routine doesn't need to run
' every time the button is redrawn/painted

Dim cRect As RECT, tRect As RECT, iRect As RECT
Dim imgOffset As RECT, bImgWidthAdj As Boolean, bImgHeightAdj As Boolean
Dim rEdge As Long, iEdge As Long

' calculations needed for diagonal buttons
Select Case myProps.bShape
Case lv_RightDiagonal
    rEdge = myProps.bSegPts.y + ((ScaleWidth - myProps.bSegPts.y) \ 3)
    adjWidth = rEdge
Case lv_LeftDiagonal
    lEdge = myProps.bSegPts.x - (myProps.bSegPts.x \ 3)
    rEdge = ScaleWidth
    adjWidth = ScaleWidth - lEdge
Case lv_FullDiagonal
    lEdge = myProps.bSegPts.x - (myProps.bSegPts.x \ 3)
    rEdge = myProps.bSegPts.y + ((ScaleWidth - myProps.bSegPts.y) \ 3)
    adjWidth = rEdge - lEdge
Case Else
    adjWidth = myProps.bSegPts.y
    rEdge = ScaleWidth
End Select
' return variables to drawing switchboard
If Not bFullRecalc Then Exit Sub

If (myImage.SourceSize.x + myImage.SourceSize.y) > 0 Then
    ' image in use, calculations for image rectangle
    If myImage.Size < 33 Then
        Select Case myImage.Align
        Case lv_LeftEdge, lv_LeftOfCaption
            imgOffset.Left = myImage.Size
            bImgWidthAdj = True
        Case lv_RightEdge, lv_RightOfCaption
            imgOffset.Right = myImage.Size
            bImgWidthAdj = True
        Case lv_TopCenter
            imgOffset.Top = myImage.Size
            bImgHeightAdj = True
        Case lv_BottomCenter
            imgOffset.Bottom = myImage.Size
            bImgHeightAdj = True
        End Select
    End If
End If


If Len(myProps.bCaption) Then
    Dim sCaption As String  ' note: Replace$ not compatible with VB5
    sCaption = Replace$(myProps.bCaption, "||", vbNewLine)
    ' calculate total available button width available for text
    cRect.Right = adjWidth - 12 - (myImage.Size * Abs(CInt(bImgWidthAdj)))
    cRect.Bottom = ScaleHeight - 12 - (myImage.Size * Abs(CInt(bImgHeightAdj = True And myImage.Align > lv_RightOfCaption)))
    ' calculate size of rectangle to hold that text, using multiline flag
    'DrawText ButtonDC.hDC, sCaption, Len(sCaption), cRect, DT_CALCRECT Or DT_WORDBREAK
    'Modify for Chinese
       'th = UserControl.TextHeight("gW")
       'th = UserControl.TextWidth("W")
       'tn = LenB(StrConv(elTex, vbFromUnicode))

    DrawText ButtonDC.hDC, sCaption, LenB(StrConv(sCaption, vbFromUnicode)), cRect, DT_CALCRECT Or DT_WORDBREAK
    
    If myProps.bCaptionStyle Then
        cRect.Right = cRect.Right + 2
        cRect.Bottom = cRect.Bottom + 2
    End If
End If

' now calculate the position of the text rectangle
If Len(myProps.bCaption) Then
    tRect = cRect
    Select Case myProps.bCaptionAlign
    Case vbLeftJustify
        OffsetRect tRect, imgOffset.Left + lEdge + 6 + (Abs(CInt(imgOffset.Left > 0) * 6)), 0
    Case vbRightJustify
        OffsetRect tRect, rEdge - imgOffset.Right - 6 - cRect.Right - (Abs(CInt(imgOffset.Right > 0) * 6)), 0
    Case vbCenter
        If imgOffset.Left > 0 And myImage.Align = lv_LeftOfCaption Then
            OffsetRect tRect, (adjWidth - (imgOffset.Left + cRect.Right + 6)) \ 2 + lEdge + 6 + imgOffset.Left, 0
        Else
            If imgOffset.Right > 0 And myImage.Align = lv_RightOfCaption Then
                OffsetRect tRect, (adjWidth - (imgOffset.Right + cRect.Right + 6)) \ 2 + lEdge, 0
            Else
                OffsetRect tRect, ((adjWidth - (imgOffset.Left + imgOffset.Right)) - cRect.Right) \ 2 + lEdge + imgOffset.Left, 0
            End If
        End If
    End Select
Else
    cRect.Bottom = -3
End If
If (myImage.SourceSize.x + myImage.SourceSize.y) > 0 Then
    ' finalize image rectangle position
    Select Case myImage.Align
    Case lv_LeftEdge
        iRect.Left = lEdge + 6
    Case lv_LeftOfCaption
        If Len(myProps.bCaption) Then
            iRect.Left = tRect.Left - 6 - imgOffset.Left
        Else
            iRect.Left = lEdge + 6
        End If
    Case lv_RightOfCaption
        If Len(myProps.bCaption) Then
            iRect.Left = tRect.Right + 6
        Else
            iRect.Left = rEdge - 6 - imgOffset.Right
        End If
    Case lv_RightEdge
        iRect.Left = rEdge - 6 - imgOffset.Right
    Case lv_TopCenter
        iRect.Top = (ScaleHeight - (cRect.Bottom + imgOffset.Top)) \ 2
        OffsetRect tRect, 0, iRect.Top + 2 + imgOffset.Top
    Case lv_BottomCenter
        iRect.Top = (ScaleHeight - (cRect.Bottom + imgOffset.Bottom)) \ 2 + cRect.Bottom + 3
        OffsetRect tRect, 0, iRect.Top - 2 - cRect.Bottom
    End Select
    If myImage.Align < lv_TopCenter Then
        OffsetRect tRect, 0, (ScaleHeight - cRect.Bottom) \ 2
        iRect.Top = (ScaleHeight - myImage.Size) \ 2
    Else
        iRect.Left = (adjWidth - myImage.Size) \ 2 + lEdge
    End If
    iRect.Right = iRect.Left + myImage.Size
    iRect.Bottom = iRect.Top + myImage.Size
Else
    OffsetRect tRect, 0, (ScaleHeight - cRect.Bottom) \ 2
End If
' sanity checks
If tRect.Top < 6 Then tRect.Top = 6
If tRect.Left < 6 Then tRect.Left = 6
If tRect.Right > rEdge Then tRect.Right = rEdge
If tRect.Bottom > ScaleHeight - 6 Then tRect.Bottom = ScaleHeight - 6
myProps.bRect = tRect
If iRect.Top < 6 Then iRect.Top = 6
If iRect.Left < 6 Then iRect.Left = 6
If iRect.Right > rEdge Then iRect.Right = rEdge
If iRect.Bottom > ScaleHeight - 6 Then iRect.Bottom = ScaleHeight - 6
myImage.iRect = iRect
End Sub

Private Sub GetSetOffDC(bSet As Boolean)

' This sets up our off screen DC & pastes results onto our control.

If bSet = True Then
    If ButtonDC.hDC = 0 Then
        ButtonDC.hDC = CreateCompatibleDC(UserControl.hDC)
        SetBkMode ButtonDC.hDC, 3&
        ' by pulling these objects now, we ensure no memory leaks &
        ' changing the objects as needed can be done in 1 line of code
        ' in the SetButtonColors routine
        ButtonDC.OldBrush = SelectObject(ButtonDC.hDC, CreateSolidBrush(0&))
        ButtonDC.OldPen = SelectObject(ButtonDC.hDC, CreatePen(0&, 1&, 0&))
        GetGDIMetrics "Font"
    End If
    If ButtonDC.OldBitmap = 0 Then
        Dim hBmp As Long
        hBmp = CreateCompatibleBitmap(UserControl.hDC, ScaleWidth, ScaleHeight)
        ButtonDC.OldBitmap = SelectObject(ButtonDC.hDC, hBmp)
    End If
Else
    BitBlt UserControl.hDC, 0, 0, ScaleWidth, ScaleHeight, ButtonDC.hDC, 0, 0, vbSrcCopy
End If
End Sub

Private Sub DrawRect(m_hDC As Long, ByVal X1 As Long, ByVal Y1 As Long, _
                                   ByVal X2 As Long, ByVal Y2 As Long, _
                                   tColor As Long, Optional pColor As Long = -1, _
                                   Optional PenWidth As Long = 0, Optional PenStyle As Long = 0)

' Simple routine to draw a rectangle

If pColor <> -1 Then SetButtonColors True, m_hDC, cObj_Pen, pColor, , PenWidth, , PenStyle
SetButtonColors True, m_hDC, cObj_Brush, tColor, (pColor = -1)
Call Rectangle(m_hDC, X1, Y1, X2, Y2)
End Sub


Private Sub SetButtonColors(bSet As Boolean, m_hDC As Long, TypeObject As ColorObjects, lColor As Long, _
    Optional bSamePenColor As Boolean = True, Optional PenWidth As Long = 1, _
    Optional bSwapPens As Boolean = False, Optional PenStyle As Long = 0)

' This is the basic routine that sets a DC's pen, brush or font color

' here we store the most recent "sets" so we can reset when needed
Dim tBrush As Long, tPen As Long
If bSet Then    ' changing a DC's setting
    Select Case TypeObject
    Case cObj_Brush         ' brush is being changed
        DeleteObject SelectObject(ButtonDC.hDC, CreateSolidBrush(lColor))
        If bSamePenColor Then   ' if the pen color will be the same
            DeleteObject SelectObject(ButtonDC.hDC, CreatePen(PenStyle, PenWidth, lColor))
        End If
    Case cObj_Pen   ' pen is being changed (mostly for drawing lines)
        DeleteObject SelectObject(ButtonDC.hDC, CreatePen(PenStyle, PenWidth, lColor))
    Case cObj_Text  ' text color is changing
        SetTextColor m_hDC, ConvertColor(lColor)
    End Select
Else            ' resetting the DC back to the way it was
    DeleteObject SelectObject(ButtonDC.hDC, ButtonDC.OldBrush)
    DeleteObject SelectObject(ButtonDC.hDC, ButtonDC.OldPen)
End If
End Sub

Private Function ConvertColor(tColor As Long) As Long

' Converts VB color constants to real color values

If tColor < 0 Then
    ConvertColor = GetSysColor(tColor And &HFF&)
Else
    ConvertColor = tColor
End If
End Function

Private Sub CreateButtonRegion()

' this function creates the regions for the specific type of button style

Dim rgnA As Long, rgnB As Long, rgn2Use As Long
Dim lRatio As Single, lEdge As Long, rEdge As Long, Wd As Long
Dim ptTRI(0 To 9) As POINTAPI

myProps.bSegPts.x = 0
myProps.bSegPts.y = ScaleWidth
rgnB = CreateRectRgn(0, 0, 0, 0)

If ButtonDC.ClipRgn Then
    ' this was set for round buttons
    SelectClipRgn ButtonDC.hDC, 0
    DeleteObject ButtonDC.ClipRgn
    ButtonDC.ClipRgn = 0
End If
Select Case myProps.bShape
  Case lv_Round3D, lv_Round3DFixed, lv_RoundFlat
    rgn2Use = CreateEllipticRgn(0, 0, ScaleWidth + 1, ScaleHeight + 1)
    ButtonDC.ClipRgn = CreateEllipticRgn(2 - Abs(myProps.bShape < lv_RoundFlat), 2 - Abs(myProps.bShape < lv_RoundFlat), ScaleWidth - 1 + Abs(myProps.bShape < lv_RoundFlat), ScaleHeight - 1 + Abs(myProps.bShape < lv_RoundFlat))
  Case lv_Rectangular
    rgn2Use = CreateRectRgn(0, 0, ScaleWidth + 1, ScaleHeight + 1)
    Select Case myProps.bBackStyle
        Case 1 'Windows 16-bit
            GoSub LopOffCorners1
            GoSub LopOffCorners2
        Case 2, 7
            GoSub LopOffCorners3
            GoSub LopOffCorners4
        Case 3    'Java
            If UserControl.Enabled Then
                GoSub LopOffCorners1
                GoSub LopOffCorners2
            End If
    End Select
  
  Case Else
    ' here is my trick for ensuring a sharp edge on diagonal buttons.
    ' Basically a bastardized carpenters formula for right angles
    ' (i.e., 3+4=5 < the hypoteneus). Here I want a 60 degree angle,
    ' and not a 45 degree angle. The difference is sharp or choppy.
    ' Based off of the button height, I need to figure how much of
    ' the opposite end I need to cutoff for the diagonal edge
    lRatio = (ScaleHeight + 1) / 4
    Wd = ScaleWidth
    lEdge = (4 * lRatio)
    ' here we ensure a width of at least 5 pixels wide
    Do While Wd - lEdge < 5
        Wd = Wd + 5
    Loop
    If Wd <> ScaleWidth Then
        ' resize the control if necessary
        DelayDrawing True
        UserControl.Width = ScaleX(Wd, vbPixels, Parent.ScaleMode)
        myProps.bSegPts.y = ScaleWidth
        bNoRefresh = False
    End If
    rEdge = ScaleWidth - lEdge
    ' initial dimensions of our rectangle
    ptTRI(0).x = 0: ptTRI(0).y = 0
    ptTRI(1).x = 0
    ptTRI(1).y = ScaleHeight + 1
    ptTRI(2).x = ScaleWidth + 1
    ptTRI(2).y = ScaleHeight + 1
    ptTRI(3).x = ScaleWidth + 1
    ptTRI(3).y = 0
    ' now modify the left/right side as needed
    If myProps.bShape = lv_FullDiagonal Or myProps.bShape = lv_LeftDiagonal Then
        ptTRI(1).x = lEdge  ' left portion
        myProps.bSegPts.x = lEdge
    End If
    If myProps.bShape = lv_FullDiagonal Or myProps.bShape = lv_RightDiagonal Then
        ptTRI(3).x = rEdge + 1        ' bottom right
        myProps.bSegPts.y = rEdge
    End If
    ' for rounded corner buttons, we'll take of the corner pixels where appropriate when the
    ' diagonal button is not a fully-segmeneted type. Diagonal edges are always sharp,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
首页国产丝袜综合| 日韩久久一区二区| 国产在线精品不卡| 久久嫩草精品久久久久| 国产乱子伦一区二区三区国色天香 | 91色在线porny| 一区二区久久久久久| 欧美二区乱c少妇| 精品在线亚洲视频| 中文久久乱码一区二区| 色综合久久综合| 日韩专区中文字幕一区二区| 精品欧美一区二区久久| 波多野结衣精品在线| 亚洲综合久久久久| 欧美一区二区三区白人| 国产成人精品亚洲午夜麻豆| 一区二区三区免费看视频| 337p亚洲精品色噜噜噜| 国产一区二区0| 亚洲在线观看免费| 精品国产免费一区二区三区四区| 成人午夜电影小说| 石原莉奈一区二区三区在线观看| www欧美成人18+| 色综合天天做天天爱| 奇米一区二区三区av| 国产精品福利一区| 日韩午夜在线观看视频| 99精品视频在线免费观看| 麻豆91在线播放| 亚洲另类在线制服丝袜| 久久综合九色综合97婷婷女人 | 久久久久久久久蜜桃| 在线观看亚洲精品| 国产在线精品不卡| 首页亚洲欧美制服丝腿| 日韩毛片视频在线看| 精品久久久三级丝袜| 色噜噜夜夜夜综合网| 国产精品资源在线| 午夜欧美在线一二页| 中文字幕一区在线| 久久亚洲免费视频| 5月丁香婷婷综合| 91视视频在线观看入口直接观看www | 成人精品电影在线观看| 免费在线成人网| 亚洲午夜视频在线| 一区二区三区在线免费观看| 久久久久97国产精华液好用吗| 欧美乱妇15p| 欧美午夜精品一区二区蜜桃| 成人蜜臀av电影| 精品中文av资源站在线观看| 婷婷综合五月天| 亚洲精选视频免费看| 国产精品视频九色porn| 精品国产91洋老外米糕| 4438x成人网最大色成网站| 91在线看国产| 91欧美激情一区二区三区成人| 国产成人免费9x9x人网站视频| 美女一区二区视频| 五月综合激情网| 一区二区三区在线免费视频| 亚洲精品菠萝久久久久久久| 国产精品久久久久久久久搜平片| 国产日产欧美精品一区二区三区| 精品剧情在线观看| www国产成人| 久久综合九色综合久久久精品综合| 日韩视频一区二区| 日韩一区国产二区欧美三区| 欧美一区二区在线看| 欧美精品久久一区| 欧美老女人第四色| 欧美一二三在线| 精品美女在线播放| 久久综合九色综合97婷婷女人 | 91亚洲精品乱码久久久久久蜜桃| 国产成人亚洲精品青草天美| 国产不卡在线一区| eeuss鲁片一区二区三区在线观看| 不卡视频免费播放| 91丨porny丨蝌蚪视频| 欧美性色综合网| 欧美日韩激情一区二区| 日韩欧美电影在线| 久久久午夜精品理论片中文字幕| 国产色综合一区| 中文字幕在线不卡一区二区三区| 综合久久久久久久| 亚洲主播在线播放| 另类小说视频一区二区| 国产伦理精品不卡| 一本色道久久综合亚洲精品按摩| 欧美亚洲一区二区三区四区| 91超碰这里只有精品国产| 日韩欧美国产成人一区二区| 欧美激情一区二区在线| 一区二区免费在线| 轻轻草成人在线| 粉嫩一区二区三区在线看| 色偷偷久久一区二区三区| 91精品在线观看入口| 久久久国产一区二区三区四区小说| 中文成人av在线| 午夜精彩视频在线观看不卡| 国产综合色在线| 成人综合激情网| 欧美性受极品xxxx喷水| 精品处破学生在线二十三| 亚洲欧美在线高清| 人禽交欧美网站| av成人免费在线观看| 欧美日韩国产免费一区二区| 91精品国产综合久久久久久| 成人免费精品视频| 91日韩精品一区| 日韩视频免费观看高清在线视频| 国产精品大尺度| 午夜精品aaa| 成人黄色av网站在线| 欧美精品在线视频| 中文字幕中文字幕中文字幕亚洲无线 | 精品久久久久久综合日本欧美| 国产精品久久久久久久久果冻传媒| 日韩经典一区二区| 成人av资源在线| 亚洲精品一区二区在线观看| 亚洲男人天堂一区| 国产精品自在在线| 欧美一区二区三区系列电影| 一区在线中文字幕| 国产毛片一区二区| 欧美一区二区三区在线电影 | 婷婷丁香久久五月婷婷| 99国产一区二区三精品乱码| 精品国产91乱码一区二区三区 | 欧美大片日本大片免费观看| 一区二区欧美国产| 94-欧美-setu| 国产精品美女久久久久久| 精品一区二区三区视频在线观看| 欧美性猛片xxxx免费看久爱 | 亚洲国产美女搞黄色| 欧美日韩第一区日日骚| 日韩毛片在线免费观看| 成人黄色综合网站| 久久久91精品国产一区二区三区| 日本成人在线网站| 欧美三级电影一区| 亚洲综合小说图片| 色网综合在线观看| 亚洲精品一二三| 色婷婷综合在线| 亚洲欧美日韩在线| 成人av在线看| 国产精品毛片大码女人| 国产91丝袜在线18| 国产女人水真多18毛片18精品视频| 精品一区精品二区高清| 欧美不卡在线视频| 乱中年女人伦av一区二区| 日韩欧美激情四射| 久久99国产精品麻豆| 日韩精品一区二| 国产老肥熟一区二区三区| 久久久精品综合| 国产成人午夜电影网| 国产精品理论在线观看| 91女人视频在线观看| 亚洲最色的网站| 在线电影一区二区三区| 免费成人av资源网| 精品国产免费一区二区三区四区 | 日韩亚洲欧美高清| 激情深爱一区二区| 国产欧美综合在线| 成人看片黄a免费看在线| 亚洲日本成人在线观看| 欧美性色综合网| 麻豆国产精品一区二区三区| 久久婷婷综合激情| 成人成人成人在线视频| 亚洲精品免费在线观看| 欧美精品1区2区| 国产在线一区观看| 国产精品久久久久久亚洲毛片 | 69p69国产精品| 国产一区美女在线| 国产精品国产精品国产专区不蜜| 色综合久久88色综合天天| 亚洲午夜激情网页| 日韩欧美综合一区| 97se亚洲国产综合自在线| 亚洲电影第三页| 久久久综合精品| 91黄色免费网站|