【VB开源代码栏目提醒】:网学会员为需要VB开源代码的朋友们搜集整理了XMNotePad2Form.frm相关资料,希望对各位网友有所帮助!
VERSION 5.00
Begin VB.Form Form1
Caption = "Document 1"
ClientHeight = 3135
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
Icon = "XMNotePad2Form.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 3135
ScaleWidth = 4680
Begin VB.TextBox Text1
Height = 3135
HideSelection = 0 'False
Left = 0
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 0
Top = 0
Width = 4695
End
End
Attribute
VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Resize()
If Me.WindowState = 1 Then Exit Sub
Text1.Width = Me.Width - 105
Text1.Height = Me.Height - 405
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim SaveIt As Integer
If NeedSaved(Val(Me.Tag)) = True Then
SaveIt = MsgBox("This Document has been changed. Do you wish to save?", vbYesNoCancel)
'672
If SaveIt = 2 Then Exit Sub
If SaveIt = 6 Then
If File(Val(Me.Tag)) = "" Then
On Error GoTo XSaveCancelled
MDIForm1.CommonDialog1.Filter = "Text Files (*.TXT)|*.txt|All Files (*.*)|*.*"
MDIForm1.CommonDialog1.Flags = &H4
MDIForm1.CommonDialog1.ShowSave
If MDIForm1.CommonDialog1.FileName = "" Then GoTo XSaveCancelled
Open MDIForm1.CommonDialog1.FileName For Output As #1
Print #1, Me.Text1.Text
Close #1
XSaveCancelled:
Else
Open MDIForm1.CommonDialog1.FileName For Output As #1
Print #1, Me.Text1.Text
Close #1
End If
End If
End If
Set ChildForms(Val(Me.Tag)) = Nothing
UnAvail(Val(Me.Tag)) = False
Unload Me
End Sub
Private Sub Text1_Change()
If JustChanged = False Then
UndoText(frm) = ""
End If
Debug.Print Opened
If Opened = False And NeedSaved(Val(Me.Tag)) = False Then
NeedSaved(Val(Me.Tag)) = True
Me.Caption = "*" & Me.Caption
End If
Opened = False
End Sub