Click here to Skip to main content
15,890,512 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Which event to connect to? Pin
tosch20-Sep-11 4:35
tosch20-Sep-11 4:35 
GeneralRe: Which event to connect to? Pin
Sonhospa21-Sep-11 0:44
Sonhospa21-Sep-11 0:44 
QuestionVb6 website blocker Pin
Felicia Hadinata19-Sep-11 14:42
Felicia Hadinata19-Sep-11 14:42 
AnswerRe: Vb6 website blocker Pin
_Damian S_19-Sep-11 14:52
professional_Damian S_19-Sep-11 14:52 
GeneralRe: Vb6 website blocker Pin
Luc Pattyn19-Sep-11 14:57
sitebuilderLuc Pattyn19-Sep-11 14:57 
GeneralRe: Vb6 website blocker Pin
Felicia Hadinata19-Sep-11 14:58
Felicia Hadinata19-Sep-11 14:58 
AnswerRe: Vb6 website blocker Pin
Luc Pattyn19-Sep-11 15:07
sitebuilderLuc Pattyn19-Sep-11 15:07 
QuestionVB.NET 2008 The type initializer for ... threw an exception Pin
QuickBooksDev19-Sep-11 10:29
QuickBooksDev19-Sep-11 10:29 
We have just converted a large VB6 desktop app to VB.NET 2008. First via the VB 2005 (opened the project), then days of fixing errors, etc. Then opened the VB 2005 in VB 2008 so now it is a 2008 solution.
There are about 30 forms with code behind and about 40 other modules.

Message InvalidOperationException was unhandled.

... The type initializer for .... threw an error.

on
AppTest = true

App framework is enabled, it is using .net 3.5.

In a module there is
Public FormMain as frmMain = frmMain
Public AppTest as boolean = false

Public AppTest as boolean = false never gets executed but the FormMain does (as per a breakpoint).

AppTest = true in frmMain crashes with the indicated error.

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.


need just 1 with FormMain as a reference to frmMain.

This technique worked in many other programs but not this one. Not sure why.
AnswerRe: VB.NET 2008 The type initializer for ... threw an exception Pin
Eddy Vluggen19-Sep-11 12:12
professionalEddy Vluggen19-Sep-11 12:12 
AnswerRe: VB.NET 2008 The type initializer for ... threw an exception Pin
Luc Pattyn19-Sep-11 12:26
sitebuilderLuc Pattyn19-Sep-11 12:26 
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 
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 

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.