home *** CD-ROM | disk | FTP | other *** search
/ On Hand / On_Hand_From_Softbank_1994_Release_2_Disc_2_1994.iso / 00202 / s / disk1 / mdi.fr_ / mdi.bin
Text File  |  1993-04-28  |  12KB  |  378 lines

  1. VERSION 2.00
  2. Begin MDIForm frmMDI 
  3.    Caption         =   "MDI NotePad"
  4.    ClientHeight    =   4785
  5.    ClientLeft      =   1620
  6.    ClientTop       =   1815
  7.    ClientWidth     =   5685
  8.    Height          =   5475
  9.    Left            =   1560
  10.    LinkTopic       =   "MDIForm1"
  11.    Top             =   1185
  12.    Width           =   5805
  13.    Begin PictureBox picToolbar 
  14.       Align           =   1  'Align Top
  15.       BackColor       =   &H8000000F&
  16.       Height          =   375
  17.       Left            =   0
  18.       ScaleHeight     =   345
  19.       ScaleWidth      =   5655
  20.       TabIndex        =   0
  21.       Top             =   0
  22.       Width           =   5685
  23.       Begin CommonDialog CMDialog1 
  24.          CancelError     =   -1  'True
  25.          Filter          =   "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"
  26.          Left            =   1680
  27.          Top             =   0
  28.       End
  29.       Begin Image imgPasteButtonUp 
  30.          Height          =   330
  31.          Left            =   5280
  32.          Picture         =   MDI.FRX:0000
  33.          Top             =   0
  34.          Visible         =   0   'False
  35.          Width           =   375
  36.       End
  37.       Begin Image imgPasteButtonDn 
  38.          Height          =   330
  39.          Left            =   4920
  40.          Picture         =   MDI.FRX:01DA
  41.          Top             =   0
  42.          Visible         =   0   'False
  43.          Width           =   375
  44.       End
  45.       Begin Image imgCopyButtonDn 
  46.          Height          =   330
  47.          Left            =   4200
  48.          Picture         =   MDI.FRX:03B4
  49.          Top             =   0
  50.          Visible         =   0   'False
  51.          Width           =   375
  52.       End
  53.       Begin Image imgCopyButtonUp 
  54.          Height          =   330
  55.          Left            =   4560
  56.          Picture         =   MDI.FRX:058E
  57.          Top             =   0
  58.          Visible         =   0   'False
  59.          Width           =   375
  60.       End
  61.       Begin Image imgCutButtonDn 
  62.          Height          =   330
  63.          Left            =   3840
  64.          Picture         =   MDI.FRX:0768
  65.          Top             =   0
  66.          Visible         =   0   'False
  67.          Width           =   375
  68.       End
  69.       Begin Image imgCutButtonUp 
  70.          Height          =   330
  71.          Left            =   3480
  72.          Picture         =   MDI.FRX:0942
  73.          Top             =   0
  74.          Visible         =   0   'False
  75.          Width           =   375
  76.       End
  77.       Begin Image imgFileOpenButtonDn 
  78.          Height          =   330
  79.          Left            =   2760
  80.          Picture         =   MDI.FRX:0B1C
  81.          Top             =   0
  82.          Visible         =   0   'False
  83.          Width           =   360
  84.       End
  85.       Begin Image imgFileOpenButtonUp 
  86.          Height          =   330
  87.          Left            =   3120
  88.          Picture         =   MDI.FRX:0C9E
  89.          Top             =   0
  90.          Visible         =   0   'False
  91.          Width           =   360
  92.       End
  93.       Begin Image imgFileNewButtonUp 
  94.          Height          =   330
  95.          Left            =   2400
  96.          Picture         =   MDI.FRX:0E20
  97.          Top             =   0
  98.          Visible         =   0   'False
  99.          Width           =   360
  100.       End
  101.       Begin Image imgFileNewButtonDn 
  102.          Height          =   330
  103.          Left            =   2040
  104.          Picture         =   MDI.FRX:0FA2
  105.          Top             =   0
  106.          Visible         =   0   'False
  107.          Width           =   375
  108.       End
  109.       Begin Image imgPasteButton 
  110.          Height          =   330
  111.          Left            =   1560
  112.          Picture         =   MDI.FRX:117C
  113.          Top             =   0
  114.          Width           =   375
  115.       End
  116.       Begin Image imgCopyButton 
  117.          Height          =   330
  118.          Left            =   1200
  119.          Picture         =   MDI.FRX:1356
  120.          Top             =   0
  121.          Width           =   375
  122.       End
  123.       Begin Image imgCutButton 
  124.          Height          =   330
  125.          Left            =   840
  126.          Picture         =   MDI.FRX:1530
  127.          Top             =   0
  128.          Width           =   375
  129.       End
  130.       Begin Image imgFileOpenButton 
  131.          Height          =   330
  132.          Left            =   360
  133.          Picture         =   MDI.FRX:170A
  134.          Top             =   0
  135.          Width           =   360
  136.       End
  137.       Begin Image imgFileNewButton 
  138.          Height          =   330
  139.          Left            =   0
  140.          Picture         =   MDI.FRX:188C
  141.          Top             =   0
  142.          Width           =   360
  143.       End
  144.    End
  145.    Begin Menu mnuFile 
  146.       Caption         =   "&File"
  147.       Begin Menu mnuFNew 
  148.          Caption         =   "&New"
  149.       End
  150.       Begin Menu mnuFOpen 
  151.          Caption         =   "&Open"
  152.       End
  153.       Begin Menu mnuFExit 
  154.          Caption         =   "E&xit"
  155.       End
  156.       Begin Menu mnuRecentFile 
  157.          Caption         =   "-"
  158.          Index           =   0
  159.          Visible         =   0   'False
  160.       End
  161.       Begin Menu mnuRecentFile 
  162.          Caption         =   "RecentFile1"
  163.          Index           =   1
  164.          Visible         =   0   'False
  165.       End
  166.       Begin Menu mnuRecentFile 
  167.          Caption         =   "RecentFile2"
  168.          Index           =   2
  169.          Visible         =   0   'False
  170.       End
  171.       Begin Menu mnuRecentFile 
  172.          Caption         =   "RecentFile3"
  173.          Index           =   3
  174.          Visible         =   0   'False
  175.       End
  176.       Begin Menu mnuRecentFile 
  177.          Caption         =   "RecentFile4"
  178.          Index           =   4
  179.          Visible         =   0   'False
  180.       End
  181.    End
  182.    Begin Menu mnuOptions 
  183.       Caption         =   "&Options"
  184.       Begin Menu mnuOToolbar 
  185.          Caption         =   "&Toolbar"
  186.       End
  187.    End
  188. End
  189.  
  190. Sub imgCopyButton_Click ()
  191.     imgCopyButton.Refresh
  192.     EditCopyProc
  193. End Sub
  194.  
  195. Sub imgCopyButton_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  196.     imgCopyButton.Picture = imgCopyButtonDn.Picture
  197. End Sub
  198.  
  199. Sub imgCopyButton_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  200.     ' If the button is pressed, display the up bitmap if the
  201.     ' mouse is dragged outside the button's area, otherwise
  202.     ' display the up bitmap
  203.     Select Case Button
  204.     Case 1
  205.         If X <= 0 Or X > imgCopyButton.Width Or Y < 0 Or Y > imgCopyButton.Height Then
  206.             imgCopyButton.Picture = imgCopyButtonUp.Picture
  207.         Else
  208.             imgCopyButton.Picture = imgCopyButtonDn.Picture
  209.         End If
  210.     End Select
  211. End Sub
  212.  
  213. Sub imgCopyButton_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  214.     imgCopyButton.Picture = imgCopyButtonUp.Picture
  215. End Sub
  216.  
  217. Sub imgCutButton_Click ()
  218.     imgCutButton.Refresh
  219.     EditCutProc
  220. End Sub
  221.  
  222. Sub imgCutButton_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  223.     imgCutButton.Picture = imgCutButtonDn.Picture
  224. End Sub
  225.  
  226. Sub imgCutButton_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  227.     ' If the button is pressed, display the up bitmap if the
  228.     ' mouse is dragged outside the button's area, otherwise
  229.     ' display the up bitmap
  230.     Select Case Button
  231.     Case 1
  232.         If X <= 0 Or X > imgCutButton.Width Or Y < 0 Or Y > imgCutButton.Height Then
  233.             imgCutButton.Picture = imgCutButtonUp.Picture
  234.         Else
  235.             imgCutButton.Picture = imgCutButtonDn.Picture
  236.         End If
  237.     End Select
  238. End Sub
  239.  
  240. Sub imgCutButton_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  241.     imgCutButton.Picture = imgCutButtonUp.Picture
  242. End Sub
  243.  
  244. Sub imgFileNewButton_Click ()
  245.     imgFileNewButton.Refresh
  246.     FileNew
  247. End Sub
  248.  
  249. Sub imgFileNewButton_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  250.     imgFileNewButton.Picture = imgFileNewButtonDn.Picture
  251. End Sub
  252.  
  253. Sub imgFileNewButton_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  254.     ' If the button is pressed, display the up bitmap if the
  255.     ' mouse is dragged outside the button's area, otherwise
  256.     ' display the up bitmap
  257.     Select Case Button
  258.     Case 1
  259.         If X <= 0 Or X > imgFileNewButton.Width Or Y < 0 Or Y > imgFileNewButton.Height Then
  260.             imgFileNewButton.Picture = imgFileNewButtonUp.Picture
  261.         Else
  262.             imgFileNewButton.Picture = imgFileNewButtonDn.Picture
  263.         End If
  264.     End Select
  265. End Sub
  266.  
  267. Sub imgFileNewButton_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  268.     imgFileNewButton.Picture = imgFileNewButtonUp.Picture
  269. End Sub
  270.  
  271. Sub imgFileOpenButton_Click ()
  272.     imgFileOpenButton.Refresh
  273.     FOpenProc
  274. End Sub
  275.  
  276. Sub imgFileOpenButton_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  277.     imgFileOpenButton.Picture = imgFileOpenButtonDn.Picture
  278. End Sub
  279.  
  280. Sub imgFileOpenButton_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  281.     ' If the button is pressed, display the up bitmap if the
  282.     ' mouse is dragged outside the button's area, otherwise
  283.     ' display the up bitmap
  284.     Select Case Button
  285.     Case 1
  286.         If X <= 0 Or X > imgFileOpenButton.Width Or Y < 0 Or Y > imgFileOpenButton.Height Then
  287.             imgFileOpenButton.Picture = imgFileOpenButtonUp.Picture
  288.         Else
  289.             imgFileOpenButton.Picture = imgFileOpenButtonDn.Picture
  290.         End If
  291.     End Select
  292. End Sub
  293.  
  294. Sub imgFileOpenButton_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  295.     imgFileOpenButton.Picture = imgFileOpenButtonUp.Picture
  296. End Sub
  297.  
  298. Sub imgPasteButton_Click ()
  299.     imgPasteButton.Refresh
  300.     EditPasteProc
  301. End Sub
  302.  
  303. Sub imgPasteButton_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  304.     imgPasteButton.Picture = imgPasteButtonDn.Picture
  305. End Sub
  306.  
  307. Sub imgPasteButton_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  308.     ' If the button is pressed, display the up bitmap if the
  309.     ' mouse is dragged outside the button's area, otherwise
  310.     ' display the up bitmap
  311.     Select Case Button
  312.     Case 1
  313.         If X <= 0 Or X > imgPasteButton.Width Or Y < 0 Or Y > imgPasteButton.Height Then
  314.             imgPasteButton.Picture = imgPasteButtonUp.Picture
  315.         Else
  316.             imgPasteButton.Picture = imgPasteButtonDn.Picture
  317.         End If
  318.     End Select
  319. End Sub
  320.  
  321. Sub imgPasteButton_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  322.     imgPasteButton.Picture = imgPasteButtonUp.Picture
  323. End Sub
  324.  
  325. Sub MDIForm_Load ()
  326.     ' Application starts here (Load event of Startup form).
  327.     Show
  328.     ' Always set working directory to directory containing the application.
  329.     ChDir App.Path
  330.     
  331.     'Initialize document form arrays, and show first document.
  332.     ReDim Document(1)
  333.     ReDim FState(1)
  334.     Document(1).Tag = 1
  335.     FState(1).Dirty = False
  336.     Document(1).Show
  337.  
  338.     ' Read MDINOTE.INI and set recent file menu items appropriately
  339.     GetRecentFiles
  340. End Sub
  341.  
  342. Sub MDIForm_Unload (Cancel As Integer)
  343.     ' If the Unload was not canceled (in the QueryUnload events for the Notepad forms)
  344.     ' there will be no document windows left, so go ahead and end the application.
  345.  
  346.     If Not AnyPadsLeft() Then
  347.         End
  348.     End If
  349.  
  350. End Sub
  351.  
  352. Sub mnuFExit_Click ()
  353.     End
  354. End Sub
  355.  
  356. Sub mnuFNew_Click ()
  357.     FileNew
  358. End Sub
  359.  
  360. Sub mnuFOpen_Click ()
  361.     FOpenProc
  362. End Sub
  363.  
  364. Sub mnuOptions_Click ()
  365.     mnuOToolbar.Checked = frmMDI!picToolbar.Visible
  366. End Sub
  367.  
  368. Sub mnuOToolbar_Click ()
  369.     OptionsToolbarProc Me
  370. End Sub
  371.  
  372. Sub mnuRecentFile_Click (index As Integer)
  373.   OpenFile (mnuRecentFile(index).Caption)
  374.   ' Update recent files list.
  375.   GetRecentFiles
  376. End Sub
  377.  
  378.