-
-
Save facebookegypt/9e3dc4c2a0d257a6341b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, _ | |
ByVal hRgn As Long, _ | |
ByVal bRedraw As Boolean) As Long | |
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 DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long | |
Dim X As Single | |
Dim Y As Single | |
Private Sub Form_Load() | |
Dim RGN As Long | |
With Me | |
.Width = Val(310 * 15) | |
.Height = Val(310 * 15) | |
.Left = (Screen.Width - .Width) / 2 | |
.Top = (Screen.Height - .Height) / 2 | |
.Picture = LoadPicture(App.Path & "/analog clock1.JPG") | |
.BackColor = vbWhite | |
X = .Width / 2 | |
Y = .Height / 2 | |
End With | |
'Make a round shaped form... | |
RGN = CreateEllipticRgn(0, 0, 310, 310) | |
Call SetWindowRgn(Me.hwnd, RGN, True) | |
Call DeleteObject(RGN) | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment