以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  帮我修改一下代码  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=157077)

--  作者:13796361423
--  发布时间:2020/9/30 13:29:00
--  帮我修改一下代码

Dim pic As WinForm.PictureBox = e.Form.Controls("PicView2")
Dim img As Image
e.Form.TimerEnabled = False
If pic.Image IsNot Nothing
    Dim buffer() As Byte = Functions.Execute("GetImageToBytes",pic.Image)
    Dim result As Integer = Functions.Execute("SaveBytesToFile",buffer,e.Form.Controls("FileName").Value)
    If result = 1
        Tables("学籍表").Current("相片") = Tables("学籍表").Current("学籍号") & ".JPG"
        Tables("学籍表").Current("已拍照") = True
        MessageBox.Show("照片保存为: " & e.Form.Controls("FileName").Value ,"保存成功")
        e.Form.Close()
    Else
        MessageBox.Show("保存失败","失败")
    End If
Else
    MessageBox.Show("请先拍照!","错误")
End If
e.Form.TimerEnabled = True

 

 

 

你好, 这是我的项目里窗口设计器中的照相窗口, 每照一张相片都要重新打开这个窗口,  我想照完相后,点击保存后不关闭该窗口, 直接照下一张照片, 请问如何修改代码


--  作者:有点蓝
--  发布时间:2020/9/30 13:33:00
--  
这句代码去掉:e.Form.Close()