473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

MessageBox using Dllimport

To display a messagebox i used the below shown code
[DllImport("user32.dll",Entrypoint="Messagebox")]
public static extern int MessageBox(int hwnd,string message,string caption,uint uitype)

then when I use the above mentioned messagebox in order to get the exception from the sql statements it shows a error message that overloading is not possible what has to be done to it?
Jun 25 '08 #1
4 1826
Plater
7,872 Expert 4TB
Why wouldn't you just use the regular .NET MessageBox ? It's probably erroring because you already have access to the MessageBox object.
Jun 25 '08 #2
Why wouldn't you just use the regular .NET MessageBox ? It's probably erroring because you already have access to the MessageBox object.
But in ASP applications u doent have default messagebox either u could add reference and get the controls by adding the namespace
using System.windows.forms and get the messagebox from that or either get the messagebox through a script ('Alert') or as i mentioned above.

Waiting for ur reply

Regards
raghul
Jun 26 '08 #3
Curtis Rutland
3,256 Expert 2GB
But in ASP applications u doent have default messagebox either u could add reference and get the controls by adding the namespace
using System.windows.forms and get the messagebox from that or either get the messagebox through a script ('Alert') or as i mentioned above.

Waiting for ur reply

Regards
raghul
AFAIK you can't use a Windows Forms message box in ASP.NET. At all. And if you could, it would pop up on the server, not the client.
Jun 26 '08 #4
Plater
7,872 Expert 4TB
AFAIK you can't use a Windows Forms message box in ASP.NET. At all. And if you could, it would pop up on the server, not the client.
Exatly. Alias you keep beating me to the punch


You should be looking at various aspnet messagebox options.
Jun 26 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Umesh | last post by:
Hi all I am trying to change the printer(like paper source ,etc) setting in C#. But i am unable to do it. I am not sure how to do it. should i have to use WIN API like Openprinter , getprinter ,...
2
by: rawCoder | last post by:
Hi All, I have a *.cer file, a public key of some one and I want to encrypt some thing using this public key. Can someone point me to a sample code for Encrypting some file using...
7
by: Vincent Nguyen | last post by:
Hi, Does anyone know how call Win32 native API GetTokenInformation() by using C#? Any sample code would be helpful. Thanks! Vincent
2
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.)...
4
by: Tressa | last post by:
I have a messagebox that I only want to pop up only if it is not already being displayed on the screen. My code is still poping up the messagebox even though it is on the screen. What am I doing...
0
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; ...
13
by: Javad | last post by:
Hello I know that I should get the information of windows internet connections by using "rasapi32.dll" library, and I also have some sample codes, but I can't make them work. My exact need is to...
10
by: =?Utf-8?B?TWF0dA==?= | last post by:
I am using the following code to connect to and download files from an ftp server, but the Symantec anti-virus software on some of my customers machines tells them that their computers are...
5
by: arggg | last post by:
I have created a .dll that I am using in my .exe project however I would like to display information in the .dll in a messagebox from the dll. I did the and it still will not show the messagebox. ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.