473,503 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Do not show this message again

I have designed my own messagebox that simulates the standard .net
msgbox, but I've added a checkbox that says "Do not show this message
again". It works but it's a little bit clunky and non-standard. For
one thing my msgbox doesn't automatically size itself to the size of
the message being passed to it.

I was wondering if there's a proper way to do this in .net. Maybe
there's already a special msgbox built in that does this.

Thanks,
di****@verizon.net

Nov 21 '05 #1
3 5067
moondog wrote:
I have designed my own messagebox that simulates the standard .net
msgbox, but I've added a checkbox that says "Do not show this message
again". It works but it's a little bit clunky and non-standard. For
one thing my msgbox doesn't automatically size itself to the size of
the message being passed to it.

I was wondering if there's a proper way to do this in .net. Maybe
there's already a special msgbox built in that does this.

Thanks,
di****@verizon.net


How are you showing the message? In a labelbox? Is so, just set the
box to autoresize. Then when you do the show of your form, just resize
the form to be just bigger than the label itself.

Another idea would be to use the Graphics.DrawString to draw the message
directly to the form in the paint event. Then use the
Graphics.MeasureString to get the size you need the form to be.

Hope it helps.
Chris
Nov 21 '05 #2
"moondog" <di****@verizon.net> schrieb:
I have designed my own messagebox that simulates the standard .net
msgbox


In addition to the other replies:

Implementing a message box with standard behavior
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=custommsgbox&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #3
Thanks Chris, I was looking for that Graphics.MeasureString property.

But I think the solution Wagner gave is the best.

I used it and it works great.

Thanks,
di****@verizon.net

Nov 21 '05 #4

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

Similar topics

3
353
by: PratyushK | last post by:
Hi All, I am facing a problem where by VB .NET and C# based application, initially developed with VS .NET2002 when compiled with VS .NET 2003 and run on .NET framework 1.1 is not showing text...
4
2839
by: Brian | last post by:
Hi there I'm not so hot on JavaScript so not sure if this can be done. I have a PHP page that runs a MySQl query, while these queries are running I would like to show a message saying...
2
2444
by: z. f. | last post by:
Hi, i have a field with required field validator. on the client side it's working. when i submit without the required field the page gets back because of not valid, but the message from the...
1
1171
by: Mike Moore | last post by:
We have a custom validator that should validate when there is a duplciate record, but the problem is that the show message box doesn't display. Why suggestions as to why?
4
10579
by: bnob | last post by:
In a Button clik event I have this code at the end of the event Response.Redirect("Page.aspx") But in this event I must show a message before redirect to the Page.aspx. I use to show Message...
4
2058
by: Jhonatas M. RodrĂ­guez | last post by:
Hello Everybody how are you everybody ?... i have a problem with picture box, i want copy a image from the clipboard, and me can to copy a image if the image is a bitmap(extension bmp), but if...
3
2007
by: dearprasan | last post by:
I am trying to show a message box with additional feature to put a checkbox for something like "Dont show me again" etc. Is there an easy way to achieve this?
0
1079
by: kayyum | last post by:
how to show message in asp.net in code behind for web page using C#
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7264
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,...
0
7316
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
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4992
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...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.