home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / msgdemo / msgdem1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  2.0 KB  |  69 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Using Forms as Message Boxes"
  4.    ClientHeight    =   1935
  5.    ClientLeft      =   1980
  6.    ClientTop       =   2370
  7.    ClientWidth     =   6090
  8.    Height          =   2340
  9.    Left            =   1920
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   1935
  13.    ScaleWidth      =   6090
  14.    Top             =   2025
  15.    Width           =   6210
  16.    Begin CommandButton Command2 
  17.       Caption         =   "Exit"
  18.       Height          =   375
  19.       Left            =   3240
  20.       TabIndex        =   1
  21.       Top             =   1200
  22.       Width           =   1095
  23.    End
  24.    Begin CommandButton Command1 
  25.       Caption         =   "Demo"
  26.       Height          =   375
  27.       Left            =   1800
  28.       TabIndex        =   0
  29.       Top             =   1200
  30.       Width           =   1095
  31.    End
  32. Sub Command1_Click ()
  33. mousepointer = 11
  34. 'Creates Static Message
  35. form2.caption = "Program Routine Running--Please Be Patient..."
  36. form2.Show 'Insert *BEFORE LOOP OR ROUTINE*
  37. For i = 1 To 10000
  38. form2.Hide
  39. form2.caption = " " ' Include a space to keep give form size.
  40. form2.Show 'Insert *BEFORE LOOP*
  41. 'Below: Setting the caption flashes the form.
  42. For i = 1 To 25
  43.     form2.caption = "Create a Flashing Message--Attracts Attention!"
  44.     For r = 1 To 2500
  45.     Next
  46. form2.Hide
  47. form2.caption = " "
  48. 'Below: Here you can increment anything you like.
  49. form2.Show
  50. For i = 1 To 25
  51.     form2.caption = "Create a Flashing Counter: " + Str$(i)
  52.     For r = 1 To 1500
  53.     Next
  54. form2.Hide
  55. mousepointer = 1
  56. End Sub
  57. Sub Command2_Click ()
  58. End Sub
  59. Sub Form_Load ()
  60. 'The routine below is useful when you do a lot
  61. 'while a program is loading.  Prevents panic
  62. 'for users. Use in Form_Load sub, naturally using
  63. 'your own commands in place of this loop.
  64. form2.caption = "Program Now Loading.....Wait..."
  65. form2.Show
  66. For i = 1 To 25000
  67. form2.Hide
  68. End Sub
  69.