[dba-VB] Dot Net - messagebox

Michael Maddison michael at ddisolutions.com.au
Tue Jan 3 18:11:50 CST 2006


Ah,

You need to add a reference to System.Windows.Forms.dll

I assume the dll will have no interface components (forms etc),
why not pass/raise any errors back to the calling function and
let it raise the messageboxes if required?

cheers


Michael Maddison

DDI Solutions Pty Ltd
michael at ddisolutions.com.au
Bus: 0260400620
Mob: 0412620497 
www.ddisolutions.com.au
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John Colby
Sent: Wednesday, 4 January 2006 10:38 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Dot Net - messagebox

I tried that and while I could import System, System.Windows was not
available.  I suspect that it is because this was not a "windows"
project, but rather a "class library" project, but I am not sure of
that. 


John W. Colby
www.ColbyConsulting.com 


-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Michael
Maddison
Sent: Tuesday, January 03, 2006 5:59 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Dot Net - messagebox

 Hi John,

I've never used VB Express but...
This is what I use...

                        Dim result As DialogResult = MessageBox.Show _
                            ( _
                            "The application will be terminated...", _
                            "Application Fatal Error", _
                            MessageBoxButtons.OK, MessageBoxIcon.Stop, _
                            MessageBoxDefaultButton.Button1, _
                            MessageBoxOptions.DefaultDesktopOnly _
                            )

And it's a member of System.Windows.Forms so, Imports System

HTH

Michael Maddison

DDI Solutions Pty Ltd
michael at ddisolutions.com.au
Bus: 0260400620
Mob: 0412620497
www.ddisolutions.com.au


-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John Colby
Sent: Wednesday, 4 January 2006 3:44 AM
To: VBA
Subject: [dba-VB] Dot Net - messagebox

In a VB Express project, messagebox is valid, but when I open the same
thing in the VS, it says it is not valid.  Is it possibly because I
created this project as a class library?  I can't seem to import the
forms namespace which IIRC is where the messagebox is contained.

I am attempting to create my own library which I will reference from my
projects.  Should I not make it a class library or am I just completely
off track?

John W. Colby
www.ColbyConsulting.com 


_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com




More information about the dba-VB mailing list