[VBA ] 2010vb執行問題

看板Visual_Basic作者 (發慌)時間15年前 (2011/01/28 12:02), 編輯推噓1(103)
留言4則, 4人參與, 最新討論串1/1
請問一下 各位大大 我最近在學vb程式 所以去買了一本書來自學 裡面的光碟是用2010 Visual Basic Express 試用版的 可以當我按f5開始執行偵錯時 卻一直出現下面的問題 InvalidOperationException 未處理 建立表單時發生錯誤。如需詳細資訊, 請參閱 Exception.InnerException。 錯誤是: 外部元件傳回例外狀況 System.InvalidOperationException 未處理 Message=建立表單時發生錯誤。如需詳細資訊,請參閱 Exception.InnerException。 錯誤是: 外部元件傳回例外狀況。 Source=MyFirst StackTrace: 於 MyFirst.My.MyProject.MyForms.Create__Instance__[T](T Instance) 於 17d14f5c-a337-4978-8281-53493378c1071.vb: 行 190 於 MyFirst.My.MyProject.MyForms.get_Form1() 於 MyFirst.My.MyApplication.OnCreateMainForm() 於 C:\vb\ch01\MyFirst\My Project\Application.Designer.vb: 行 35 於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() 於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() 於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) 於 MyFirst.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.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) 於 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 於 System.Threading.ThreadHelper.ThreadStart() InnerException: System.Runtime.InteropServices.SEHException Message=外部元件傳回例外狀況。 Source=System.Drawing ErrorCode=-2147467259 StackTrace: 於 System.Drawing.SafeNativeMethods.Gdip.GdipCreateFontFamilyFromName(String name, HandleRef fontCollection, IntPtr& FontFamily) 於 System.Drawing.FontFamily.CreateFontFamily(String name, FontCollection fontCollection) 於 System.Drawing.FontFamily..ctor(String name, Boolean createDefaultOnFail) 於 System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont) 於 System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet) 於 MyFirst.Form1.InitializeComponent() 於 C:\vb\ch01\MyFirst\Form1.Designer.vb: 行 41 於 MyFirst.Form1..ctor() InnerException: 出現上面的錯誤訊息!! 但是在google搜尋相關錯誤 都說這是老掉牙的問題 但是我還是找不到解決方法 不知道有沒有大大可以告知小弟一下解決方法 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.38.18.242 ※ 編輯: hondaygrace 來自: 114.38.18.242 (01/28 12:14)

01/29 13:13, , 1F
把你的碼貼上來,我們才能幫你找。
01/29 13:13, 1F

02/03 21:40, , 2F
什麼碼呢?? 我不是已經貼了嗎?
02/03 21:40, 2F

02/09 09:15, , 3F
我在6703篇有問過了,一模一樣的問題…
02/09 09:15, 3F

02/14 09:29, , 4F
碼 == code == 程式
02/14 09:29, 4F
文章代碼(AID): #1DGZ-x1K (Visual_Basic)