www.pudn.com > SuperDLL2.zip > frmTransparent.frm
VERSION 5.00
Object = "{FE0065C0-1B7B-11CF-9D53-00AA003C9CB6}#1.1#0"; "comct232.ocx"
Begin VB.Form frmTransparent
BorderStyle = 1 'Fixed Single
Caption = "Transparent"
ClientHeight = 4464
ClientLeft = 48
ClientTop = 336
ClientWidth = 4692
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4464
ScaleWidth = 4692
StartUpPosition = 2 'CenterScreen
Begin VB.TextBox Text1
Alignment = 2 'Center
Height = 288
Left = 2640
Locked = -1 'True
TabIndex = 12
TabStop = 0 'False
Text = "255"
Top = 3720
Width = 408
End
Begin ComCtl2.UpDown UpDown1
Height = 288
Left = 3048
TabIndex = 10
Top = 3720
Width = 252
_ExtentX = 445
_ExtentY = 508
_Version = 327681
Value = 255
BuddyControl = "Text1"
BuddyDispid = 196610
OrigLeft = 3600
OrigTop = 3720
OrigRight = 3852
OrigBottom = 3972
Increment = 16
Max = 255
Min = 31
SyncBuddy = -1 'True
BuddyProperty = 65547
Enabled = -1 'True
End
Begin VB.CommandButton Command8
Caption = "Fade To Trans Value"
Height = 492
Left = 2400
TabIndex = 9
Top = 3000
Width = 1932
End
Begin VB.CommandButton Command6
Caption = "Set Transparent Value"
Height = 492
Left = 360
TabIndex = 8
Top = 3000
Width = 1932
End
Begin VB.CommandButton Command9
Caption = "Make &Transparent"
Height = 492
Left = 2400
TabIndex = 7
Top = 2400
Width = 1932
End
Begin VB.CommandButton Command7
Caption = "Make &Opaque"
Height = 492
Left = 360
TabIndex = 6
Top = 2400
Width = 1932
End
Begin VB.CommandButton Command5
Caption = "Get Transparent Value"
Height = 492
Left = 2400
TabIndex = 5
Top = 1800
Width = 1932
End
Begin VB.CommandButton Command10
Caption = "Transparent ?"
Height = 492
Left = 360
TabIndex = 4
Top = 1800
Width = 1932
End
Begin VB.CommandButton Command4
Caption = "TRANSPARENT FORM"
Height = 492
Left = 2400
TabIndex = 3
Top = 960
Width = 1932
End
Begin VB.CommandButton Command2
Caption = "FORM && &BUTTONS FROM PICTURES"
Height = 492
Left = 360
TabIndex = 1
Top = 960
Width = 1932
End
Begin VB.CommandButton Command3
Caption = "SHAPED FORM"
Height = 492
Left = 2400
TabIndex = 2
Top = 360
Width = 1932
End
Begin VB.CommandButton Command1
Caption = "FORM WITH &MASK"
Height = 492
Left = 360
TabIndex = 0
Top = 360
Width = 1932
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Transparent Value :"
Height = 192
Left = 720
TabIndex = 11
Top = 3756
Width = 1692
WordWrap = -1 'True
End
End
Attribute VB_Name = "frmTransparent"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
frmMask.Show
End Sub
Private Sub Command10_Click()
MsgBox isTransparent(Me)
End Sub
Private Sub Command2_Click()
frmButtons.Show
End Sub
Private Sub Command3_Click()
frmShapes.Show
End Sub
Private Sub Command4_Click()
frmTrans.Show
End Sub
Private Sub Command5_Click()
Dim qwe As String
If isTransparent(Me) = LWA_COLORKEY Then
qwe = Hex(GetTrans(Me))
While Len(qwe) < 6
qwe = "0" & qwe
Wend
MsgBox "BGR : " & qwe
Else
MsgBox GetTrans(Me)
End If
End Sub
Private Sub Command6_Click()
Me.BackColor = &H8000000F
SetTrans Me, UpDown1.Value
End Sub
Private Sub Command7_Click()
MakeOpaque Me
Me.BackColor = &H8000000F
End Sub
Private Sub Command8_Click()
Me.BackColor = &H8000000F
FadeTo Me, UpDown1.Value
End Sub
Private Sub Command9_Click()
Me.BackColor = &HFF00FF
MakeTrans Me
End Sub
Private Sub Form_Activate()
FadeIn Me, , 1
End Sub
Private Sub Form_Load()
SetTrans Me, 0
If is2000XP Then
Command1.Enabled = True
Command2.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Command7.Enabled = True
Command8.Enabled = True
Command9.Enabled = True
Command10.Enabled = True
Label2.Enabled = True
Text1.Enabled = True
UpDown1.Enabled = True
Else
Command1.Enabled = False
Command2.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Command10.Enabled = False
Label2.Enabled = False
Text1.Enabled = False
UpDown1.Enabled = False
MsgBox "Only Windows 2000/XP Support Transparent Forms.", vbInformation, App.Title
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim zForm As Form
For Each zForm In Forms
Select Case zForm.Name
Case "frmButtons"
If zForm.Visible Then FadeOut frmButtons, , 3
Case "frmMask"
If zForm.Visible Then FadeOut frmMask, , 4
Case "frmTrans"
If zForm.Visible Then FadeOut frmTrans
Case "frmShapes"
If zForm.Visible Then FadeOut frmShapes
End Select
Next
Me.BackColor = &H8000000F
FadeOut Me
frmMenu.Show
End Sub
Private Sub Text1_GotFocus()
UpDown1.SetFocus
End Sub