home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l406 / 1.ddi / MDI.FR_ / MDI.bin (.txt)
Encoding:
Visual Basic Form  |  1992-10-21  |  10.3 KB  |  302 lines

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