Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB constants not defined

Status
Not open for further replies.

ColdPhreze

Programmer
Apr 15, 2002
93
I am having a problem that I feel really stupid for not being able to figure out.

I am attempting to use these predefined constants in VB.NET:

vbFormControlMenu, vbFormCode, vbAppWindows, vbAppTaskManager, vbFormMDIForm, vbFormOwner

But VB does not recognize them. I get the error "xxx not defined"

I am pretty sure this simply means I'm not importing something in the project, but I cannot for the life of me figure out what it is? I'm embarassed to say I've spent nearly an hour on this!

For future reference, what is the easiest way to figure this sort of thing out when I get these problems with constants? I've search google and google groups, msdn, and these forums to no avail.

KyferEz

Check out my DeVry Senior Project: and my CarPC Hardware: and my Spam-Fighter forums:
 
You must be missing the 'Imports Microsoft.VisualBasic'. You can either write this out of the class or if you intend to use that namespace's.. "stuff" in other classes too (that are in the same project), just add that DLL as a 'reference' and not as and imports statement.

 
Nope, I have the "Imports Microsoft.VisualBasic" line.

Ok, I stumbled onto the fact that VB.Net no longer supports the UnloadMode parameter of the Form_QueryUnload, so maybe they removed those constants?

Grr, that is pretty annoying of them to no longer support that. The only way I can see to do this now is as the following page demonstrates (though one line of code is wrong, MyBaseProc(e) should be MyBase.WndProc(e):

Thanks,
KyferEz

Check out my DeVry Senior Project: and my CarPC Hardware: and my Spam-Fighter forums:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top