Last active
December 29, 2015 09:29
-
-
Save facebookegypt/7650439 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 'Visual Basic Online Course | |
| 'VB6 Create Rounded and Transparent Form | |
| 'FrmShapedForm Code | |
| Option Explicit | |
| Dim mChildFormRegion As Long | |
| Private Sub Form_Load() | |
| Dim i | |
| Me.WindowState = vbNormal | |
| Me.Text1.Text = "A demonstration of a shaped" & vbCrLf & _ | |
| "form. Unlike transparent form," & vbCrLf & _ | |
| "you can now drag on the visible" & vbCrLf & _ | |
| "parts of the shaped form." | |
| If mShape = 0 Then | |
| mChildFormRegion = CreateRoundRectRgn(0, 0, Me.Width / xp, Me.Height / yp, 40, 40) | |
| ElseIf mShape = 1 Then | |
| mChildFormRegion = CreateEllipticRgn(0, 0, Me.Width / xp, Me.Height / yp) | |
| Else | |
| i = (Me.Width / xp - Me.Height / yp) / 2 | |
| mChildFormRegion = CreateEllipticRgn(i, 0, i + Me.Height / xp, Me.Height / yp) | |
| End If | |
| SetWindowRgn Me.hwnd, mChildFormRegion, False | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment