Click here to Skip to main content
15,888,802 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
Eddy Vluggen19-Sep-11 22:49
professionalEddy Vluggen19-Sep-11 22:49 
AnswerRe: VB.NET 2008 The type initializer for ... threw an exception Pin
DaveAuld19-Sep-11 19:55
professionalDaveAuld19-Sep-11 19:55 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
QuickBooksDev20-Sep-11 0:25
QuickBooksDev20-Sep-11 0:25 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
DaveAuld20-Sep-11 0:34
professionalDaveAuld20-Sep-11 0:34 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
QuickBooksDev20-Sep-11 1:07
QuickBooksDev20-Sep-11 1:07 
AnswerRe: VB.NET 2008 The type initializer for ... threw an exception Pin
Eddy Vluggen20-Sep-11 1:20
professionalEddy Vluggen20-Sep-11 1:20 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
QuickBooksDev20-Sep-11 1:24
QuickBooksDev20-Sep-11 1:24 
AnswerRe: VB.NET 2008 The type initializer for ... threw an exception Pin
Eddy Vluggen20-Sep-11 6:20
professionalEddy Vluggen20-Sep-11 6:20 
QBTeKcom wrote:
OK, then please tell me how I can make it work like the other programs

It is already working "like" the other programs, you said that yourself:

QBTeKcom wrote:
This works in 6-7 other programs and has for years but crashes with indicated error

There are no errors when we do a build.

I'm guessing that the type initializer (the constructor) for frmMain threw an exception that you did not handle. It might be in an event that gets triggered by an action in the constructor. After the InitializeComponent the form has been created, and all events that are coupled from the IDE will be firing (like TextChanged and such)

Put a breakpoint in there and verify each statement, or move all/most of the code from the constructor to a separate initialization-method that you call.

QBTeKcom wrote:
This technique worked in many other programs but not this one. Not sure why.

The applications aren't identical, or they would behave identical. I'm guessing different constructors, but there "has" to be something that causes it.

QBTeKcom wrote:
What would cause the modules to be executed first before frmMain is instantiated?????

Are you using the modules from the constructor of frmMain?
Bastard Programmer from Hell Suspicious | :suss:

GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
QuickBooksDev20-Sep-11 7:12
QuickBooksDev20-Sep-11 7:12 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
QuickBooksDev20-Sep-11 7:38
QuickBooksDev20-Sep-11 7:38 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
Eddy Vluggen20-Sep-11 7:58
professionalEddy Vluggen20-Sep-11 7:58 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
QuickBooksDev20-Sep-11 9:42
QuickBooksDev20-Sep-11 9:42 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
Eddy Vluggen20-Sep-11 10:40
professionalEddy Vluggen20-Sep-11 10:40 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
QuickBooksDev21-Sep-11 3:32
QuickBooksDev21-Sep-11 3:32 
AnswerRe: VB.NET 2008 The type initializer for ... threw an exception Pin
Eddy Vluggen21-Sep-11 7:14
professionalEddy Vluggen21-Sep-11 7:14 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
QuickBooksDev23-Sep-11 1:45
QuickBooksDev23-Sep-11 1:45 
GeneralRe: VB.NET 2008 The type initializer for ... threw an exception Pin
Eddy Vluggen23-Sep-11 8:48
professionalEddy Vluggen23-Sep-11 8:48 
QuestionDatabase Design Fields Pin
Eyo118-Sep-11 23:24
Eyo118-Sep-11 23:24 
AnswerRe: Database Design Fields Pin
Eddy Vluggen19-Sep-11 12:09
professionalEddy Vluggen19-Sep-11 12:09 
QuestionHow do I open a url in a custom VB.net tab control brower Pin
kamakazy_kid17-Sep-11 23:17
kamakazy_kid17-Sep-11 23:17 
AnswerRe: How do I open a url in a custom VB.net tab control brower Pin
DaveAuld17-Sep-11 23:41
professionalDaveAuld17-Sep-11 23:41 
GeneralRe: How do I open a url in a custom VB.net tab control brower Pin
kamakazy_kid18-Sep-11 1:28
kamakazy_kid18-Sep-11 1:28 
GeneralRe: How do I open a url in a custom VB.net tab control brower Pin
DaveAuld18-Sep-11 1:35
professionalDaveAuld18-Sep-11 1:35 
GeneralRe: How do I open a url in a custom VB.net tab control brower Pin
kamakazy_kid18-Sep-11 2:18
kamakazy_kid18-Sep-11 2:18 
GeneralRe: How do I open a url in a custom VB.net tab control brower Pin
DaveAuld18-Sep-11 2:24
professionalDaveAuld18-Sep-11 2:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.