-- 作者:mamuaiqing
-- 发布时间:2020/7/19 21:09:00
-- UserCode.Test()这是什么错误?
Dim dlg As New OpenFileDialog \'定义一个新的OpenFileDialog Dim wjm As String
dlg.Filter= "图形文件|*.bmp;*.jpg;*.gif" \'设置筛选器 If dlg.ShowDialog = DialogResult.Ok Then \'如果用户单击了确定按钮
Dim idx As Integer = dlg.SafeFileName.LastIndexOf(".") \'从文件名最后一位查找文件格式位置 Dim ext As String = dlg.SafeFileName.SubString(idx) \'再从文件名位置中获得文件格式 Dim img As image = getImage(dlg.FileName) wjm = "1236" & ext
MessageBox.Show(img.height,"提示!",MessageBoxButtons.OK,MessageBoxIcon.Information)
以上代码执行后出现图中错误(有时发生错误,有时又正常),请教老师解决的办法
此主题相关图片如下:%p}fuig2hu$3jrl_c(5un2.png

|