求个高手帮做VB 记事本
分 我可以给你写个简单的记事b记,只有打开、保存两个个功能
如果你要加上打印、本源萤石云 源码查找、事本ios检测证书源码替换、程序广告效果统计源码设置字体、代码cocos口红机源码复制、记事b记光控调节源码粘贴、本源删除等其他功能追加到分我可以考虑帮你写一个...(实用的事本功能我可以加上 加密/解密)
现在在线吗?我已经帮你写完了 发到你的信箱了,. 以下是代码部分..
Private Bianhua As String
Private Sub Form_Load()
RchText.Text = "当前系统时间:" & vbCrLf & Date + Time
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If Bianhua <> RchText.Text Then
If MsgBox("里面的内容还没有保存,需要现在保存吗?", vbYesNo, "有信息未保存") = vbYes Then
mnuBaocun_Click
End If
Else
Cancel = False
End If
End Sub
Private Sub Form_Resize()
RchText.Top = 0
RchText.Left = 0
RchText.Width = Me.Width
RchText.Height = Me.Height
End Sub
Private Sub mnuBaocun_Click()
With CmDlog
.Flags = &H2&
.DialogTitle = "保存文件"
.InitDir = App.Path
.Filter = "文本文件(*.txt)|*.TXT|bat批处理文件(*.bat)|*.BAT|cmd批处理文件(*.cmd)|*.CMD|所有文件(*.*)|*.*"
.FilterIndex = 1
.DefaultExt = "txt"
.CancelError = False
.FileName = "VB记事本内容保存.txt"
.ShowSave
End With
Open CmDlog.FileName For Output As #1
Print #1, RchText.Text
Close #1
Bianhua = RchText.Text
End Sub
Private Sub mnuDakai_Click()
With CmDlog
.DialogTitle = "打开文本文件"
.InitDir = App.Path
.Filter = "文本文件(*.txt)|*.TXT|bat批处理文件(*.bat)|*.BAT|cmd批处理文件(*.cmd)|*.CMD|所有文件(*.*)|*.*"
.FilterIndex = 1
.CancelError = False
.ShowOpen
End With
RchText.FileName = CmDlog.FileName
End Sub
Private Sub mnuFuzhi_Click()
If RchText.SelLength > 0 Then
Clipboard.SetText RchText.SelText
MsgBox "当前选定的内容已经复制到剪切板", vbInformation, "复制"
Else
Clipboard.SetText RchText.Text
MsgBox "当前文本所有内容已经复制到剪切板", vbInformation, "复制"
End If
End Sub
Private Sub mnuTuichu_Click()
Unload Me
End Sub
Private Sub mnuZhantie_Click()
RchText.SelText = Clipboard.GetText
End Sub
Private Sub mnuZiti_Click()
With CmDlog
.Flags = &H Or &H Or &H Or &H1 Or &H3
.FontName = 宋体
.ShowFont
End With
With RchText
.SelFontName = CmDlog.FontName
.SelFontSize = CmDlog.FontSize
.SelBold = CmDlog.FontBold
.SelUnderline = CmDlog.FontUnderline
.SelItalic = CmDlog.FontItalic
.SelColor = CmDlog.Color
End With
End Sub
Private Sub RchText_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 Then PopupMenu mnuCaozuo
End Sub
VB怎么打开记事本输入文字
Private Sub Form_Click()Dim str As String
Dim num As Integer
Open "d:\Myfile.txt" For Output As #1
str = “STUDY"
num =
Print #1, "Print输出:"Print #1, str, num
Print #1, "
2024-11-13 09:48
2024-11-13 09:36
2024-11-13 09:02
2024-11-13 07:39
2024-11-13 07:30