以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]win7系统,客户端“int32”报错 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=145676) |
-- 作者:天一生水 -- 发布时间:2020/2/4 15:16:00 -- [求助]win7系统,客户端“int32”报错 蓝老师好! 测试发布的项目,win7系统,其中有个客户端电脑报错如下,显示出错是窗口afterload代码;请老师帮忙看看是什么原因? 谢谢!
提示及翻译如下: Method not found:\' Int32| System. Runtime. InteropServices. Marshal. Size0f(!!0)\'. 找不到方法:\'Int32 |系统。运行。 InteropServices。元帅。 Size0f(!! 0)\'。 补充一点:发布系统win7-64位;客户端win7-32位 窗口afterload代码: AddHandler e.Form.Panel.MouseDown,AddressOf Panel_MouseDown \'无边框移动 e.form.BaseForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None e.Form.BaseForm.ShowInTaskbar = True \'任务栏显示图标 \'------------------------------------- Dim dr1 As DataRow = DataTables("识别日志").Find("日期 = #" & Date.Today & "#") If dr1 IsNot Nothing Then Tables("识别日志").Sort = "日期" Dim idx As Integer = Tables("识别日志").FindRow(dr1) Tables("识别日志").Position = idx Else dr1 = DataTables("识别日志").AddNew dr1("日期")= Date.Today Tables("识别日志").Sort = "日期" Dim idx As Integer = Tables("识别日志").FindRow(dr1) Tables("识别日志").Position = idx End If Dim dr As DataRow dr = DataTables("账号秘钥").Find("默认 = true") If dr IsNot Nothing Then e.Form.Controls("textbox4").text = dr("APIKey") e.Form.Controls("textbox5").text = dr("SecretKey") e.Form.Controls("账号提示").text = "正在使用默认账号!" Else e.Form.Controls("账号提示").text = "正在使用系统账号!" End If e.Form.Controls("字体").Value = Tables("识别设置")(0,"字体") e.Form.Controls("字号").Value = Tables("识别设置")(0,"字号") e.Form.Controls("行距").Value = Tables("识别设置")(0,"行距") e.Form.Controls("超时时间").Value = Tables("识别设置")(0,"超时时间") e.Form.Controls("身份证延时").Value = Tables("识别设置")(0,"身份证延时") e.Form.Controls("背景色").Value = Color.FromARGB(Tables("识别设置")(0,"背景色")) e.Form.Controls("字体色").Value = Color.FromARGB(Tables("识别设置")(0,"字体色")) e.Form.Controls("强制分段").Value = Tables("识别设置")(0,"强制分段") e.Form.Controls("自动分段调整").Value = Tables("识别设置")(0,"自动分段调整") Dim sp1 As WinForm.SplitContainer = e.Form.Controls("SplitContainer1") sp1.SplitterDistance = 0 e.Form.Controls("Button15").text = ">" Dim sp2 As WinForm.SplitContainer = e.Form.Controls("SplitContainer2") sp2.SplitterDistance = sp2.Width * 0.30 Dim sp3 As WinForm.SplitContainer = e.Form.Controls("SplitContainer3") sp3.SplitterDistance = sp3.Width * 0.5 SetWatermark(e.Form.Controls("TextBox6"),"起始页") SetWatermark(e.Form.Controls("TextBox7"),"结束页") e.Form.Controls("Button24").Visible = False \'卸载PDF隐藏 \'拖拽显示路径 Dim t As WinForm.TextBox = e.Form.Controls("TextBox1") t.BaseControl.AllowDrop = True AddHandler t.BaseControl.DragDrop, AddressOf TextBox_DragDrop AddHandler t.BaseControl.DragEnter, AddressOf TextBox_DragEnter \'图片缩放 Dim PictureBox1 As System.Windows.Forms.panel = e.Form.Controls("图片").basecontrol AddHandler PictureBox1.MouseWheel, AddressOf pictureBox1_MouseWheel \'图片拖拽 Dim t1 As System.windows.Forms.listview = e.Form.Controls("ListView1").basecontrol t1.AllowDrop = True AddHandler t1.DragDrop, AddressOf picture_DragDrop AddHandler t1.DragEnter, AddressOf picture_DragEnter \'--------------------------- e.Form.Controls("NumericComboBox4").Visible = False \'隐藏图片角度调整 \'--------------------------------- Dim rt As new System.Windows.Forms.RichTextBox \'定义 一个RichTextBox rt.Dock = System.Windows.Forms.DockStyle.Fill \'控件停靠方式为撑满父控件 rt.name = "RichTextBox1" \'设置控件名称 UtilsSetLineSpace.SetLineSpace(rt,Tables("识别设置")(0,"行距")) rt.borderstyle = 0 \'边框 e.Form.Controls("Panelx").BaseControl.Controls.Add(rt) \'控件放入Panel1中作为子控件 addhandler rt.MouseDown, addressof mytxt_MouseDown [此贴子已经被作者于2020/2/4 15:33:53编辑过]
|
-- 作者:有点蓝 -- 发布时间:2020/2/4 15:33:00 -- 卸载重装一下.net 加上调试信息,发布后测试是哪一句代码有问题
|
-- 作者:天一生水 -- 发布时间:2020/2/4 16:47:00 -- 谢谢蓝老师! 卸载.net4.0,安装.net4.52,就行了。
|