home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.1#0"; "RICHTX32.OCX"
- Begin VB.Form frmOpenDoc
- Caption = "New Document"
- ClientHeight = 5115
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 6150
- ClipControls = 0 'False
- LinkTopic = "Form1"
- LockControls = -1 'True
- MDIChild = -1 'True
- ScaleHeight = 5115
- ScaleWidth = 6150
- Visible = 0 'False
- Begin RichTextLib.RichTextBox RichTextBox1
- Height = 4815
- Left = 0
- TabIndex = 0
- Top = 120
- Width = 10000
- _ExtentX = 17648
- _ExtentY = 8493
- _Version = 327681
- ScrollBars = 2
- DisableNoScroll = -1 'True
- TextRTF = $"frmOpenDoc.frx":0000
- End
- Attribute VB_Name = "frmOpenDoc"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Form_Load()
- Width = 0.9 * Screen.Width
- Height = 0.6 * Screen.Height
- RichTextBox1.RightMargin = RichTextBox1.Width
- End Sub
- Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
- If boolnew = True And boolsave = True Then
- Response = MsgBox(" Do You Want To Save Changes?", vbQuestion + vbYesNoCancel)
- MDIForm1.CommonDialog2.CancelError = True
- On Error GoTo ErrHandler
- Select Case Response
- Case vbYes
- On Error GoTo ErrHandler
- MDIForm1.CommonDialog2.Flags = &H2 'File exists
- MDIForm1.CommonDialog2.ShowSave
- frmOpenDoc.RichTextBox1.SaveFile MDIForm1.CommonDialog2.filename
- boolsave = False
- ControlsDisabled
- Case vbNo
- ControlsDisabled
- End Select
- If boolsave = True Then
- Response = MsgBox(" Do You Want To Save Changes?", vbQuestion + vbYesNoCancel)
- MDIForm1.CommonDialog2.CancelError = True
- On Error GoTo ErrHandler
- Select Case Response
- Case vbYes
- Call SaveDoc
- If bCannotSave = False Then
- ControlsDisabled
- End If
- Case vbNo
- ControlsDisabled
- End Select
- ControlsDisabled
- End If
- End If
- ErrHandler:
- Cancel = True
- End Sub
- Private Sub Form_Resize()
- RichTextBox1.Height = ScaleHeight
- RichTextBox1.Width = ScaleWidth
- If (Me.WindowState = 1 Or Me.WindowState = 2) Then Exit Sub
- If Me.Height < 5000 Then
- Me.Height = 5000
- End If
- If Me.Width < 7000 Then
- Me.Width = 10000
- End If
- End Sub
- Private Sub RichTextBox1_Change()
- If RichTextBox1.SelLength > 0 Then
- MDIForm1.mnuSave.Enabled = True
- MDIForm1.Toolbar1.Buttons(3).Enabled = True
- MDIForm1.mnuSaveAs.Enabled = True
- MDIForm1.Toolbar1.Buttons(4).Enabled = True
- boolsave = True
- End If
- End Sub
- Private Sub RichTextBox1_KeyDown(KeyCode As Integer, Shift As Integer)
- Call RichTextKeyDown
- End Sub
-