ik kreeg en exception maar ik weet niet wat er fout is.
het heeft het altijd gedaan maar nu op eens niet.
in de form:
de module met functie:
dan heb ik ook nog de exception gekopieerd:
weet iemand wat er fout is, omdat hij nu opeens niet weer werk en ik heb niets verranderd.
meschien iets met het geheugen.
Bas
p.s.
liever een reactie dan geen reactie.
het heeft het altijd gedaan maar nu op eens niet.
in de form:
PHP:
'programma info
'**************************************************************
'naam programma
Dim programma_naam As String = "naam programma"
'locatie icoon
'geen icoon dan "icoon = "nope""
Dim icoon As String = "url icoon"
'programma nummer
Dim programma_nummer As String = "programma nummer"
'**************************************************************
'deze sub wordt opgeroepen als de form start
Sub ProgrammaStarten()
programma_nummer = NewForm(programma_naam, icoon)
End Sub
de module met functie:
PHP:
Public Module programs_bar
'als from start dan kijken waat plaats is in de array en schijfen, en aantalprogrammas + 1 doen
Public AantalProgrammas As Integer = -1
Public Programs(1000000, 50, 50) As String
'functie om programma er bij te zetten
Dim foo As Integer
Function NewForm(ByVal ProgrammaNaam As String, ByVal icoon As String)
foo = AantalProgrammas + 1
AantalProgrammas = AantalProgrammas + 1
Programs(foo, 0, 0) = 1
Programs(foo, 1, 0) = ProgrammaNaam
If icoon = "nope" Then
Programs(foo, 2, 0) = ""
Else
Programs(foo, 2, 0) = icoon
End If
Return foo
End Function
End Module
dan heb ik ook nog de exception gekopieerd:
PHP:
System.TypeInitializationException was unhandled
Message=The type initializer for 'The_Program.programs_bar' threw an exception.
Source=The Program
TypeName=The_Program.programs_bar
StackTrace:
at The_Program.programs_bar.NewForm(String ProgrammaNaam, String icoon)
at The_Program.new_form.ProgrammaStarten() in E:\programs\The Program\The Program\the program\new form template\new_form.vb:line 21
at The_Program.new_form.new_form_Load(Object sender, EventArgs e) in E:\programs\The Program\The Program\the program\new form template\new_form.vb:line 168
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.Show()
at The_Program.main.Button3_Click(Object sender, EventArgs e) in E:\programs\The Program\The Program\the program\main\form_main.vb:line 95
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at The_Program.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.OutOfMemoryException
Message=Exception of type 'System.OutOfMemoryException' was thrown.
Source=The Program
StackTrace:
at The_Program.programs_bar..cctor() in E:\programs\The Program\The Program\the program\main\form's\program bar.vb:line 5
InnerException:
weet iemand wat er fout is, omdat hij nu opeens niet weer werk en ik heb niets verranderd.
meschien iets met het geheugen.
Bas
p.s.
liever een reactie dan geen reactie.