home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / getyour.zip / FORM1.FRM < prev    next >
Text File  |  1993-11-20  |  5KB  |  130 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    AutoRedraw      =   -1  'True
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "GetYour$"
  7.    ClientHeight    =   960
  8.    ClientLeft      =   4152
  9.    ClientTop       =   6252
  10.    ClientWidth     =   3372
  11.    Height          =   1704
  12.    Icon            =   FORM1.FRX:0000
  13.    Left            =   4104
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    ScaleHeight     =   960
  17.    ScaleWidth      =   3372
  18.    Top             =   5556
  19.    Width           =   3468
  20.    Begin Menu RDME 
  21.       Caption         =   "&Read Me"
  22.    End
  23.    Begin Menu hlp 
  24.       Caption         =   "&Help"
  25.       Begin Menu abt 
  26.          Caption         =   "&About..."
  27.       End
  28.       Begin Menu Sep1 
  29.          Caption         =   "-"
  30.       End
  31.       Begin Menu Ord 
  32.          Caption         =   "&Order..."
  33.       End
  34.       Begin Menu EntReg 
  35.          Caption         =   "&Enter Registration Number..."
  36.       End
  37.    End
  38. End
  39.  
  40. Sub abt_Click ()
  41. AboutBox.Show MODAL
  42. End Sub
  43.  
  44. Sub EntReg_Click ()
  45. RegNum.Show MODAL
  46. End Sub
  47.  
  48. Sub Form_Load ()
  49.  
  50.  
  51.  
  52.  
  53.     RegStat = Space$(31)
  54.     i% = GetPrivateProfileString("GetYour$", "Serial", "Unregistered Copy", RegStat, 30, INIFILENAME$)
  55.     RegStat = Left$(RegStat, i%)
  56.     RegStat = LTrim$(RTrim$(RegStat))
  57.  
  58.  
  59.     First = Space$(31)
  60.     i% = GetPrivateProfileString("GetYour$", "FirstName", "First Name", First, 30, INIFILENAME$)
  61.     First = Left$(First, i%)
  62.     First = LTrim$(RTrim$(First))
  63.     
  64.     Last = Space$(31)
  65.     i% = GetPrivateProfileString("GetYour$", "LastName", "Last Name", Last, 30, INIFILENAME$)
  66.     Last = Left$(Last, i%)
  67.     Last = LTrim$(RTrim$(Last))
  68.  
  69.  If RegStat = SerialNum$ Then
  70.     Ord.Visible = 0
  71.     EntReg.Visible = 0
  72.     Sep1.Visible = 0
  73.     Else
  74.     Const MB_OK = 0, MB_OKCANCEL = 1
  75.     Const MB_YESNOCANCEL = 3, MB_YESNO = 4
  76.     Const MB_ICONSTOP = 16, MB_ICONQUESTION = 32
  77.     Const MB_ICONEXCLAMATION = 48, MB_ICONINFORMATION = 64
  78.     Const MB_DEFBUTTON2 = 0, IDYES = 6, IDNO = 7
  79.     Title$ = "Shareware Reminder"
  80.         Msg$ = "GetYour$ is Shareware. If you find it useful, please register it! Registering the program will eliminate this reminder! We accept VISA And MasterCard. Would you like to order now?"
  81.     DgDef% = MB_YESNO + MB_ICONEXCLAMATION + MB_DEFBUTTON2
  82.     Response% = MsgBox(Msg$, DgDef%, Title$)
  83.     If Response% = IDYES Then
  84.     Order.Show MODAL
  85.     End If
  86. End If
  87.  
  88.  
  89. End Sub
  90.  
  91. Sub Form_Unload (Cancel As Integer)
  92.  
  93. i% = WritePrivateProfileString("GetYour$", "Serial", RegStat, INIFILENAME$)
  94. i% = WritePrivateProfileString("GetYour$", "FirstName", First, INIFILENAME$)
  95. i% = WritePrivateProfileString("GetYour$", "LastName", Last, INIFILENAME$)
  96.  
  97.  
  98.  If RegStat <> SerialNum$ Then
  99.     Const MB_OK = 0, MB_OKCANCEL = 1
  100.     Const MB_YESNOCANCEL = 3, MB_YESNO = 4
  101.     Const MB_ICONSTOP = 16, MB_ICONQUESTION = 32
  102.     Const MB_ICONEXCLAMATION = 48, MB_ICONINFORMATION = 64
  103.     Const MB_DEFBUTTON2 = 0, IDYES = 6, IDNO = 7
  104.     Title$ = "Shareware Reminder"
  105.         Msg$ = "GetYour$ is Shareware. If you find it useful, please register it! Registering the program will eliminate this reminder! We accept VISA And MasterCard. Would you like to order now?"
  106.     DgDef% = MB_YESNO + MB_ICONEXCLAMATION + MB_DEFBUTTON2
  107.     Response% = MsgBox(Msg$, DgDef%, Title$)
  108.     If Response% = IDYES Then
  109.     Order.Show MODAL
  110.     End
  111.     Else
  112.     End
  113.     End If
  114. End If
  115.  
  116. End
  117.  
  118. End Sub
  119.  
  120. Sub Ord_Click ()
  121. Order.Show MODAL
  122. End Sub
  123.  
  124. Sub RDME_Click ()
  125. Msg1 = "GetYour$ is a demo of code I use regularly in my apps to politely remind the user that they are using Shareware, provide an order form that will always stay with the unregistered app and provide for registration number entry to disable the Shareware nag screens and customize the app with the user's name. It really works well! To enter the password click on Enter Registration Number. The password for this demo is 1234567. Note that if you enter it correctly or incorrectly a corresponding message comes up. Entering the password also disables the menu selections for the order and registration items and customizes the About box with the registrant's name. The order form's Text1.LostFocus event contains all the code for pricing, tax, shipping, etc. The order form includes provision for VISA and MasterCard. If you would like to get approved to accept credit cards for payment, contact me. The included 3Dlabel custom control is public domain."
  126. Msg2 = "If you find this code useful, please send the author $5. Choose Order to print an order form. If you have any questions, my CIS number is 73027,3307 and my AOL id is MikeH1259."
  127. MsgBox Msg1 + " " + Msg2
  128. End Sub
  129.  
  130.