home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / tag_it / fademe.frm < prev    next >
Text File  |  1993-12-09  |  16KB  |  424 lines

  1. VERSION 2.00
  2. Begin Form Fademe 
  3.    BackColor       =   &H00FFFFFF&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Software Registration"
  6.    ClientHeight    =   5760
  7.    ClientLeft      =   390
  8.    ClientTop       =   495
  9.    ClientWidth     =   9180
  10.    ControlBox      =   0   'False
  11.    FontBold        =   -1  'True
  12.    FontItalic      =   -1  'True
  13.    FontName        =   "MS Sans Serif"
  14.    FontSize        =   30
  15.    FontStrikethru  =   0   'False
  16.    FontUnderline   =   0   'False
  17.    ForeColor       =   &H00FFFFFF&
  18.    Height          =   6165
  19.    Left            =   330
  20.    LinkTopic       =   "Form1"
  21.    MaxButton       =   0   'False
  22.    MinButton       =   0   'False
  23.    ScaleHeight     =   5760
  24.    ScaleWidth      =   9180
  25.    Top             =   150
  26.    Width           =   9300
  27.    Begin SSPanel Panel3D8 
  28.       Alignment       =   1  'Left Justify - MIDDLE
  29.       AutoSize        =   3  'AutoSize Child To Panel
  30.       BackColor       =   &H00C0C0C0&
  31.       BevelOuter      =   1  'Inset
  32.       Caption         =   "Panel3D3"
  33.       Font3D          =   0  'None
  34.       ForeColor       =   &H00800000&
  35.       Height          =   645
  36.       Left            =   8280
  37.       TabIndex        =   11
  38.       Top             =   4920
  39.       Width           =   1005
  40.       Begin SSCommand Command3D3 
  41.          AutoSize        =   2  'Adjust Button Size To Picture
  42.          BevelWidth      =   0
  43.          Font3D          =   0  'None
  44.          Height          =   615
  45.          Left            =   15
  46.          Outline         =   0   'False
  47.          Picture         =   FADEME!.FRX:0000
  48.          TabIndex        =   12
  49.          Top             =   15
  50.          Width           =   975
  51.       End
  52.    End
  53.    Begin SSPanel Panel3D7 
  54.       Alignment       =   1  'Left Justify - MIDDLE
  55.       AutoSize        =   3  'AutoSize Child To Panel
  56.       BackColor       =   &H00C0C0C0&
  57.       BevelOuter      =   1  'Inset
  58.       BevelWidth      =   3
  59.       BorderWidth     =   0
  60.       Caption         =   "Panel3D6"
  61.       Font3D          =   0  'None
  62.       ForeColor       =   &H00800000&
  63.       Height          =   375
  64.       Left            =   2040
  65.       TabIndex        =   10
  66.       Top             =   3240
  67.       Visible         =   0   'False
  68.       Width           =   375
  69.    End
  70.    Begin SSPanel Panel3D6 
  71.       Alignment       =   1  'Left Justify - MIDDLE
  72.       AutoSize        =   3  'AutoSize Child To Panel
  73.       BackColor       =   &H00C0C0C0&
  74.       BevelOuter      =   1  'Inset
  75.       BevelWidth      =   3
  76.       BorderWidth     =   0
  77.       Caption         =   "Panel3D6"
  78.       Font3D          =   0  'None
  79.       ForeColor       =   &H00800000&
  80.       Height          =   375
  81.       Left            =   2040
  82.       TabIndex        =   9
  83.       Top             =   2760
  84.       Visible         =   0   'False
  85.       Width           =   375
  86.    End
  87.    Begin Timer Timer1 
  88.       Enabled         =   0   'False
  89.       Interval        =   2000
  90.       Left            =   1920
  91.       Top             =   2160
  92.    End
  93.    Begin SSPanel Panel3D1 
  94.       Alignment       =   0  'Left Justify - TOP
  95.       BackColor       =   &H00C0C0C0&
  96.       BevelWidth      =   3
  97.       BorderWidth     =   0
  98.       Caption         =   "Setup ..."
  99.       Font3D          =   4  'Inset w/heavy shading
  100.       FontBold        =   -1  'True
  101.       FontItalic      =   -1  'True
  102.       FontName        =   "MS Sans Serif"
  103.       FontSize        =   30
  104.       FontStrikethru  =   0   'False
  105.       FontUnderline   =   0   'False
  106.       ForeColor       =   &H00808080&
  107.       Height          =   2055
  108.       Left            =   2400
  109.       TabIndex        =   0
  110.       Top             =   1920
  111.       Width           =   4935
  112.       Begin SSPanel Panel3D4 
  113.          Alignment       =   1  'Left Justify - MIDDLE
  114.          AutoSize        =   3  'AutoSize Child To Panel
  115.          BackColor       =   &H00C0C0C0&
  116.          BevelOuter      =   1  'Inset
  117.          Caption         =   "Panel3D3"
  118.          Font3D          =   0  'None
  119.          ForeColor       =   &H00800000&
  120.          Height          =   645
  121.          Left            =   3720
  122.          TabIndex        =   7
  123.          Top             =   1200
  124.          Width           =   1005
  125.          Begin SSCommand Command3D2 
  126.             AutoSize        =   2  'Adjust Button Size To Picture
  127.             BevelWidth      =   0
  128.             Font3D          =   0  'None
  129.             Height          =   615
  130.             Left            =   15
  131.             Outline         =   0   'False
  132.             Picture         =   FADEME!.FRX:055A
  133.             TabIndex        =   8
  134.             Top             =   15
  135.             Width           =   975
  136.          End
  137.       End
  138.       Begin SSPanel Panel3D3 
  139.          Alignment       =   1  'Left Justify - MIDDLE
  140.          AutoSize        =   3  'AutoSize Child To Panel
  141.          BackColor       =   &H00C0C0C0&
  142.          BevelOuter      =   1  'Inset
  143.          Caption         =   "Panel3D3"
  144.          Font3D          =   0  'None
  145.          ForeColor       =   &H00800000&
  146.          Height          =   645
  147.          Left            =   3720
  148.          TabIndex        =   5
  149.          Top             =   480
  150.          Width           =   1005
  151.          Begin SSCommand Command3D1 
  152.             AutoSize        =   2  'Adjust Button Size To Picture
  153.             BevelWidth      =   0
  154.             Font3D          =   0  'None
  155.             Height          =   615
  156.             Left            =   15
  157.             Outline         =   0   'False
  158.             Picture         =   FADEME!.FRX:0AB4
  159.             TabIndex        =   6
  160.             Top             =   15
  161.             Width           =   975
  162.          End
  163.       End
  164.       Begin SSPanel Panel3D5 
  165.          Alignment       =   1  'Left Justify - MIDDLE
  166.          AutoSize        =   3  'AutoSize Child To Panel
  167.          BackColor       =   &H00C0C0C0&
  168.          BevelOuter      =   1  'Inset
  169.          BevelWidth      =   2
  170.          BorderWidth     =   0
  171.          Font3D          =   0  'None
  172.          ForeColor       =   &H00800000&
  173.          Height          =   375
  174.          Left            =   360
  175.          TabIndex        =   3
  176.          Top             =   1320
  177.          Width           =   3015
  178.          Begin TextBox Text2 
  179.             BackColor       =   &H00800000&
  180.             BorderStyle     =   0  'None
  181.             FontBold        =   -1  'True
  182.             FontItalic      =   0   'False
  183.             FontName        =   "MS Sans Serif"
  184.             FontSize        =   12
  185.             FontStrikethru  =   0   'False
  186.             FontUnderline   =   0   'False
  187.             ForeColor       =   &H00FFFFFF&
  188.             Height          =   315
  189.             Left            =   30
  190.             TabIndex        =   4
  191.             Top             =   30
  192.             Width           =   2955
  193.          End
  194.       End
  195.       Begin SSPanel Panel3D2 
  196.          Alignment       =   1  'Left Justify - MIDDLE
  197.          AutoSize        =   3  'AutoSize Child To Panel
  198.          BackColor       =   &H00C0C0C0&
  199.          BevelOuter      =   1  'Inset
  200.          BevelWidth      =   2
  201.          BorderWidth     =   0
  202.          Font3D          =   0  'None
  203.          ForeColor       =   &H00800000&
  204.          Height          =   375
  205.          Left            =   360
  206.          TabIndex        =   1
  207.          Top             =   840
  208.          Width           =   3015
  209.          Begin TextBox Text1 
  210.             BackColor       =   &H00800000&
  211.             BorderStyle     =   0  'None
  212.             FontBold        =   -1  'True
  213.             FontItalic      =   0   'False
  214.             FontName        =   "MS Sans Serif"
  215.             FontSize        =   12
  216.             FontStrikethru  =   0   'False
  217.             FontUnderline   =   0   'False
  218.             ForeColor       =   &H00FFFFFF&
  219.             Height          =   315
  220.             Left            =   30
  221.             TabIndex        =   2
  222.             Top             =   30
  223.             Width           =   2955
  224.          End
  225.       End
  226.    End
  227. End
  228. Declare Function ShowWindow Lib "User" (ByVal hWnd As Integer, ByVal nCmdShow As Integer) As Integer
  229. Declare Function GetWindowText Lib "User" (ByVal hWnd As Integer, ByVal lpString As String, ByVal aint As Integer) As Integer
  230. Declare Function GetWindow Lib "User" (ByVal hWnd As Integer, ByVal wCmd As Integer) As Integer
  231. Declare Function GetTopWindow Lib "User" (ByVal hWnd As Integer) As Integer
  232. Declare Function IsWindowEnabled Lib "User" (ByVal hWnd As Integer) As Integer
  233. Declare Function IsWIndowVisible Lib "User" (ByVal hWnd As Integer) As Integer
  234. Declare Function GetWindowLong Lib "User" (ByVal hWnd As Integer, ByVal nIndex As Integer) As Long
  235. Declare Function SetWindowPos Lib "User" (ByVal hWnd As Integer, ByVal hWndInsertAfter As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer
  236. Declare Function GetModuleHandle% Lib "Kernel" (ByVal lpProgramName$)
  237. Declare Function GetModuleUsage% Lib "Kernel" (ByVal hProgram%)
  238. Declare Function GetActiveWindow Lib "User" () As Integer
  239. Declare Function SetFocusAPI Lib "user" Alias "SetFocus" (ByVal hWnd As Integer) As Integer
  240. Declare Sub SwitchToThisWindow Lib "User" (ByVal hWnd As Integer, ByVal OpenItUp As Integer)
  241. Declare Sub ClientToScreen Lib "User" (ByVal hWnd As Integer, lpPoint As POINTAPI)
  242. Declare Function SetWindowPos Lib "User" (ByVal hWnd As Integer, ByVal hWndInsertAfter As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer
  243. Declare Function BitBlt% Lib "gdi" (ByVal hDestDC%, ByVal X%, ByVal Y%, ByVal nWidth%, ByVal nHeight%, ByVal hSrcDC%, ByVal XSrc%, ByVal YSrc%, ByVal dwRop&)
  244. Declare Function GetModuleHandle Lib "Kernel" (ByVal lpModuleName As String) As Integer
  245. Declare Function Ctl3dRegister Lib "CTL3D.DLL" (ByVal hInstance As Integer) As Integer
  246. Declare Function Ctl3dAutoSubClass Lib "CTL3D.DLL" (ByVal hInstance As Integer) As Integer
  247. Declare Function Ctl3dUnregister Lib "CTL3D.DLL" (ByVal hInstance As Integer) As Integer
  248. Dim Inst%
  249.  
  250.  
  251. Sub Command1_Click ()
  252.  
  253. End Sub
  254.  
  255. Sub Command1_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  256.  
  257. End Sub
  258.  
  259. Sub Command3D1_Click ()
  260. Dim NL
  261. NL = Chr(13)
  262. Const MB_OK = 0, MB_OKCANCEL = 1    ' Define buttons.
  263.     Const MB_YESNOCANCEL = 3, MB_YESNO = 4
  264.     Const MB_ICONSTOP = 16, MB_ICONQUESTION = 32    ' Define Icons.
  265.     Const MB_ICONEXCLAMATION = 48, MB_ICONINFORMATION = 64
  266.     Const MB_DEFBUTTON2 = 256, IDYES = 6, IDNO = 7  ' Define other.
  267.     Dim DgDef, Msg, Response, Title ' Declare variables.
  268.     Title = "Software Registration"
  269.     ' Put together a sample message box with all the proper components.
  270.     Msg = "Is this correct " & NL
  271.     Msg = Msg & "Name: " & Text1.Text & NL
  272.     Msg = Msg & "Company: " & Text2.Text
  273.     DgDef = MB_YESNO + MB_ICONQUESTION + MB_DEFBUTTON2  ' Describe dialog.
  274.  
  275.     Response = MsgBox(Msg, DgDef, Title)    ' Get user response.
  276.     If Response = IDYES Then    ' Evaluate response
  277.     MsgBox "Thank You for using Geewiz Software.", 64, "Software Registration" ' and take appropriate
  278.     Y% = Ctl3dUnregister(Inst%)
  279.     End
  280.     Else    ' action.
  281.     Msg = "Try Again ...."
  282.     Text1.Text = " "
  283.     Text2.Text = " "
  284.     Text1.SetFocus
  285.     End If
  286.     MsgBox Msg  ' Display action taken.
  287.  
  288. End Sub
  289.  
  290. Sub Command3D2_Click ()
  291. Y% = Ctl3dUnregister(Inst%)
  292. End
  293. End Sub
  294.  
  295. Sub Command3D3_Click ()
  296. Dim NL, DgDef, Msg, Response, Title
  297. NL = Chr(13)
  298. Const MB_OK = 0   ' Define buttons.
  299.     ' Declare variables.
  300.     Title = "Instructions: " & NL
  301.     ' Put together a sample message box with all the proper components.
  302.     Msg = "Give Focus to the first text field " & NL
  303.     Msg = Msg & "and Click your Right Mouse Button." & NL
  304.     Msg = Msg & "Give Focus to the second text field " & NL
  305.     Msg = Msg & "and Click your Right Mouse Button." & NL
  306.     Msg = Msg & NL
  307.     Msg = Msg & "As you will see in the source code" & NL
  308.     Msg = Msg & "You can attach any help message to any" & NL
  309.     Msg = Msg & "Object placed on any form." & NL
  310.     Msg = Msg & NL
  311.     Msg = Msg & "If you can Improve on the code" & NL
  312.     Msg = Msg & "do so. Date the improvement and upload" & NL
  313.     Msg = Msg & "The New Version ..." & NL
  314.     MsgBox Title & Msg
  315. End Sub
  316.  
  317. Sub Form_Load ()
  318.     Move 0, 0, Screen.Width, Screen.Height * .85
  319. Inst% = GetModuleHandle("Sample.EXE")
  320. Y% = Ctl3dRegister(Inst%)
  321. Y% = Ctl3dAutoSubClass(Inst%)
  322. End Sub
  323.  
  324. Sub Form_Paint ()
  325. FadeForm Me
  326.  
  327. End Sub
  328.  
  329. Sub Form_Resize ()
  330. FadeForm Me
  331. End Sub
  332.  
  333. Sub Panel3D3_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  334. If Timer1.Enabled = True Then Timer1.Enabled = False
  335. If Button = 2 Then
  336. CurrentX = X
  337. CurrentY = Y
  338. form1.Label1.AutoSize = True
  339. form1.Label1.Caption = " Click Me To Register this Software ...  "  'Your little message to the user.
  340. form1.Label1.AutoSize = False
  341. form1.Label1.Width = form1.Label1.Width + 60
  342. form1.Label1.Height = form1.Label1.Height + 30
  343. form1.Width = form1.Label1.Width
  344. form1.Height = form1.Label1.Height
  345. form1.Label1.Left = 0
  346. form1.Label1.Top = 0
  347. form1.Top = Panel3D6.Top + Y  'Object you want to attach the message to. In this case a command button.
  348. form1.Left = Panel3D6.Left    'Places message right over the object.
  349. If form1.Top < 0 Then form1.Top = 0
  350. If form1.Left + form1.Width > Screen.Width Then form1.Left = Screen.Width - form1.Width
  351.   
  352. form1.Show
  353. 'wOn_Top% = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, wFlags = &H2 Or &H1 Or &H40 Or &H10)
  354. End If
  355.  
  356.  
  357.  
  358.  
  359. End Sub
  360.  
  361. Sub Text1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  362. If Timer1.Enabled = True Then Timer1.Enabled = False
  363. If Button = 2 Then
  364. CurrentX = X
  365. CurrentY = Y
  366. form1.Label1.AutoSize = True
  367. form1.Label1.Caption = " Enter your Full Name here please ...  "  'Your little message to the user.
  368. form1.Label1.AutoSize = False
  369. form1.Label1.Width = form1.Label1.Width + 60
  370. form1.Label1.Height = form1.Label1.Height + 30
  371. form1.Width = form1.Label1.Width
  372. form1.Height = form1.Label1.Height
  373. form1.Label1.Left = 0
  374. form1.Label1.Top = 0
  375. form1.Top = Panel3D6.Top + Y  'Object you want to attach the message to. In this case a Text field.
  376. form1.Left = Panel3D6.Left    'Places message right over the object.
  377. If form1.Top < 0 Then form1.Top = 0
  378. If form1.Left + form1.Width > Screen.Width Then form1.Left = Screen.Width - form1.Width
  379.   
  380. form1.Show  'Pretty simple huh?
  381. 'wOn_Top% = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, wFlags = &H2 Or &H1 Or &H40 Or &H10)
  382. End If
  383. End Sub
  384.  
  385. Sub Text1_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  386. If Button = 2 Then Timer1.Enabled = True
  387. End Sub
  388.  
  389. Sub Text2_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  390. If Timer1.Enabled = True Then Timer1.Enabled = False
  391. If Button = 2 Then
  392. CurrentX = X
  393. CurrentY = Y
  394. form1.Label1.AutoSize = True
  395. form1.Label1.Caption = " Enter your Company Name here please ...  "  'Your little message to the user.
  396. form1.Label1.AutoSize = False
  397. form1.Label1.Width = form1.Label1.Width + 60
  398. form1.Label1.Height = form1.Label1.Height + 30
  399. form1.Width = form1.Label1.Width
  400. form1.Height = form1.Label1.Height
  401. form1.Label1.Left = 0
  402. form1.Label1.Top = 0
  403. form1.Top = Panel3D7.Top + Y  'Object you want to attach the message to. In this case a Text Field.
  404. form1.Left = Panel3D7.Left    'Places message right over the object.
  405. If form1.Top < 0 Then form1.Top = 0
  406. If form1.Left + form1.Width > Screen.Width Then form1.Left = Screen.Width - form1.Width
  407.   
  408. form1.Show 'Pretty simple Huh?
  409. 'wOn_Top% = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, wFlags = &H2 Or &H1 Or &H40 Or &H10)
  410. End If
  411.  
  412.  
  413.  
  414. End Sub
  415.  
  416. Sub Text2_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  417. If Button = 2 Then Timer1.Enabled = True
  418. End Sub
  419.  
  420. Sub Timer1_Timer ()
  421. Unload form1
  422. End Sub
  423.  
  424.