您现在的位置: 公文易 >> 免费论文 >> 计算机论文 >> 论文正文 >> 学生档案管理系统
归档:计算机论文 推荐度:
日期:2006-2-24 18:15:00

学生档案管理系统

字体大小:
学生档案管理系统
leName As String '文件名,用于打开、保存文件
Dim UndoString As String '用于 Undo 操作
Dim UndoNew As String '用于 Undo 操作

Private Sub ImgUndoDisable()
'禁用“Undo”按钮
UndoString = ""
UndoNew = ""
ImgUndo.Enabled = False
ImgUndo.Picture = ImageDisable.ListImages("Undo").Picture
End Sub

Private Sub ImgUndoEnable()
'有效“Undo”按钮
ImgUndo.Enabled = True
ImgUndo.Picture = ImageUp.ListImages("Undo").Picture
End Sub

Private Sub Check_ImgPaste()
'设置粘贴按钮
If Len(Clipboard.GetText) > 0 Then
ImgPaste.Enabled = True
ImgPaste.Picture = ImageUp.ListImages("Paste").Picture
Else
ImgPaste.Enabled = False
ImgPaste.Picture = ImageDisable.ListImages("Paste").Picture
End If
End Sub

Private Sub Check_ImgCutCopy()
'设置剪切、复制按钮
If Text1.SelLength > 0 Then
ImgCut.Enabled = True
ImgCut.Picture = ImageUp.ListImages("Cut").Picture
ImgCopy.Enabled = True
ImgCopy.Picture = ImageUp.ListImages("Copy").Picture
Else
ImgCut.Enabled = False
ImgCut.Picture = ImageDisable.ListImages("Cut").Picture
ImgCopy.Enabled = False
ImgCopy.Picture = ImageDisable.ListImages("Copy").Picture
End If
End Sub
Private Sub BackColor_Click()
CommonDialog1.ShowColor
Text1.BackColor = CommonDialog1.Color
End Sub

Private Sub Box_Click()
'显停工具栏
If Box.Checked Then
'将停显工具栏
Box.Checked = False
CoolBar1.Visible = False
Else
Box.Checked = True
CoolBar1.Visible = True[NextPage]


End If

Form_Resize '重新调整控件位置
End Sub

Private Sub Close_Click()
Dim FileNum As Integer

If Len(FileName) > 0 Then
'有输入文件名
FileNum = FreeFile() '获得可用文件号
Open FileName For Output As FileNum '打开输出文件
'如果无指定文件,则创建新文件
Print #FileNum, Text1.Text '输出文本
Close FileNum '关闭文件
End If

Text1.Text = ""
FileName = ""
End Sub

Private Sub ComboSize_Click()
Text1.FontSize = Val(ComboSize.Text)
End Sub

Private Sub ComboFont_Click()
Text1.FontName = ComboFont.Text
End Sub

Private Sub Copy_Click()
Clipboard.SetText Text1.SelText '复制文本到剪裁板
End Sub

Private Sub Cut_Click()
Clipboard.SetText Text1.SelText '复制文本到剪裁板
Text1.SelText = "" '清选择的文本
End Sub

Private Sub DataTime_Click()
Text1.SelText = Now
End Sub

Private Sub Delete_Click()
Text1.SelText = "" '清选择的文本
End Sub

Private Sub Edit_Click()
'当程序显示“编辑”子菜单前,触发该程序
If Text1.SelLength > 0 Then
'文本框中有选中的文本
Cut.Enabled = True
Copy.Enabled = True
Delete.Enabled = True
Else
Cut.Enabled = False
Copy.Enabled = False
Delete.Enabled = False
End If

If Len(Clipboard.GetText()) > 0 Then
'剪裁板中有文本数据
Paste.Enabled = True
Else
'没有可粘贴的文本
Paste.Enabled = False
End If
End Sub

Private Sub Exit_Click()
Unload Me
End Sub

Private Sub FindText_KeyPress(KeyAscii As Integer)
Dim BeginPos As Long

If KeyAscii = 13 Then
BeginPos = InStr(1, Text1.Text, FindText.Text, vbTextCompare)
If BeginPos > 0 Then
Text1.SelStart = BeginPos - 1
Text1.SelLength = Len(FindText.Text)
End If
End If
End Sub

Private Sub Fontcolor_Click()
CommonDialog1.ShowColor
Text1.ForeColor = CommonDialog1.Color
End Sub

Private Sub Form_Load()
Dim i As Integer

'加载图像
ImgNew.Picture = ImageUp.ListImages("New").Picture
ImgOpen.Picture = ImageUp.ListImages("Open").Picture
ImgSave

上一页  [1] [2] [3] [4] [5] [6] [7] 下一页




推荐文章

我得网服务大全:适时新闻 | 秘书资讯 | 专题文档 | 实用查询 | 新华字典,词典 | 成语词典 | 全唐诗 | 歇后语大全
关于我们 | 版权与隐私 | 爱心救助 | 加入会员 | 网站地图 | !报告错误 | 联系方式
公文易爱心文秘网,我得网 © 2003-2009