home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Multimedia Adventure Set / Visual_Basic_4_Multimedia_Adventure_Set_Coriolis_Group_1995.iso / sharware / csrplus / curdemo.frm < prev    next >
Text File  |  1994-06-07  |  16KB  |  560 lines

  1. VERSION 2.00
  2. Begin Form CurDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "New Cursors Demonstration"
  6.    ClientHeight    =   4515
  7.    ClientLeft      =   1260
  8.    ClientTop       =   2490
  9.    ClientWidth     =   7260
  10.    ControlBox      =   0   'False
  11.    Height          =   5205
  12.    Left            =   1200
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4515
  17.    ScaleWidth      =   7260
  18.    Top             =   1860
  19.    Width           =   7380
  20.    Begin CommandButton Command3 
  21.       BackColor       =   &H00C0C0C0&
  22.       Caption         =   "Start HourGlass"
  23.       Height          =   375
  24.       Left            =   2880
  25.       TabIndex        =   14
  26.       Top             =   3840
  27.       Width           =   1695
  28.    End
  29.    Begin Timer Timer1 
  30.       Interval        =   250
  31.       Left            =   6960
  32.       Top             =   4320
  33.    End
  34.    Begin CommandButton Command2 
  35.       BackColor       =   &H00C0C0C0&
  36.       Caption         =   "Stop Timer Cursor"
  37.       Height          =   375
  38.       Left            =   5280
  39.       TabIndex        =   12
  40.       Top             =   3480
  41.       Width           =   1695
  42.    End
  43.    Begin CheckBox Check2 
  44.       BackColor       =   &H00C0C0C0&
  45.       Caption         =   "Sample Check #2"
  46.       Height          =   255
  47.       Left            =   240
  48.       TabIndex        =   11
  49.       Top             =   3960
  50.       Width           =   1815
  51.    End
  52.    Begin CommandButton Command1 
  53.       BackColor       =   &H00C0C0C0&
  54.       Caption         =   "Start Timer Cursor"
  55.       Height          =   375
  56.       Left            =   2880
  57.       TabIndex        =   10
  58.       Top             =   3480
  59.       Width           =   1695
  60.    End
  61.    Begin TextBox Text2 
  62.       Height          =   1215
  63.       Left            =   2880
  64.       MultiLine       =   -1  'True
  65.       ScrollBars      =   2  'Vertical
  66.       TabIndex        =   1
  67.       Text            =   "Type Some Text Here Too..."
  68.       Top             =   2160
  69.       Width           =   4095
  70.    End
  71.    Begin TextBox Text1 
  72.       BackColor       =   &H00FFFF00&
  73.       Height          =   1335
  74.       Left            =   2880
  75.       MultiLine       =   -1  'True
  76.       ScrollBars      =   2  'Vertical
  77.       TabIndex        =   0
  78.       Text            =   "Type Some Text Here..."
  79.       Top             =   720
  80.       Width           =   4095
  81.    End
  82.    Begin CheckBox Check1 
  83.       Alignment       =   1  'Right Justify
  84.       BackColor       =   &H00C0C0C0&
  85.       Caption         =   "Sample Check #1"
  86.       Height          =   255
  87.       Left            =   240
  88.       TabIndex        =   9
  89.       Top             =   3480
  90.       Width           =   2175
  91.    End
  92.    Begin Frame Frame2 
  93.       BackColor       =   &H00C0C0C0&
  94.       Caption         =   "Sample Frame #2"
  95.       Height          =   1095
  96.       Left            =   240
  97.       TabIndex        =   6
  98.       Top             =   2040
  99.       Width           =   2175
  100.       Begin OptionButton Option2 
  101.          BackColor       =   &H00C0C0C0&
  102.          Caption         =   "Option2"
  103.          Height          =   255
  104.          Index           =   1
  105.          Left            =   120
  106.          TabIndex        =   8
  107.          Top             =   720
  108.          Width           =   1815
  109.       End
  110.       Begin OptionButton Option2 
  111.          BackColor       =   &H00C0C0C0&
  112.          Caption         =   "Option1"
  113.          Height          =   255
  114.          Index           =   0
  115.          Left            =   120
  116.          TabIndex        =   7
  117.          Top             =   360
  118.          Width           =   1815
  119.       End
  120.    End
  121.    Begin Frame Frame1 
  122.       BackColor       =   &H00C0C0C0&
  123.       Caption         =   "Sample Frame #1"
  124.       Height          =   1095
  125.       Left            =   240
  126.       TabIndex        =   3
  127.       Top             =   720
  128.       Width           =   2175
  129.       Begin OptionButton Option1 
  130.          Alignment       =   1  'Right Justify
  131.          BackColor       =   &H00C0C0C0&
  132.          Caption         =   "Option2"
  133.          Height          =   255
  134.          Index           =   1
  135.          Left            =   120
  136.          TabIndex        =   5
  137.          Top             =   720
  138.          Width           =   1815
  139.       End
  140.       Begin OptionButton Option1 
  141.          Alignment       =   1  'Right Justify
  142.          BackColor       =   &H00C0C0C0&
  143.          Caption         =   "Option1"
  144.          Height          =   255
  145.          Index           =   0
  146.          Left            =   120
  147.          TabIndex        =   4
  148.          Top             =   360
  149.          Width           =   1815
  150.       End
  151.    End
  152.    Begin CommandButton CmdOkay 
  153.       BackColor       =   &H00C0C0C0&
  154.       Cancel          =   -1  'True
  155.       Caption         =   "O &K A Y"
  156.       Height          =   375
  157.       Left            =   5280
  158.       TabIndex        =   2
  159.       Top             =   3840
  160.       Width           =   1695
  161.    End
  162.    Begin Label Label1 
  163.       Alignment       =   2  'Center
  164.       BackStyle       =   0  'Transparent
  165.       Caption         =   "Move the mouse to view a few of the included cursors."
  166.       ForeColor       =   &H00000080&
  167.       Height          =   225
  168.       Left            =   240
  169.       TabIndex        =   13
  170.       Top             =   360
  171.       Width           =   6735
  172.    End
  173.    Begin Menu mnuStandard 
  174.       Caption         =   "&Standard"
  175.       Begin Menu mnuSFatArrowNE 
  176.          Caption         =   "FatArrowNE"
  177.       End
  178.       Begin Menu mnuSFatArrowNW 
  179.          Caption         =   "FatArrowNW"
  180.       End
  181.       Begin Menu mnuSFatArrowSE 
  182.          Caption         =   "FatArrowSE"
  183.       End
  184.       Begin Menu mnuSFatArrowSw 
  185.          Caption         =   "FatArrowSW"
  186.       End
  187.       Begin Menu mnuSHandPointE 
  188.          Caption         =   "HandPointE"
  189.       End
  190.       Begin Menu mnuSHandPointN 
  191.          Caption         =   "HandPointN"
  192.       End
  193.       Begin Menu mnuSHandPointS 
  194.          Caption         =   "HandPointS"
  195.       End
  196.       Begin Menu mnuSHandPointW 
  197.          Caption         =   "HandPointW"
  198.       End
  199.       Begin Menu mnuSTrekPointer 
  200.          Caption         =   "TrekPointer"
  201.       End
  202.    End
  203.    Begin Menu mnuNovelty 
  204.       Caption         =   "&Novelty"
  205.       Begin Menu mnuNCardClub 
  206.          Caption         =   "CardClub"
  207.       End
  208.       Begin Menu mnuNCardDiamond 
  209.          Caption         =   "CardDiamond"
  210.       End
  211.       Begin Menu mnuNCardHeart 
  212.          Caption         =   "CardHeart"
  213.       End
  214.       Begin Menu mnuNCardSpade 
  215.          Caption         =   "CardSpade"
  216.       End
  217.       Begin Menu mnuNDollarSign 
  218.          Caption         =   "DollarSign"
  219.       End
  220.       Begin Menu mnuNKey 
  221.          Caption         =   "Key"
  222.       End
  223.       Begin Menu mnuNMouse 
  224.          Caption         =   "Mouse"
  225.       End
  226.       Begin Menu mnuNSkull 
  227.          Caption         =   "Skull"
  228.       End
  229.       Begin Menu mnuNStar 
  230.          Caption         =   "Star"
  231.       End
  232.    End
  233.    Begin Menu mnuFunctional 
  234.       Caption         =   "&Functional"
  235.       Begin Menu mnuFContextHelp 
  236.          Caption         =   "ContextHelp"
  237.       End
  238.       Begin Menu mnuFCrossHair 
  239.          Caption         =   "CrossHair"
  240.       End
  241.       Begin Menu mnuFEyeDropper 
  242.          Caption         =   "EyeDropper"
  243.       End
  244.       Begin Menu mnuFMagnet 
  245.          Caption         =   "Magnet"
  246.       End
  247.       Begin Menu mnuFMagnifier 
  248.          Caption         =   "Magnifier"
  249.       End
  250.       Begin Menu mnuFPasteIt 
  251.          Caption         =   "PasteIt"
  252.       End
  253.       Begin Menu mnuFScissors 
  254.          Caption         =   "Scissors"
  255.       End
  256.       Begin Menu mnuFSprayCan 
  257.          Caption         =   "SprayCan"
  258.       End
  259.       Begin Menu mnuFSyringe 
  260.          Caption         =   "Syringe"
  261.       End
  262.    End
  263. End
  264. ' MousePointer must be set to '0' (default)
  265.  
  266. ' If you exit with the VB menu END function the
  267. '   cursor will not unload properly; always exit
  268. '   from within the program (even while you are
  269. '   designing it).
  270.  
  271.  
  272. Dim TimerCursor As Integer
  273. Dim WaitType As Integer
  274. Dim WdwCursor As String
  275.  
  276. Sub Check1_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  277.     If Timer1.Enabled = True Then Exit Sub
  278.     ThisCursor& = MakeCursor(Check1.hWnd, "MagicWand")
  279. End Sub
  280.  
  281. Sub Check2_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  282.     If Timer1.Enabled = True Then Exit Sub
  283.     ThisCursor& = MakeCursor(Check2.hWnd, "StarWand")
  284. End Sub
  285.  
  286. Sub CmdOkay_Click ()
  287.     If Timer1.Enabled = True Then
  288.         Timer1.Enabled = False
  289.         ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  290.         End If
  291.     Unload Me
  292. End Sub
  293.  
  294. Sub CmdOkay_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  295.     If Timer1.Enabled = True Then Exit Sub
  296.     ThisCursor& = MakeCursor(CmdOkay.hWnd, "CheckMark")
  297. End Sub
  298.  
  299. Sub Command1_Click ()
  300.     Command1.Enabled = False
  301.     Command3.Enabled = False
  302.     Command2.Enabled = True
  303.     Command2.SetFocus
  304.     WaitType = 1
  305.     TimerCursor = 1
  306.     Timer1.Enabled = True
  307. End Sub
  308.  
  309. Sub Command1_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  310.     If Timer1.Enabled = True Then Exit Sub
  311.     ThisCursor& = MakeCursor(Command1.hWnd, "Lightning")
  312. End Sub
  313.  
  314. Sub Command2_Click ()
  315.     Command1.Enabled = True
  316.     Command3.Enabled = True
  317.     Command2.Enabled = False
  318.     Timer1.Enabled = False
  319.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  320. End Sub
  321.  
  322. Sub Command2_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  323.     If Timer1.Enabled = True Then Exit Sub
  324.     ThisCursor& = MakeCursor(Command2.hWnd, "Lightning")
  325. End Sub
  326.  
  327. Sub Command3_Click ()
  328.     Command1.Enabled = False
  329.     Command3.Enabled = False
  330.     Command2.Enabled = True
  331.     Command2.SetFocus
  332.     WaitType = 2
  333.     TimerCursor = 1
  334.     Timer1.Enabled = True
  335. End Sub
  336.  
  337. Sub Command3_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  338.     If Timer1.Enabled = True Then Exit Sub
  339.     ThisCursor& = MakeCursor(Command3.hWnd, "Lightning")
  340. End Sub
  341.  
  342. Sub Form_Load ()
  343.     Timer1.Enabled = False
  344.     FormCenterScreen Me
  345.     Command2.Enabled = False
  346.     
  347.     WdwCursor = "Mouse"
  348.     OrgTextCursor = MakeCursor(Text1.hWnd, "Pencil")
  349.     OrgCursor = MakeCursor(Me.hWnd, WdwCursor)
  350.  
  351.     Screen.MousePointer = 0
  352. End Sub
  353.  
  354. Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  355.     If Timer1.Enabled = True Then Exit Sub
  356.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  357. End Sub
  358.  
  359. Sub Form_Paint ()
  360.     DoForm3D Me, sunken, 1, 5
  361. End Sub
  362.  
  363. Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  364.     'reset cursor once for each type of object
  365.     Timer1.Enabled = False
  366.     RestoreCursor Me.hWnd, OrgCursor
  367.     RestoreCursor Frame1.hWnd, OrgCursor
  368.     RestoreCursor Option1(0).hWnd, OrgCursor
  369.     RestoreCursor Command1.hWnd, OrgCursor
  370.     RestoreCursor Text1.hWnd, OrgTextCursor
  371.     RestoreCursor Check1.hWnd, OrgCursor
  372. End Sub
  373.  
  374. Sub Frame1_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  375.     If Timer1.Enabled = True Then Exit Sub
  376.     ThisCursor& = MakeCursor(Frame1.hWnd, WdwCursor)
  377. End Sub
  378.  
  379. Sub Frame2_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  380.     If Timer1.Enabled = True Then Exit Sub
  381.     ThisCursor& = MakeCursor(Frame2.hWnd, WdwCursor)
  382. End Sub
  383.  
  384. Sub mnuFContextHelp_Click ()
  385.     WdwCursor = "ContextHelp"
  386.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  387. End Sub
  388.  
  389. Sub mnuFCrossHair_Click ()
  390.     WdwCursor = "CrossHair"
  391.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  392. End Sub
  393.  
  394. Sub mnuFEyeDropper_Click ()
  395.     WdwCursor = "EyeDropper"
  396.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  397. End Sub
  398.  
  399. Sub mnuFMagnet_Click ()
  400.     WdwCursor = "Magnet"
  401.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  402. End Sub
  403.  
  404. Sub mnuFMagnifier_Click ()
  405.     WdwCursor = "Magnifier"
  406.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  407. End Sub
  408.  
  409. Sub mnuFPasteIt_Click ()
  410.     WdwCursor = "PasteIt"
  411.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  412. End Sub
  413.  
  414. Sub mnuFScissors_Click ()
  415.     WdwCursor = "Scissors"
  416.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  417. End Sub
  418.  
  419. Sub mnuFSprayCan_Click ()
  420.     WdwCursor = "SprayCan"
  421.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  422. End Sub
  423.  
  424. Sub mnuFSyringe_Click ()
  425.     WdwCursor = "Syringe"
  426.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  427. End Sub
  428.  
  429. Sub mnuNCardClub_Click ()
  430.     WdwCursor = "CardClub"
  431.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  432. End Sub
  433.  
  434. Sub mnuNCardDiamond_Click ()
  435.     WdwCursor = "CardDiamond"
  436.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  437. End Sub
  438.  
  439. Sub mnuNCardHeart_Click ()
  440.     WdwCursor = "CardHeart"
  441.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  442. End Sub
  443.  
  444. Sub mnuNCardSpade_Click ()
  445.     WdwCursor = "CardSpade"
  446.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  447. End Sub
  448.  
  449. Sub mnuNDollarSign_Click ()
  450.     WdwCursor = "DollarSign"
  451.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  452. End Sub
  453.  
  454. Sub mnuNKey_Click ()
  455.     WdwCursor = "Key"
  456.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  457. End Sub
  458.  
  459. Sub mnuNMouse_Click ()
  460.     WdwCursor = "Mouse"
  461.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  462. End Sub
  463.  
  464. Sub mnuNovelty_Click ()
  465.     WdwCursor = "Novelty"
  466.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  467. End Sub
  468.  
  469. Sub mnuNSkull_Click ()
  470.     WdwCursor = "Skull"
  471.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  472. End Sub
  473.  
  474. Sub mnuNStar_Click ()
  475.     WdwCursor = "Star"
  476.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  477. End Sub
  478.  
  479. Sub mnuSFatArrowNE_Click ()
  480.     WdwCursor = "FatArrowNE"
  481.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  482. End Sub
  483.  
  484. Sub mnuSFatArrowNW_Click ()
  485.     WdwCursor = "FatArrowNW"
  486.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  487. End Sub
  488.  
  489. Sub mnuSFatArrowSE_Click ()
  490.     WdwCursor = "FatArrowSE"
  491.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  492. End Sub
  493.  
  494. Sub mnuSFatArrowSw_Click ()
  495.     WdwCursor = "FatArrowSW"
  496.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  497. End Sub
  498.  
  499. Sub mnuSHandPointE_Click ()
  500.     WdwCursor = "HandPointE"
  501.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  502. End Sub
  503.  
  504. Sub mnuSHandPointN_Click ()
  505.     WdwCursor = "HandPointN"
  506.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  507. End Sub
  508.  
  509. Sub mnuSHandPointS_Click ()
  510.     WdwCursor = "HandPointS"
  511.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  512. End Sub
  513.  
  514. Sub mnuSHandPointW_Click ()
  515.     WdwCursor = "HandPointW"
  516.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  517. End Sub
  518.  
  519. Sub mnuSTrekPointer_Click ()
  520.     WdwCursor = "TrekPointer"
  521.     ThisCursor& = MakeCursor(Me.hWnd, WdwCursor)
  522. End Sub
  523.  
  524. Sub Option1_MouseMove (index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  525.     If Timer1.Enabled = True Then Exit Sub
  526.     ThisCursor& = MakeCursor(Option1(index).hWnd, "DartNW")
  527. End Sub
  528.  
  529. Sub Option2_MouseMove (index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  530.     If Timer1.Enabled = True Then Exit Sub
  531.     ThisCursor& = MakeCursor(Option2(index).hWnd, "DartSW")
  532. End Sub
  533.  
  534. Sub Text1_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  535.     If Timer1.Enabled = True Then Exit Sub
  536.     ThisCursor& = MakeCursor(Text1.hWnd, "Pencil")
  537. End Sub
  538.  
  539. Sub Text2_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  540.     If Timer1.Enabled = True Then Exit Sub
  541.     ThisCursor& = MakeCursor(Text2.hWnd, "FountainPen")
  542. End Sub
  543.  
  544. Sub Timer1_Timer ()
  545.     If WaitType = 1 Then
  546.         TheCursor$ = "Timer" + Format$(TimerCursor, "#")
  547.         WaitMax% = 8
  548.         Else
  549.         TheCursor$ = "HourGlass" + Format$(TimerCursor, "#")
  550.         WaitMax% = 7
  551.         End If
  552.     For i = 2 To 14 'Exclude MainForm and Menu Items
  553.         ThisCursor& = MakeCursor(Me.Controls(i).hWnd, TheCursor$)
  554.         Next i
  555.     ThisCursor& = MakeSysCursor(Me.hWnd, TheCursor$)
  556.     TimerCursor = TimerCursor + 1
  557.     If TimerCursor > WaitMax% Then TimerCursor = 1
  558. End Sub
  559.  
  560.