16,555
社区成员
发帖
与我相关
我的任务
分享
Private Sub TimerInter_Tick(sender As System.Object, e As System.EventArgs) Handles TimerInter.Tick
ModuleMain.Main()
'未处理 System.TypeInitializationException
'HResult=-2146233036
'Message=“象棋.ModuleMain”的类型初始值设定项引发异常。
' Source=象棋
' TypeName=象棋.ModuleMain
' StackTrace:
' 在 象棋.ModuleMain.Main()
' 在 象棋.SplashScreen.TimerInter_Tick(Object sender, EventArgs e) 位置 C:\Users\LENOVO\Documents\Visual Studio 201'0\Projects\象棋\象棋\SplashScreen.vb:行号 27
' 在 System.Windows.Forms.Timer.OnTick(EventArgs e)
' 在 System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
'在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
' 在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
' 在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoCompon'entManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
' 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
' 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
'在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
'在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
'在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
'在 象棋.My.MyApplication.Main(String[] Args) 位置 17d14f5c-a337-4978-8281-53493378c1071.vb:行号 81
'在 System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
'在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
'在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
'在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
'' 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
'在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
'在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
'在 System.Threading.ThreadHelper.ThreadStart()
'InnerException: System.ArgumentException
'HResult=-2147024809
'Message=“0”的值对于“emSize”无效。“emSize”应该大于 0 且小于或等于 System.Single.MaxValue。
'参数名: emSize
' ParamName=emSize
' Source=System.Drawing
' StackTrace:
' 在 System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSe't, Boolean gdiVerticalFont)
' 在 System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharS'et, Boolean gdiVerticalFont)
' 在 System.Drawing.Font..ctor(String familyName, Single emSize)
' 在 象棋.ModuleMain..cctor() 位置 C:\Users\LENOVO\Documents\Visual Studio 2010\Projects\象棋\象棋\ModuleMain.vb:行号 7
' InnerException:
Me.Close()
End Sub
Module Module1
'画棋盘参数
Public HuiTu As Graphics = FormMain.Panel1.CreateGraphics '创建画笔和绘画图片
Public HuaBi As New Pen(Brushes.Green, 1) '棋盘画笔
Public HuaBi2 As New Pen(Brushes.Black, 1) '炮位画笔
Public HuaShua As New SolidBrush(Color.RosyBrown) '字体画刷
Public ButtonFront As New Font("隶书", KuanDu / 5) '字体
'按钮颜色参数
Public ButtonRedColorMoRen As Color
Public ButtonRedColorXuanDing As Color
Public ButtonColorGreenMoRen As Color
Public ButtonColorGreenXuanDing As Color
'棋谱大小参数
Public KuanDu As Integer = 50 '格子宽度
Public JianJv As Integer = KuanDu / 2 '间距
Public DanWeiChang As Integer = KuanDu / 10 '单位长度
Public JuLi As Integer = KuanDu * 9 '棋盘长度
'状态参数
Public XuanDing As Boolean 'XuanDing判断是否已经选定
Public UserPlay As Boolean= False 'UserPlay判断回合
Public LocationPanduan As Boolean '判断是否执行
'记录参数
Public LocaButtonClick As Point '记录点击位置
Public NameButtonClick As String '记录点击的按钮
End Module
那个开头Option Explicit Off”是我刚刚加的,,,额,忽略,忽略,是一直报错,我加上看能不能有什么改变。