home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / str_plus / demomain.frm next >
Text File  |  1994-07-19  |  6KB  |  204 lines

  1. VERSION 2.00
  2. Begin Form DemoMain 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "String Plus Demo"
  6.    ClientHeight    =   4020
  7.    ClientLeft      =   975
  8.    ClientTop       =   1755
  9.    ClientWidth     =   7335
  10.    ClipControls    =   0   'False
  11.    FillColor       =   &H00FF00FF&
  12.    Height          =   4710
  13.    Left            =   915
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    ScaleHeight     =   4020
  17.    ScaleWidth      =   7335
  18.    Top             =   1125
  19.    Width           =   7455
  20.    Begin CommandButton CmdTrick 
  21.       Cancel          =   -1  'True
  22.       Caption         =   "Trick"
  23.       Default         =   -1  'True
  24.       Height          =   375
  25.       Left            =   7440
  26.       TabIndex        =   1
  27.       Top             =   4320
  28.       Width           =   1095
  29.    End
  30.    Begin Label Label1 
  31.       Alignment       =   2  'Center
  32.       BackColor       =   &H00C0C0C0&
  33.       Caption         =   "Label1"
  34.       Height          =   2055
  35.       Left            =   1200
  36.       TabIndex        =   0
  37.       Top             =   480
  38.       Width           =   4935
  39.    End
  40.    Begin Menu mnuDemo 
  41.       Caption         =   "&Demos"
  42.       Begin Menu mnuDemoKeyState 
  43.          Caption         =   "&KeyState Information..."
  44.       End
  45.       Begin Menu mnuDemoManipulate 
  46.          Caption         =   "&Manipulate Strings..."
  47.       End
  48.       Begin Menu mnuDemoNumber 
  49.          Caption         =   "&Number Strings..."
  50.       End
  51.       Begin Menu mnuDemoSuperTextOut 
  52.          Caption         =   "&SuperPrint..."
  53.       End
  54.       Begin Menu mnuDemoTextJustify 
  55.          Caption         =   "Text &Justification..."
  56.       End
  57.       Begin Menu mnuDemoTokens 
  58.          Caption         =   "&Tokens..."
  59.       End
  60.       Begin Menu mnuDemoWordCount 
  61.          Caption         =   "&Word Count..."
  62.       End
  63.       Begin Menu mnuDemoSep1 
  64.          Caption         =   "-"
  65.       End
  66.       Begin Menu mnuDemoExit 
  67.          Caption         =   "E&xit"
  68.       End
  69.    End
  70.    Begin Menu mnuHelp 
  71.       Caption         =   "&Help"
  72.       Begin Menu mnuHelpContents 
  73.          Caption         =   "DLL Help &Contents..."
  74.       End
  75.       Begin Menu mnuHelpSearch 
  76.          Caption         =   "DLL Help &Search..."
  77.       End
  78.       Begin Menu mnuHelpSep 
  79.          Caption         =   "-"
  80.       End
  81.       Begin Menu mnuHelpOrderForm 
  82.          Caption         =   "&Order Form..."
  83.       End
  84.       Begin Menu mnuHelpEvaluation 
  85.          Caption         =   "&Evaluation Form..."
  86.       End
  87.    End
  88. End
  89.  
  90. Sub CmdTrick_Click ()
  91.     Unload Me
  92. End Sub
  93.  
  94. Sub Form_Load ()
  95.     x% = GetStrPlusVersion()
  96.     
  97.     nl = Chr$(13) + Chr$(10)
  98.     FormCenterScreen Me
  99.     mnuHelp.Caption = Chr$(8) + "&Help"
  100.     
  101.     msg$ = nl + "This small application demonstrates some" + nl
  102.     msg$ = msg$ + "of the functions of StrPlus.DLL and a few" + nl
  103.     msg$ = msg$ + "VB tricks too.  Print and study the program" + nl
  104.     msg$ = msg$ + "to fully understand how it all works" + nl
  105.     msg$ = msg$ + "together.  Also, read the online Help file" + nl
  106.     msg$ = msg$ + "StrPlus.HLP to learn about the functions in" + nl
  107.     msg$ = msg$ + " this version of StrPlus ... and about how to" + nl
  108.     msg$ = msg$ + " register this shareware utility."
  109.     label1.Caption = msg$
  110. End Sub
  111.  
  112. Sub Form_Paint ()
  113.     DoForm3D Me, sunken, 3, 0
  114.     DoForm3D Me, raised, 1, 3
  115.     DoControl3D label1, raised, 4
  116. End Sub
  117.  
  118. Sub Form_Unload (Cancel As Integer)
  119.     'SBhWnd% = GetStatusBarhWnd(Me.hWnd)
  120.     'dummy% = DestroyWindow(SBhWnd%)
  121. End Sub
  122.  
  123. Sub mnuDemoExit_Click ()
  124.     Unload Me
  125. End Sub
  126.  
  127. Sub mnuDemoKeyState_Click ()
  128.     Screen.MousePointer = 11
  129.     KeyInfo.Show 1
  130. End Sub
  131.  
  132. Sub mnuDemoManipulate_Click ()
  133.     Screen.MousePointer = 11
  134.     StrMan.Show 1
  135. End Sub
  136.  
  137. Sub mnuDemoNumber_Click ()
  138.     Screen.MousePointer = 11
  139.     NbrStr.Show 1
  140. End Sub
  141.  
  142. Sub mnuDemoSuperTextOut_Click ()
  143.     Screen.MousePointer = 11
  144.     TextOut.Show 1
  145. End Sub
  146.  
  147. Sub mnuDemoTextJustify_Click ()
  148.     Screen.MousePointer = 11
  149.     TextJust.Show 1
  150. End Sub
  151.  
  152. Sub mnuDemoTokens_Click ()
  153.     Screen.MousePointer = 11
  154.     Tokens.Show 1
  155. End Sub
  156.  
  157. Sub mnuDemoWordCount_Click ()
  158.     Screen.MousePointer = 11
  159.     WordCnt.Show 1
  160. End Sub
  161.  
  162. Sub mnuHelpContents_Click ()
  163.     On Error Resume Next
  164.     MyHelpFile$ = App.Path
  165.     MyHelpFile$ = AddSeparator(MyHelpFile$) + "STRPLUS.HLP"
  166.     Screen.MousePointer = 11
  167.     ret% = WinHelp(Me.hWnd, MyHelpFile$, HELP_CONTENTS, 0&)
  168.     Screen.MousePointer = 0
  169. End Sub
  170.  
  171. Sub mnuHelpEvaluation_Click ()
  172.         On Error Resume Next
  173.         WinPath$ = GetWinDir()
  174.         WinPath$ = AddSeparator(WinPath$) + "WRITE.EXE"
  175.         DocPath$ = App.Path
  176.         DocPath$ = AddSeparator(DocPath$) + "EVALFRM.WRI"
  177.         FullPath$ = WinPath$ + " " + DocPath$
  178.         Screen.MousePointer = 11
  179.         x = Shell(FullPath$, 3)
  180.         Screen.MousePointer = 0
  181. End Sub
  182.  
  183. Sub mnuHelpOrderForm_Click ()
  184.         On Error Resume Next
  185.         WinPath$ = GetWinDir()
  186.         WinPath$ = AddSeparator(WinPath$) + "WRITE.EXE"
  187.         DocPath$ = App.Path
  188.         DocPath$ = AddSeparator(DocPath$) + "ORDERFRM.WRI"
  189.         FullPath$ = WinPath$ + " " + DocPath$
  190.         Screen.MousePointer = 11
  191.         x = Shell(FullPath$, 3)
  192.         Screen.MousePointer = 0
  193. End Sub
  194.  
  195. Sub mnuHelpSearch_Click ()
  196.     On Error Resume Next
  197.     MyHelpFile$ = App.Path
  198.     MyHelpFile$ = AddSeparator(MyHelpFile$) + "STRPLUS.HLP"
  199.     Screen.MousePointer = 11
  200.     ret% = WinHelp(Me.hWnd, MyHelpFile$, HELP_PARTIALKEY, "")
  201.     Screen.MousePointer = 0
  202. End Sub
  203.  
  204.