home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / nagscrn / regnum.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-06-15  |  9.4 KB  |  270 lines

  1. VERSION 4.00
  2. Begin VB.Form RegNum 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H80000005&
  5.    Caption         =   "Registration Information"
  6.    ClientHeight    =   3105
  7.    ClientLeft      =   3465
  8.    ClientTop       =   1485
  9.    ClientWidth     =   4995
  10.    ControlBox      =   0   'False
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   1
  14.       weight          =   700
  15.       size            =   8.25
  16.       underline       =   0   'False
  17.       italic          =   0   'False
  18.       strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H80000008&
  21.    Height          =   3510
  22.    Left            =   3405
  23.    LinkTopic       =   "Form3"
  24.    MaxButton       =   0   'False
  25.    MinButton       =   0   'False
  26.    ScaleHeight     =   3105
  27.    ScaleWidth      =   4995
  28.    Top             =   1140
  29.    Width           =   5115
  30.    Begin Threed.SSPanel pnlReg 
  31.       Height          =   3090
  32.       Left            =   -15
  33.       TabIndex        =   6
  34.       Top             =   -15
  35.       Width           =   4995
  36.       _version        =   65536
  37.       _extentx        =   8811
  38.       _extenty        =   5450
  39.       _stockprops     =   15
  40.       backcolor       =   -2147483633
  41.       bevelouter      =   0
  42.       Begin Threed.SSPanel pnlButton 
  43.          Height          =   810
  44.          Left            =   915
  45.          TabIndex        =   7
  46.          Top             =   1920
  47.          Width           =   3180
  48.          _version        =   65536
  49.          _extentx        =   5609
  50.          _extenty        =   1429
  51.          _stockprops     =   15
  52.          backcolor       =   -2147483633
  53.          BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  54.             name            =   "MS Sans Serif"
  55.             charset         =   1
  56.             weight          =   400
  57.             size            =   8.25
  58.             underline       =   0   'False
  59.             italic          =   0   'False
  60.             strikethrough   =   0   'False
  61.          EndProperty
  62.          bevelouter      =   0
  63.          bevelinner      =   1
  64.          Begin Threed.SSCommand btnClose 
  65.             Height          =   690
  66.             Left            =   1590
  67.             TabIndex        =   5
  68.             Top             =   60
  69.             Width           =   1515
  70.             _version        =   65536
  71.             _extentx        =   2672
  72.             _extenty        =   1217
  73.             _stockprops     =   78
  74.             caption         =   "Close"
  75.             BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  76.                name            =   "MS Sans Serif"
  77.                charset         =   1
  78.                weight          =   400
  79.                size            =   8.25
  80.                underline       =   0   'False
  81.                italic          =   0   'False
  82.                strikethrough   =   0   'False
  83.             EndProperty
  84.          End
  85.          Begin Threed.SSCommand btnOK 
  86.             Height          =   690
  87.             Left            =   45
  88.             TabIndex        =   4
  89.             Top             =   60
  90.             Width           =   1560
  91.             _version        =   65536
  92.             _extentx        =   2752
  93.             _extenty        =   1217
  94.             _stockprops     =   78
  95.             caption         =   "OK"
  96.             BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  97.                name            =   "MS Sans Serif"
  98.                charset         =   1
  99.                weight          =   400
  100.                size            =   8.25
  101.                underline       =   0   'False
  102.                italic          =   0   'False
  103.                strikethrough   =   0   'False
  104.             EndProperty
  105.          End
  106.       End
  107.       Begin Threed.SSPanel pnlSerial 
  108.          Height          =   480
  109.          Left            =   1305
  110.          TabIndex        =   9
  111.          Top             =   1140
  112.          Width           =   2415
  113.          _version        =   65536
  114.          _extentx        =   4260
  115.          _extenty        =   847
  116.          _stockprops     =   15
  117.          backcolor       =   -2147483633
  118.          BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  119.             name            =   "MS Sans Serif"
  120.             charset         =   1
  121.             weight          =   400
  122.             size            =   8.25
  123.             underline       =   0   'False
  124.             italic          =   0   'False
  125.             strikethrough   =   0   'False
  126.          EndProperty
  127.          bevelouter      =   0
  128.          bevelinner      =   1
  129.          Begin VB.TextBox RegNumText 
  130.             Alignment       =   2  'Center
  131.             Appearance      =   0  'Flat
  132.             BorderStyle     =   0  'None
  133.             Height          =   255
  134.             Left            =   90
  135.             MultiLine       =   -1  'True
  136.             TabIndex        =   3
  137.             Text            =   "REGNUM.frx":0000
  138.             Top             =   150
  139.             Width           =   2250
  140.          End
  141.       End
  142.       Begin Threed.SSPanel pnlLast 
  143.          Height          =   480
  144.          Left            =   2730
  145.          TabIndex        =   8
  146.          Top             =   270
  147.          Width           =   1920
  148.          _version        =   65536
  149.          _extentx        =   3387
  150.          _extenty        =   847
  151.          _stockprops     =   15
  152.          backcolor       =   -2147483633
  153.          BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  154.             name            =   "MS Sans Serif"
  155.             charset         =   1
  156.             weight          =   400
  157.             size            =   8.25
  158.             underline       =   0   'False
  159.             italic          =   0   'False
  160.             strikethrough   =   0   'False
  161.          EndProperty
  162.          bevelouter      =   0
  163.          bevelinner      =   1
  164.          Begin VB.TextBox LastName 
  165.             Alignment       =   2  'Center
  166.             Appearance      =   0  'Flat
  167.             BorderStyle     =   0  'None
  168.             Height          =   240
  169.             Left            =   90
  170.             MultiLine       =   -1  'True
  171.             TabIndex        =   2
  172.             Text            =   "REGNUM.frx":0012
  173.             Top             =   135
  174.             Width           =   1740
  175.          End
  176.       End
  177.       Begin Threed.SSPanel pnlFirst 
  178.          Height          =   480
  179.          Left            =   390
  180.          TabIndex        =   0
  181.          Top             =   270
  182.          Width           =   1920
  183.          _version        =   65536
  184.          _extentx        =   3387
  185.          _extenty        =   847
  186.          _stockprops     =   15
  187.          backcolor       =   -2147483633
  188.          BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  189.             name            =   "MS Sans Serif"
  190.             charset         =   1
  191.             weight          =   400
  192.             size            =   8.25
  193.             underline       =   0   'False
  194.             italic          =   0   'False
  195.             strikethrough   =   0   'False
  196.          EndProperty
  197.          bevelouter      =   0
  198.          bevelinner      =   1
  199.          Begin VB.TextBox FirstName 
  200.             Alignment       =   2  'Center
  201.             Appearance      =   0  'Flat
  202.             BorderStyle     =   0  'None
  203.             Height          =   225
  204.             Left            =   60
  205.             MultiLine       =   -1  'True
  206.             TabIndex        =   1
  207.             Text            =   "REGNUM.frx":001C
  208.             Top             =   120
  209.             Width           =   1800
  210.          End
  211.       End
  212.    End
  213. Attribute VB_Name = "RegNum"
  214. Attribute VB_Creatable = False
  215. Attribute VB_Exposed = False
  216. Private Sub btnClose_Click()
  217.     ' User has chosen "Close" button.
  218.           Unload RegNum
  219. End Sub
  220. Private Sub btnOK_Click()
  221.           ' If the correct serial number is entered the first message
  222.           ' box will be displayed. Otherwise user will be told he
  223.           ' entered incorrect information.
  224.           If RegNumText.Text = SerialNum$ Then
  225.           frmNag.RegPanel.Visible = 0
  226.           frmNag.RegButton.Visible = 0
  227.           MsgBox ("Thank you " + FirstName.Text + ", the number entered: " + RegNumText.Text + " was valid, please store this number in a safe place in case it is needed in the future. Again, thank you for registering <Your Program Name>."), 48, "Thank You!"
  228.           RegStat = RegNumText.Text
  229.           First = FirstName.Text
  230.           Last = LastName.Text
  231.           Else
  232.           Beep
  233.           RegNum.Hide
  234.           MsgBox ("You have entered an incorrect number."), 48, "Sorry..."
  235.           End If
  236.           Unload RegNum
  237. End Sub
  238. Private Sub FirstName_GotFocus()
  239. 'Calls "SelectWholeText" function.
  240. SelectWholeText FirstName
  241. End Sub
  242. Private Sub FirstName_KeyPress(KeyAscii As Integer)
  243. C$ = Chr$(KeyAscii)
  244. C$ = UCase$(C$)
  245. KeyAscii = Asc(C$)
  246. End Sub
  247. Private Sub Form_Load()
  248.     'Center form on screen.
  249.     Left = (Screen.Width - Width) \ 2
  250.     Top = (Screen.Height - Height) \ 2
  251. End Sub
  252. Private Sub LastName_GotFocus()
  253. 'Calls "SelectWholeText" function.
  254. SelectWholeText LastName
  255. End Sub
  256. Private Sub LastName_KeyPress(KeyAscii As Integer)
  257. C$ = Chr$(KeyAscii)
  258. C$ = UCase$(C$)
  259. KeyAscii = Asc(C$)
  260. End Sub
  261. Private Sub RegNumText_GotFocus()
  262. 'Calls "SelectWholeText" function.
  263. SelectWholeText RegNumText
  264. End Sub
  265. Private Sub RegNumText_KeyPress(KeyAscii As Integer)
  266. C$ = Chr$(KeyAscii)
  267. C$ = UCase$(C$)
  268. KeyAscii = Asc(C$)
  269. End Sub
  270.