您现在的位置: 中国悠悠网 >> 文档中心 >> 论文中心 >> 计算机类 >> 文章正文
学生档案管理系统 教育论文 | 免费论文
 
(button as integer, shift as integer, x as single, y as single)
label1 = "保存当前文件"

''判断鼠标位置,显示不同图像
if button = 1 and (x > 0 and x < imgnew.width and y > 0 and y < imgnew.height) then
imgsave.picture = imagedown.listimages("save").picture
elseif button = 1 then
imgsave.picture = imageup.listimages("save").picture
end if
end sub

private sub imgsave_mouseup(button as integer, shift as integer, x as single, y as single)
if button = 1 then
''“抬起”按钮
imgsave.picture = imageup.listimages("save").picture
end if
end sub

private sub imgundo_click()
text1.text = undostring
end sub

private sub imgundo_mousedown(button as integer, shift as integer, x as single, y as single)
if button = 1 then
''“按下”按钮
imgundo.picture = imagedown.listimages("undo").picture
end if
end sub

private sub imgundo_mousemove(button as integer, shift as integer, x as single, y as single)
label1 = "取消当前操作"

''判断鼠标位置,显示不同图像
if button = 1 and (x > 0 and x < imgnew.width and y > 0 and y < imgnew.height) then
imgundo.picture = imagedown.listimages("undo").picture
elseif button = 1 then
imgundo.picture = imageup.listimages("undo").picture
end if
end sub

private sub imgundo_mouseup(button as integer, shift as integer, x as single, y as single)
if button = 1 then
''“抬起”按钮
imgundo.picture = imageup.listimages("undo").picture
end if
end sub
private sub new_click()
filename = ""
text1 = ""
imgundodisable
end sub

private sub open_click()
dim filenum as integer
dim buffer as string
dim buffer1 as string
dim filesize as long
dim maxlen as long

maxlen = 32768 ''文件最大长度

commondialog1.showopen ''显示"打开文件"对话框

if len(commondialog1.filename) > 0 then
''有输入文件名
filename = commondialog1.filename ''保存文件名
filesize = filelen(filename) ''获得文件长度
if filesize > maxlen then
''文件超长
msgbox "该文件过大,只能显示部分文本", , "警告"
exit sub
end if

screen.mousepointer = 11 ''设置鼠标为沙漏

filenum = freefile() ''获得可用文件号
open filename for input as filenum ''以顺序输入方式打开文件

do while not eof(filenum) and len(buffer) < maxlen ''读必须文本小于 32k
line input #filenum, buffer1 ''读一行文字
buffer = buffer + buffer1 + chr(13) + chr(10) ''加入回车换行符
loop ''循环体

close filenum ''关闭文件

imgund

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