27 Сентябрь 2008

Как можно изменить форму CommandButton?

CommandButton |  Таги: , , , , ,

Как можно изменить форму CommandButton?
Можно обрезать края кнопки и добиться интересного эффекта.
Попробуйте изменить цифры и посмотрите результат.

Option Explicit

Private Declare Function CreateEllipticRgn Lib "gdi32" _
    (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, _
     ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, _
    ByVal hRgn As Long, ByVal bRedraw As Long) As Long
Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As Koor, _
    ByVal nCount As Long, ByValnPolyFillMode As Long) As Long
Private Type Koor
   X As Long
   Y As Long
End Type

Private Sub Form_Load()
Dim MakeCircle As String
MakeCircle = CreateEllipticRgn(100 / Screen.TwipsPerPixelX, _
     100 / Screen.TwipsPerPixelY, 1400 / Screen.TwipsPerPixelX, _
     400 / Screen.TwipsPerPixelY)
Call SetWindowRgn(Command1.hWnd, MakeCircle, True)
End Sub


Оставить комментарий

Я не робот.


nokia x2 и nokia x2 в россии москва.