home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / winprogs / gcp_24 / main.fr_ / main.fr (.txt)
Encoding:
Visual Basic Form  |  1994-03-05  |  4.3 KB  |  107 lines

  1. VERSION 2.00
  2. Begin MDIForm frmMDI 
  3.    Caption         =   "VT-220 for Workgroups"
  4.    ClientHeight    =   4665
  5.    ClientLeft      =   1380
  6.    ClientTop       =   2595
  7.    ClientWidth     =   8010
  8.    Height          =   5325
  9.    Icon            =   MAIN.FRX:0000
  10.    Left            =   1335
  11.    LinkTopic       =   "MDIForm1"
  12.    Top             =   1980
  13.    Width           =   8100
  14.    Begin Menu mnuFile 
  15.       Caption         =   "&File"
  16.       Begin Menu mnuFNew 
  17.          Caption         =   "&New..."
  18.       End
  19.       Begin Menu mnuFOpen 
  20.          Caption         =   "&Open..."
  21.       End
  22.       Begin Menu mnuBlank1 
  23.          Caption         =   "-"
  24.       End
  25.       Begin Menu mnuFExit 
  26.          Caption         =   "E&xit"
  27.       End
  28.    End
  29.    Begin Menu mnuHelp 
  30.       Caption         =   "&Help"
  31.       Begin Menu mnuHContents 
  32.          Caption         =   "&Contents..."
  33.       End
  34.       Begin Menu mnuHAbout 
  35.          Caption         =   "&About..."
  36.       End
  37.    End
  38. Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lplFileName As String) As Integer
  39. Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
  40. Declare Function GetPrivateProfileInt Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Integer, ByVal lpFileName As String) As Integer
  41. Sub MDIForm_Load ()
  42. '*********************************************************************************************
  43. '* Variables for messaging - DNW
  44. '*********************************************************************************************
  45. Const MB_OK = 0, MB_OKCANCEL = 1  ' Define buttons.
  46. Const MB_ICONEXCLAMATION = 48, MB_ICONINFORMATION = 64
  47. Const MB_DEFBUTTON2 = 256, IDYES = 6, IDNO = 7  ' Define other.
  48. Dim DgDef, msg, Response, title ' Declare variables.
  49. Dim intRunningApp%              ' Stores true or false depending on whether the app is already running - DNW
  50. Dim FNum, FormLeft, FormTop, FormWidth, FormHeight
  51. On Error GoTo mdiform_load_error
  52. App.HelpFile = "vt220wfg.hlp"
  53.     ' Application starts here (Load event of Startup form).
  54.     ' Always set working directory to directory containing the application.
  55.     ChDir App.Path
  56.     ' Icon shows us closed
  57.     Icon = LoadPicture("net09b.ico")
  58.     'Initialize document form arrays, and show first document.
  59.     ReDim Document(1)
  60.     ReDim FState(1)
  61.     FState(1).Deleted = True
  62.     Left = GetPrivateProfileInt(AppName, "Left", 1000, IniFile)
  63.     Width = GetPrivateProfileInt(AppName, "Width", 10000, IniFile)
  64.     Top = GetPrivateProfileInt(AppName, "Top", 1000, IniFile)
  65.     Height = GetPrivateProfileInt(AppName, "Height", 8000, IniFile)
  66.     Show
  67.     CenterForm frmMDI, OpenSession
  68.     OpenSession.Show 1
  69.     Exit Sub
  70. '*********************************************************************************************
  71. '* Error handling routine for the mdi form load
  72. '*********************************************************************************************
  73. mdiform_load_error:
  74.   title = "Err"
  75.   msg = "An error occurred starting.  The error is: " & Error(Err) & "."
  76.   DgDef = MB_OK + MB_ICONEXCLAMATION  ' Describe dialog.
  77.   Response = MsgBox(msg, DgDef, title)  ' Get user response.
  78. End Sub
  79. Sub MDIForm_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  80.     Unload frmMDI
  81. End Sub
  82. Sub MDIForm_Unload (Cancel As Integer)
  83.     success = WritePrivateProfileString(AppName, "Left", Str$(Left), IniFile)
  84.     success = WritePrivateProfileString(AppName, "Top", Str$(Top), IniFile)
  85.     success = WritePrivateProfileString(AppName, "Width", Str$(Width), IniFile)
  86.     success = WritePrivateProfileString(AppName, "Height", Str$(Height), IniFile)
  87.     Unload ConnectDlg
  88.     End
  89. End Sub
  90. Sub mnuFExit_Click ()
  91.     Unload Me
  92. End Sub
  93. Sub mnuFNew_Click ()
  94.     CenterForm frmMDI, NewSession
  95.     NewSession.Show 1
  96. End Sub
  97. Sub mnuFOpen_Click ()
  98.     CenterForm frmMDI, OpenSession
  99.     OpenSession.Show 1
  100. End Sub
  101. Sub mnuHAbout_Click ()
  102.     frmAbout.Show 1
  103. End Sub
  104. Sub mnuHContents_Click ()
  105.     r = Shell("WinHelp.exe vt220fwg.hlp")
  106. End Sub
  107.