Opgelost
Ik volg sinds dit jaar informatica-beheer en heb dus pas leren programmeren. Maar ik krijg altijd dezelfde fout als ik op Start duw (terwijl ik zeker weet dat het coderen juist is gebeurd, een vriend kan het wel runnen in zijn VB) Hierbij een screenshot en de ERROR log. Het zal waarschijnlijk aan instellingen liggen neem ik aan. Mijn operating system is Windows Vista. (en ja ik heb de update voor vista gedownload)
http://img359.imageshack.us/img359/6488/fouthx8.jpg <- screenshot als ik op start duw
en dit is de error log
Hier heb je ook het scriptje, misschien dat jullie er toch een fout in zien
(en ja mijn txtvakken zijn juist genaamd & ik gebruik de juiste namen in de declaratie.)
Op voorhand bedankt !
Jeroen
Ik volg sinds dit jaar informatica-beheer en heb dus pas leren programmeren. Maar ik krijg altijd dezelfde fout als ik op Start duw (terwijl ik zeker weet dat het coderen juist is gebeurd, een vriend kan het wel runnen in zijn VB) Hierbij een screenshot en de ERROR log. Het zal waarschijnlijk aan instellingen liggen neem ik aan. Mijn operating system is Windows Vista. (en ja ik heb de update voor vista gedownload)
http://img359.imageshack.us/img359/6488/fouthx8.jpg <- screenshot als ik op start duw
en dit is de error log
Code:
System.InvalidCastException was unhandled
Message="De conversie van tekenreeks naar type Integer is ongeldig."
Source="Microsoft.VisualBasic"
StackTrace:
bij Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
bij som_van_2_getallen.somvan2getallen.somvan2getallen_Load(Object sender, EventArgs e)
bij System.EventHandler.Invoke(Object sender, EventArgs e)
bij System.Windows.Forms.Form.OnLoad(EventArgs e)
bij System.Windows.Forms.Form.OnCreateControl()
bij System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
bij System.Windows.Forms.Control.CreateControl()
bij System.Windows.Forms.Control.WmShowWindow(Message& m)
bij System.Windows.Forms.Control.WndProc(Message& m)
bij System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bij System.Windows.Forms.ContainerControl.WndProc(Message& m)
bij System.Windows.Forms.Form.WmShowWindow(Message& m)
bij System.Windows.Forms.Form.WndProc(Message& m)
bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bij System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
bij System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
bij System.Windows.Forms.Control.SetVisibleCore(Boolean value)
bij System.Windows.Forms.Form.SetVisibleCore(Boolean value)
bij System.Windows.Forms.Control.set_Visible(Boolean value)
bij System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
bij System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
bij System.Windows.Forms.Application.Run(ApplicationContext context)
bij Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
bij Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
bij Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
bij som_van_2_getallen.My.MyApplication.Main(String[] Args)
bij System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
bij System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bij Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bij System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Threading.ThreadHelper.ThreadStart()
Hier heb je ook het scriptje, misschien dat jullie er toch een fout in zien
Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Declaratie
Dim intGetal1 As Integer
Dim intGetal2 As Integer
Dim intUitkomst As Integer
'Invoer
intGetal1 = CInt(txtGetal1.Text)
intGetal2 = CInt(txtGetal2.Text)
'verwerking
intUitkomst = intGetal1 + intGetal2
'uitvoer
txtUitkomst.Text = CStr(intUitkomst)
End Sub
End Class
Op voorhand bedankt !
Jeroen
Laatst bewerkt: