home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Gradient_C2055663232007.psc / frmAbout.frm < prev    next >
Text File  |  2007-03-23  |  7KB  |  227 lines

  1. VERSION 5.00
  2. Begin VB.Form frmAbout 
  3.    BackColor       =   &H80000007&
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   2400
  7.    ClientLeft      =   0
  8.    ClientTop       =   0
  9.    ClientWidth     =   5445
  10.    LinkTopic       =   "Form1"
  11.    LockControls    =   -1  'True
  12.    ScaleHeight     =   2400
  13.    ScaleWidth      =   5445
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   1  'CenterOwner
  16.    Begin ClockOCX_Test.AnalogClock AnalogClock1 
  17.       Height          =   2190
  18.       Left            =   90
  19.       TabIndex        =   3
  20.       Top             =   90
  21.       Width           =   2130
  22.       _ExtentX        =   3757
  23.       _ExtentY        =   3863
  24.       MajorPoint      =   0
  25.       MinorPoint      =   0
  26.       CircleBorder    =   0
  27.       AntiAliasing    =   -1  'True
  28.    End
  29.    Begin VB.Timer tmrUnload 
  30.       Interval        =   12000
  31.       Left            =   2505
  32.       Top             =   45
  33.    End
  34.    Begin VB.Line Line1 
  35.       BorderColor     =   &H00808080&
  36.       BorderWidth     =   2
  37.       Index           =   1
  38.       X1              =   2340
  39.       X2              =   2340
  40.       Y1              =   45
  41.       Y2              =   2340
  42.    End
  43.    Begin VB.Line Line1 
  44.       BorderColor     =   &H00FFFFFF&
  45.       Index           =   0
  46.       X1              =   2310
  47.       X2              =   2310
  48.       Y1              =   45
  49.       Y2              =   2340
  50.    End
  51.    Begin VB.Label Label1 
  52.       AutoSize        =   -1  'True
  53.       BackStyle       =   0  'Transparent
  54.       Caption         =   "REGISTERED VERSION"
  55.       BeginProperty Font 
  56.          Name            =   "Arial"
  57.          Size            =   9.75
  58.          Charset         =   0
  59.          Weight          =   400
  60.          Underline       =   0   'False
  61.          Italic          =   0   'False
  62.          Strikethrough   =   0   'False
  63.       EndProperty
  64.       ForeColor       =   &H00FFFFFF&
  65.       Height          =   225
  66.       Index           =   2
  67.       Left            =   2565
  68.       TabIndex        =   2
  69.       Top             =   555
  70.       Width           =   2250
  71.    End
  72.    Begin VB.Label Label1 
  73.       Alignment       =   2  'Center
  74.       BackStyle       =   0  'Transparent
  75.       Caption         =   "OK"
  76.       BeginProperty Font 
  77.          Name            =   "Arial"
  78.          Size            =   9.75
  79.          Charset         =   0
  80.          Weight          =   700
  81.          Underline       =   0   'False
  82.          Italic          =   0   'False
  83.          Strikethrough   =   0   'False
  84.       EndProperty
  85.       ForeColor       =   &H00FFFFFF&
  86.       Height          =   270
  87.       Index           =   1
  88.       Left            =   3765
  89.       TabIndex        =   1
  90.       Top             =   1830
  91.       Width           =   1410
  92.    End
  93.    Begin VB.Label Label1 
  94.       AutoSize        =   -1  'True
  95.       BackStyle       =   0  'Transparent
  96.       Caption         =   "Gradient Analog Clock"
  97.       BeginProperty Font 
  98.          Name            =   "Arial"
  99.          Size            =   9.75
  100.          Charset         =   0
  101.          Weight          =   700
  102.          Underline       =   0   'False
  103.          Italic          =   0   'False
  104.          Strikethrough   =   0   'False
  105.       EndProperty
  106.       ForeColor       =   &H00FFFFFF&
  107.       Height          =   225
  108.       Index           =   0
  109.       Left            =   2565
  110.       TabIndex        =   0
  111.       Top             =   255
  112.       Width           =   2220
  113.    End
  114.    Begin VB.Shape Shape1 
  115.       BackColor       =   &H00000000&
  116.       BackStyle       =   1  'Opaque
  117.       BorderColor     =   &H00FFFFFF&
  118.       Height          =   330
  119.       Left            =   3765
  120.       Shape           =   4  'Rounded Rectangle
  121.       Top             =   1770
  122.       Width           =   1410
  123.    End
  124.    Begin VB.Shape Shape2 
  125.       BackColor       =   &H00808080&
  126.       BackStyle       =   1  'Opaque
  127.       BorderStyle     =   0  'Transparent
  128.       Height          =   330
  129.       Left            =   3810
  130.       Shape           =   4  'Rounded Rectangle
  131.       Top             =   1815
  132.       Width           =   1410
  133.    End
  134. End
  135. Attribute VB_Name = "frmAbout"
  136. Attribute VB_GlobalNameSpace = False
  137. Attribute VB_Creatable = False
  138. Attribute VB_PredeclaredId = True
  139. Attribute VB_Exposed = False
  140. Option Explicit
  141.  
  142. Private Declare Function CreateEllipticRgn Lib "gdi32.dll" (ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long) As Long
  143. Private Declare Function CreateRectRgn Lib "gdi32.dll" (ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long) As Long
  144. Private Declare Function CreateSolidBrush Lib "gdi32.dll" (ByVal crColor As Long) As Long
  145. Private Declare Function CombineRgn Lib "gdi32.dll" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long
  146. Private Declare Function DeleteObject Lib "gdi32.dll" (ByVal hObject As Long) As Long
  147. Private Declare Function FrameRgn Lib "gdi32.dll" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
  148.  
  149. Private Declare Function GetWindowRgn Lib "user32.dll" (ByVal hwnd As Long, ByVal hRgn As Long) As Long
  150. Private Declare Function SetWindowRgn Lib "user32.dll" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
  151.  
  152. Private myLS As Long, myTS As Long, myTL As Long
  153.  
  154. Private Sub Form_Load()
  155. On Error Resume Next
  156.  
  157.    Dim hRgn As Long
  158.    Dim hRgnRect As Long
  159.  
  160.    Label1(2) = "REGISTERED VERSION" & vbCrLf & "Made by. BatavianX" & vbCrLf & "Jakarta - Indonesia" & vbCrLf & "batavian.x@gmail.com"
  161.    Me.ScaleMode = vbPixels
  162.    
  163.    hRgn = CreateEllipticRgn(0, 0, 157, 160)
  164.    hRgnRect = CreateRectRgn(144, 0, Me.ScaleWidth, Me.ScaleHeight)
  165.    
  166.    CombineRgn hRgn, hRgn, hRgnRect, 2
  167.    
  168.    SetWindowRgn Me.hwnd, hRgn, False
  169.    
  170.    DeleteObject hRgn
  171.    DeleteObject hRgnRect
  172.    
  173.    myLS = Shape1.Left
  174.    myTS = Shape1.Top
  175.    myTL = Label1(1).Top
  176.  
  177. On Error GoTo 0
  178. End Sub
  179.  
  180. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  181.    If Shape1.BackColor = vbRed Then
  182.       Shape1.BackColor = vbBlack
  183.    End If
  184. End Sub
  185.  
  186. Private Sub Form_Paint()
  187.    Dim hRgn As Long
  188.    Dim hBrush As Long
  189.    Dim hRgnRect As Long
  190.  
  191.    hRgn = CreateEllipticRgn(0, 0, 157, 160)
  192.    hRgnRect = CreateRectRgn(144, 0, Me.ScaleWidth, Me.ScaleHeight)
  193.    CombineRgn hRgn, hRgn, hRgnRect, 2
  194.    hBrush = CreateSolidBrush(vbWhite)
  195.    FrameRgn Me.hdc, hRgn, hBrush, 1, 1
  196.    
  197.    DeleteObject hRgn
  198.    DeleteObject hRgnRect
  199.    DeleteObject hBrush
  200. End Sub
  201.  
  202. Private Sub Label1_Click(Index As Integer)
  203.    If Index = 1 Then
  204.       Unload Me
  205.    End If
  206. End Sub
  207.  
  208. Private Sub Label1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  209.    If Index = 1 Then
  210.       Shape1.Move Shape2.Left, Shape2.Top
  211.       Label1(1).Move Shape2.Left, Shape1.Top + (60 / Screen.TwipsPerPixelY)
  212.    End If
  213. End Sub
  214.  
  215. Private Sub Label1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  216.    If Index = 1 Then
  217.       Shape1.BackColor = vbRed
  218.    End If
  219. End Sub
  220.  
  221. Private Sub Label1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  222.    If Index = 1 Then
  223.       Shape1.Move myLS, myTS
  224.       Label1(1).Move myLS, myTL
  225.    End If
  226. End Sub
  227.