473,396 Members | 1,847 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,396 software developers and data experts.

problem with messagebox class

10
iam new to dotnet ,iam not getting messagebox class in my system.(presently iam working with c#).please help me how to get it ...
thanks in advance..
Sep 11 '07 #1
9 2114
RoninZA
78
You need to use the System.Windows.Forms.MessageBox class... this obviously needs to be a windows application for you to be able to use it, because the MessageBox class needs a Windows interface to run on. MessageBoxes can not be displayed from a console application (as far as I know) or a web page, for example.
Sep 11 '07 #2
Hi jany]iam ,

There is none.. But you can always create a messagebox functionality program code in c#.net .

Best Regards,
Ruel




iam new to dotnet ,iam not getting messagebox class in my system.(presently iam working with c#).please help me how to get it ...
thanks in advance..
Sep 12 '07 #3
mzmishra
390 Expert 256MB
You can create messagebox using javascript in your code.
Sep 12 '07 #4
SammyB
807 Expert 512MB
iam new to dotnet ,iam not getting messagebox class in my system.(presently iam working with c#).please help me how to get it ...
thanks in advance..
Here is a sample class that uses a message box. Note at the top that I have
using System.Windows.Forms;
Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Windows.Forms;
  3. namespace WindowsApplication1
  4. {
  5.     class Sample
  6.     {
  7.         private DateTime StartTime;
  8.         public Sample(DateTime dtStart)
  9.         {
  10.             if (dtStart > DateTime.Now)
  11.                 MessageBox.Show("Invalid Time");
  12.             else
  13.                 StartTime = dtStart;
  14.         }
  15.     }
  16. }
  17.  
Sep 12 '07 #5
jany
10
Here is a sample class that uses a message box. Note at the top that I have
using System.Windows.Forms;
Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Windows.Forms;
  3. namespace WindowsApplication1
  4. {
  5.     class Sample
  6.     {
  7.         private DateTime StartTime;
  8.         public Sample(DateTime dtStart)
  9.         {
  10.             if (dtStart > DateTime.Now)
  11.                 MessageBox.Show("Invalid Time");
  12.             else
  13.                 StartTime = dtStart;
  14.         }
  15.     }
  16. }
  17.  


hi sammy, thanks for your response..
i know that message box class is available in windows app.but iam using a web application (C#),is there any chane to use message box class...
iam getting only "mbox" throrgh intellisence..but it is also not working properly...
Sep 12 '07 #6
jany
10
Hi jany]iam ,

There is none.. But you can always create a messagebox functionality program code in c#.net .

Best Regards,
Ruel
hi aliasruel,
thanks for your reply
iam using c# olny,but is a web application,
then how to display the message box....
Sep 12 '07 #7
dip_developer
648 Expert 512MB
hi aliasruel,
thanks for your reply
iam using c# olny,but is a web application,
then how to display the message box....
you can use Javascript for message boxes......

you can use the alert() function.........

or you can use a new webpage as a messagebox......try to use javascript window.open() function.... in any button_click event you can have a pop-up window with the following code
Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. string popupScript = "<script language='javascript'>" +
  4. "window.open('AddNewProduct.aspx', 'CustomPopUp', " +
  5. "'width=850, height=650, menubar=no, resizable=no')" +
  6. "</script>";
  7. Page.RegisterStartupScript("PopupScript", popupScript);
  8.  
Sep 12 '07 #8
Plater
7,872 Expert 4TB
but iam using a web application (C#)
This is why we have a posting guideline that specifically asks you to include that kind of information in your original post.
It would save us all time (except for me because I'm dumb and skim over it sometimes causing lots of confusion)
Sep 12 '07 #9
Hi Jany,

You dont need to create a new webpage as a messagebox. In c#.net i have created a functionality in web application that will perform the same behavior of a message box just like in windows form.
maybe you can email me to [snip] then i will send the tool to you.

Best Regards,
Ruel




hi aliasruel,
thanks for your reply
iam using c# olny,but is a web application,
then how to display the message box....
Sep 13 '07 #10

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

Similar topics

1
by: Dmitry Akselrod | last post by:
Hello everyone, I have a vb.net application that wraps the TCPListener object in a class. The server connects to the local interface and establishes itself on port 9900. It then polls for...
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.)...
8
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...
5
by: Hari | last post by:
Guys please help me to solve this strange problem what Iam getting as follows.. Trying to instantiate a global instance of a template class as follows :- when i build this code with debug and...
5
by: Sebastian Santacroce | last post by:
Hello, I'm trying get a message box to show useing messagebox.show (...) and then checking what they chose. The only problem is that when it pops up it is locking all other windows until it the...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
0
by: Slawomir Nasiadka | last post by:
Hi, I'am new to this group so I would like to say "Hello" everyone and here is my problem: I'm writing a simple application (code is at the end of this message) witch would list all mails...
3
by: Veerle | last post by:
I have the following html: <table cellpadding="0" cellspacing="0" width="850"> <tr> <td> <div id="messagebox"> <div class="Dialog"> <div class="DialogHeader">Fouten</div> <div...
3
by: garyusenet | last post by:
Hello everyone I hope you are having a good evening. This evening I made a method that allows me to find the process id's of running processes of a given 'friendly name' - using...
10
by: Clayton | last post by:
Hi all, I'm trying to develop a server that listens to incoming calls using the asycnhronous methods BeginAccept / EndAccept. I start the server (till this point it is ok) and few seconds later...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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...
0
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...
0
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...

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.