?? 日記窗口.frm
字號:
Case 4
Combo1.Text = "04月"
Combo3.Text = "陰有雨"
Case 5
Combo1.Text = "05月"
Combo3.Text = "陣雨"
Case 6
Combo1.Text = "06月"
Combo3.Text = "晴"
Case 7
Combo1.Text = "07月"
Combo3.Text = "炎熱"
Case 8
Combo1.Text = "08月"
Combo3.Text = "舒適"
Case 9
Combo1.Text = "09月"
Combo3.Text = "陰轉晴"
Case 10
Combo1.Text = "10月"
Combo3.Text = "晴轉陰"
Case 11
Combo1.Text = "11月"
Combo3.Text = "涼快"
Case 12
Combo1.Text = "12月"
Combo3.Text = "陰涼"
End Select
For i = 1 To 31
If i = a And i < 10 Then
Combo2.Text = "0" & i & "日"
Else
If i = a Then Combo2.Text = i & "日"
End If
Next
Filenamex1 = Text1.Text & "年" & Combo1.Text & Combo2.Text
If MsgBox("添加日記日期為:" & Filenamex1 & "[按確定YES繼續,按否NO選定其他日期!]", vbYesNo) = vbNo Then Exit Sub
If Trim$(Filenamex1) = vbNullString Then MsgBox "你取消了當前操作!": Exit Sub
RichTextBox1.Text = vbNullString
RichTextBox1.Enabled = True
List1.Enabled = False
Command2.Enabled = False
Text1.Enabled = False
Combo1.Enabled = False
Combo2.Enabled = False
End Sub
Private Sub command3_Click()
Dim Mytext As String
Filenamex1 = Text1.Text & "年" & Combo1.Text & Combo2.Text
If Len(RichTextBox1.Text) < 8 Then MsgBox "日記內容少于8字,不能保存該日記。": Exit Sub
If Right$(Filenamex1, 4) = ".gui" Then Filenamex1 = Pathh & "\" & Filenamex1 Else Filenamex1 = Pathh & Filenamex1 & ".gui"
FalX = True
If FileExists(Filenamex1) = True Then
If Left$(Trim$(RichTextBox1.Text), 9) <> Left$(Text1.Text & "年" & Combo1.Text & Combo2.Text, 9) Then RichTextBox1.Text = Text1.Text & "年" & Combo1.Text & Combo2.Text & " 天氣:" & Combo3.Text & " " & RichTextBox1.Text
If MsgBox("警告:當日的日記已經存在!你決定修改此日期的日記嗎?", vbYesNo) = vbNo Then Exit Sub
intForm = 9
intTo = Len(RichTextBox1.Text)
getseed (Password1)
mi
Else
If Left$(Trim$(RichTextBox1.Text), 9) <> Left$(Text1.Text & "年" & Combo1.Text & Combo2.Text, 9) Then RichTextBox1.Text = Text1.Text & "年" & Combo1.Text & Combo2.Text & " 天氣:" & Combo3.Text & " " & RichTextBox1.Text
intForm = 9
intTo = Len(RichTextBox1.Text)
getseed (Password1)
mi
End If
Text1.Enabled = True
Combo1.Enabled = True
Combo2.Enabled = True
List1.Enabled = True
Command2.Enabled = True
w = vbNullString
Form_Activate
bye:
Form6.MousePointer = 1
dirty = False
Exit Sub
End Sub
Private Sub command4_Click()
If List1.Text = vbNullString Then Exit Sub
If MsgBox("你確定要刪除當天日記嗎?", vbYesNo) = vbNo Then Exit Sub
Kill Pathh & "\" & List1.Text & ".gui"
Form_Activate
End Sub
Private Sub command5_Click()
If RichTextBox1.Enabled = False Then Exit Sub
RichTextBox1.Text = RichTextBox1.Text & Time
End Sub
Private Sub command6_Click()
If RichTextBox1.Text = vbNullString Then Exit Sub
Command6.Enabled = False
Command3.Enabled = False
Command2.Enabled = False
Command4.Enabled = False
xxxx.Enabled = False
Command7.Enabled = True
Command7.SetFocus
RichTextBox1.Font.Size = 4
End Sub
Private Sub command7_Click()
Command6.Enabled = True
Command3.Enabled = True
Command3.SetFocus
Command2.Enabled = True
Command4.Enabled = True
xxxx.Enabled = True
Command7.Enabled = False
RichTextBox1.Font.Size = 9
End Sub
Private Sub command8_Click()
MsgBox "本程序會根據用戶密碼對各自的日記進行加密,而且各用戶密碼亦作加密之后保存于數據庫文件中,使用方法亦通俗易懂。按F3可以改變字體大小至肉眼幾乎看不清楚的大小以防在寫日記時旁人看到日記內容,按“隱藏日記內容”按鈕則可將字體改到讓自己都看不清的字體,只有寫日記者本身知道已經輸入的內容。用者可放心使用本軟件;更詳細的使用方法自己尋找,我就無須再作哆嗦;此軟件由本皇爺個人編制!若有任何的提議或指教可聯系wushenggui88@163.com 或QQ:282449283。"
End Sub
Private Sub command9_Click()
RichTextBox1.Text = vbNullString
End Sub
Private Sub delete001_Click()
command4_Click
End Sub
Private Sub exit001_Click()
Unload Me
End Sub
Private Sub Form_Activate()
Label5.Caption = vbNullString
Dim a As Long, i%
a = Val(Mid(Date, 8, 3))
If a < 0 Then a = -a
Text1.Text = Mid(Date, 1, 4)
RichTextBox1.Text = vbNullString
Select Case Val(Mid(Date, 6, 2))
Case 1
Combo1.Text = "01月"
Combo3.Text = "寒冷"
Case 2
Combo1.Text = "02月"
Combo3.Text = "冷"
Case 3
Combo1.Text = "03月"
Combo3.Text = "小雨"
Case 4
Combo1.Text = "04月"
Combo3.Text = "陰有雨"
Case 5
Combo1.Text = "05月"
Combo3.Text = "陣雨"
Case 6
Combo1.Text = "06月"
Combo3.Text = "晴"
Case 7
Combo1.Text = "07月"
Combo3.Text = "炎熱"
Case 8
Combo1.Text = "08月"
Combo3.Text = "舒適"
Case 9
Combo1.Text = "09月"
Combo3.Text = "陰轉晴"
Case 10
Combo1.Text = "10月"
Combo3.Text = "晴轉陰"
Case 11
Combo1.Text = "11月"
Combo3.Text = "涼快"
Case 12
Combo1.Text = "12月"
Combo3.Text = "陰涼"
End Select
For i = 1 To 31
If i = a And i < 10 Then
Combo2.Text = "0" & i & "日"
Else
If i = a Then Combo2.Text = i & "日"
End If
Next
'創建日記列表
Dim l As Long
List1.Clear
Dim sfile As String
i = 2
'判斷是否要加上“\”
Pathh = Pathh & "\"
sfile = Dir$(Pathh & "*.gui", vbHidden + vbSystem + vbReadOnly + vbDirectory)
While sfile <> vbNullString
If sfile = "." Or sfile = ".." Then List1.Clear
If Len(sfile) > 4 Then List1.AddItem Left$(sfile, Len(sfile) - 4)
sfile = Dir$
Wend
If List1.ListCount = 0 Then RichTextBox1.Text = "沒有記錄日記,請添加。": RichTextBox1.Enabled = False
'MsgBox List1.ListCount - 1
Form6.Caption = "[" & frmLogin.Text4.Text & "]的日記。" & "你一共有[" & List1.ListCount & "]篇日記"
Form6.Width = 0
Timer2.Enabled = True
If RichTextBox1.Enabled = True Then RichTextBox1.SetFocus
End Sub
Private Sub Form_Load()
Me.Icon = frmLogin.Icon
Wid = 7
If Dir$(Pathh, vbDirectory) = "" Then MkDirs (Pathh)
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 And xxxx.Enabled = True Then PopupMenu xxxx, vbpopupmenucentralalign
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
Unload frmLogin
End Sub
Private Sub igpw1_Click()
RichTextBox1.Text = vbNullString
End Sub
Private Sub ivue1_Click()
command5_Click
End Sub
Private Sub IYUJ001_Click()
MsgBox "注意,此軟件未支持繁體或某特殊的字符。", vbOKOnly, "注意事項。"
End Sub
Private Sub Label1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 And xxxx.Enabled = True Then PopupMenu xxxx, vbpopupmenucentralalign
End Sub
Private Sub Label5_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 And xxxx.Enabled = True Then PopupMenu xxxx, vbpopupmenucentralalign
End Sub
Private Sub lfgc1_Click()
command1_Click
End Sub
Private Sub List1_Click()
FalX = False
Dim Mytext As String
Dim w
Filenamex1 = List1.Text & ".gui"
Filenamex1 = Pathh & Filenamex1
Open Filenamex1 For Input As #1
RichTextBox1 = vbNullString
While Not EOF(1)
Line Input #1, w
RichTextBox1.Text = RichTextBox1.Text + w + Chr(13) + Chr(10)
Wend
Close #1
intForm = 9
intTo = Len(RichTextBox1.Text) - 3
getseed (Password1)
mi
bye:
Form6.MousePointer = 1
dirty = False
w = vbNullString
Label5.Caption = List1.ListIndex + 1 & "/" & List1.ListCount
Text1.Text = Left$(List1.Text, 4)
If Right$(Mid(List1.Text, 6, 2), 1) = "月" Then Combo1.Text = Mid(List1.Text, 6, 2) Else Combo1.Text = Mid(List1.Text, 6, 3)
If Left$(Right$(List1.Text, 3), 1) = "月" Then Combo2.Text = Right$(List1.Text, 2) Else Combo2.Text = Right$(List1.Text, 3)
If Trim$(Mid(RichTextBox1.Text, 15, 4)) <> vbNullString Then Combo3.Text = Trim$(Mid(RichTextBox1.Text, 14, 6))
If Len(Combo3.Text) > 5 Then Combo3.Text = Right$(Combo3.Text, 4)
If Left$(Combo3.Text, 2) = "氣:" Then Combo3.Text = Mid(Combo3.Text, 3, Len(Combo3.Text) - 2)
If Left$(Combo3.Text, 1) = ":" Then Combo3.Text = Mid(Combo3.Text, 2, Len(Combo3.Text) - 1)
If Left$(Combo3.Text, 3) = "天氣:" Then Combo3.Text = Mid(Combo3.Text, 4, Len(Combo3.Text) - 3)
End Sub
Private Sub List1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 And xxxx.Enabled = True Then PopupMenu xxxx, vbpopupmenucentralalign
End Sub
Private Sub lkty1_Click()
If List1.ListCount = 0 Then Exit Sub
Dim x As Long, i As Long
Dim a() As String
x = List1.ListCount
ReDim a(x) As String
x = 0
sfile = Dir$(Pathh & "*.gui", vbHidden + vbSystem + vbReadOnly + vbDirectory)
While sfile <> vbNullString
If sfile = "." Or sfile = ".." Then Exit Sub
If Len(sfile) > 4 Then a(x) = Left$(sfile, Len(sfile) - 4): x = x + 1
sfile = Dir$
Wend
For i = 0 To x
RichTextBox1.Text = RichTextBox1.Text & a(i) & Chr(13)
Next
End Sub
Private Sub RichTextBox1_Change()
'If Len(RichTextBox1.Text) < 2 Then
End Sub
Private Sub RichTextBox1_KeyPress(KeyAscii As Integer)
Dim l As Long
If Tbc = True Then
l = Len(RichTextBox1.Text)
RichTextBox1.Text = vbNullString
For i = 1 To l - 1
RichTextBox1.Text = RichTextBox1.Text & " "
Next
RichTextBox1.Text = RichTextBox1.Text & KeyAscii
Text2.Text = Text2.Text & KeyAscii
End If
End Sub
Private Sub rtty1_Click()
If List1.ListCount = 0 Then Exit Sub
Dim x As Long, i As Long
Dim a() As String
x = List1.ListCount
ReDim a(x) As String
x = 0
sfile = Dir$(Pathh & "*.gui", vbHidden + vbSystem + vbReadOnly + vbDirectory)
While sfile <> vbNullString
If sfile = "." Or sfile = ".." Then Exit Sub
If Len(sfile) > 4 Then a(x) = Left$(sfile, Len(sfile) - 4): x = x + 1
sfile = Dir$
Wend
RichTextBox1.Text = RichTextBox1.Text & "["
For i = 0 To x
RichTextBox1.Text = RichTextBox1.Text & a(i) & " "
Next
RichTextBox1.Text = Left$(RichTextBox1.Text, Len(RichTextBox1.Text) - 2) & "]"
End Sub
Private Sub Save001_Click()
command3_Click
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 8 Then Exit Sub
If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0
If Len(Text1.Text) > 4 Then KeyAscii = 0
If Val(Text1.Text) > 9999 Then Text1.Text = Mid(Date, 1, 4)
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Date & "->" & Time
End Sub
Private Sub Timer2_Timer()
Wid = Wid + 5
If Form6.Width >= 8745 Then Form6.Width = 8745: Timer2.Enabled = False: Exit Sub
Form6.Width = Form6.Width + Wid
End Sub
Private Sub ZZ11_Click()
command2_Click
End Sub
Private Sub zz22_Click()
command3_Click
End Sub
Private Sub zz33_Click()
command4_Click
End Sub
Private Sub zz44_Click()
Unload Me
End Sub
Private Sub zz55_Click()
Me.WindowState = 1
End Sub
Private Sub zz66_Click()
command8_Click
End Sub
Private Sub zz77_Click()
Form_Activate
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -