473,671 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Messagebox.Show

Lou
How do I use Messagebox.Show in a dll.
It doesn't seem to work since i have no form?
-Lou
Jan 18 '07 #1
7 1603
On 2007-01-18, Lou <lo********@com cast.netwrote:
How do I use Messagebox.Show in a dll.
It doesn't seem to work since i have no form?
-Lou

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

--
Tom Shelton
Jan 18 '07 #2
Lou wrote:
How do I use Messagebox.Show in a dll.
It doesn't seem to work since i have no form?
From where are you calling the Dll method that displays the MessageBox?

Console application?
Forms App?
ASP.Net web page?

Regards,
Phill W.
Jan 18 '07 #3
Lou
Can't do that, it won't let me. I am trying to issue it from a COMCLASS

"Tom Shelton" <to*********@co mcastXXXXXXX.ne twrote in message
news:1t******** *************** *******@comcast .com...
On 2007-01-18, Lou <lo********@com cast.netwrote:
>How do I use Messagebox.Show in a dll.
It doesn't seem to work since i have no form?
-Lou


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

--
Tom Shelton

Jan 18 '07 #4
Lou
From a vb class COMCLASS
If I try to do System.Windows; it won't let me!
the "Windows" doesn't enumerate in the intellisense?

"Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-kwrote in message
news:eo******** **@south.jnrs.j a.net...
Lou wrote:
>How do I use Messagebox.Show in a dll.
It doesn't seem to work since i have no form?

From where are you calling the Dll method that displays the MessageBox?

Console application?
Forms App?
ASP.Net web page?

Regards,
Phill W.

Jan 18 '07 #5
"Lou" <lo********@com cast.netschrieb :
How do I use Messagebox.Show in a dll.
It doesn't seem to work since i have no form?
In addition to the other replies, why not just use 'MsgBox'?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jan 19 '07 #6
What do you mean, it won't let you? How did you add the reference
to your project?

Robin S.
------------------------------
"Lou" <lo********@com cast.netwrote in message
news:um******** ******@TK2MSFTN GP03.phx.gbl...
Can't do that, it won't let me. I am trying to issue it from a
COMCLASS

"Tom Shelton" <to*********@co mcastXXXXXXX.ne twrote in message
news:1t******** *************** *******@comcast .com...
>On 2007-01-18, Lou <lo********@com cast.netwrote:
>>How do I use Messagebox.Show in a dll.
It doesn't seem to work since i have no form?
-Lou


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

--
Tom Shelton


Jan 19 '07 #7
Lou
That's what I ended up doing.

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.atwrote in message
news:uE******** ******@TK2MSFTN GP03.phx.gbl...
"Lou" <lo********@com cast.netschrieb :
>How do I use Messagebox.Show in a dll.
It doesn't seem to work since i have no form?

In addition to the other replies, why not just use 'MsgBox'?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 20 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
541
by: Rich Tasker | last post by:
I have a strange situation. A simple call to MessageBox.Show("XXX", "YYY") does not display the message in the messagebox with a visible font. Based on the content of the messagebox, the box sizes properly so I know there is a message in there. I also found a keyboard shortcut where <ctrl>+<insert> will copy the contents of the messagebox to the clipboard in plain text. I see my messagebox text in the clipboard contents but not in the...
2
30143
by: Dennis C. Drumm | last post by:
This is a restatement of an earlier post that evidently wasn't clear. I am building a custom MessageBox dialog that has, among other things, a few new button options (yes to all, no to all, etc.) and would like to make the dialog look and act like the standard MessageBox. Therefore, I would like to put in the message section the same type of icons found in the MessageBox dialog, such as MessageBoxIcon.Exclamation. In another post here I had...
8
2444
by: Saso Zagoranski | last post by:
Hi! I'm trying to make my own MessageBox... What I would like to know is, how the MessageBox class is implemented? I could have something like: new MyMessageBox().ShowDialog(); but I would like the solution used by MessageBox, where you call the static Show() method, which returns a DialogResult value...
3
7424
by: Sin | last post by:
I'm currently evaluating VC.NET as the new platform for the company I work for and things are looking grim... We're up against another IDE which took me about 5 minutes to master and I've been bitching at .NET for the whole day now not being able to do something as simple as showing a textbox's content in a damn MessageBox... The TextBox.Text is a String... MessageBox takes a LPCSTR (plain single byte char*)... All our current code base...
0
4092
by: alex_f_il | last post by:
The class centers MessageBox inside the parent rectangle. Enjoy! using System; using System.Windows.Forms; using System.Text; using System.Drawing; using System.Runtime.InteropServices; namespace Utils {
20
8891
by: Peter E. Granger | last post by:
I'm having a strange problem (or at least it seems strange to me) trying to display a MessageBox in a VC++ .NET forms application. If I put the call to MessageBox::Show in the form's .h file, it works just fine. If I put the call in the .cpp file, I get the following two errors: error C2653: 'MessageBoxA': is not a class or namespace name error C2660: 'System::Windows::Forms::Control::Show': function does not take
10
2343
by: Russ | last post by:
I've been trying to figure out how to show a simple messagebox with an OK button in my web client program (C#). I have looked at every reference to JScript and MessageBox that seemed even remotely like it could help, both in the VS help and in this NG. I found lots of examples of people saying how easy it is and showing examples, and examples in the help. But I have two problems: 1. All the examples show all the code in HTML, usually...
3
2685
by: Kiyomi | last post by:
Hello, I use in my application MessageBox.Show and it works perfectly when I run this application on my local computer (http://localhost). When I diployed this application on the server, however, it does not work. It does not give me even an error message, but the screen is just freezed (it is running open the page). What are the requirements for the MessageBox.Show to work ? I suppose something is missiong on the server as the same...
2
2555
by: Nuno Magalhaes | last post by:
Why does the MessageBox.Show function in the thread below changes the program behaviour, in other words, the APListView becomes filled with values with a call to RefreshAPListView. Without the MessageBox.Show function, in my laptop, the code doesn't get past the inner loop where there is a Thread.Sleep(10). Here is the code. Does anyone know why? Thanks. private void APRun() {
1
4195
by: gewe | last post by:
I have a form (sizeable border, shows in taskbar, nothing unusual), which is the main form of my application (called MainForm). During an operation progress is shown in another form, that is shown from within the main form with: pf.Show(this); When I have to show a messagebox, the messagebox is shown behind the main form. The messagebox is shown from within the main form. I tried both: MessageBox.Show(this, ...); and:...
0
8393
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8914
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8820
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8598
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8670
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6223
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2810
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.