Hello, recently I've been trying to "play" with MessageBoxes and wondered how may I add custom buttons. A basic MessageBox should look like this: - MessageBox.Show("Message", "Title", MessageBoxButtons.Something);
However, I'd like to know how to create one with Once, Weekly, Monthly, Daily and Cancel, instead of MessageBoxButto ns.Something. I've tried creating an enum and it displayed on the MessageBox, however, it does let me choose only one of options (Once, Daily, Monthly, etc). How may I make it work properly with MessageBox.Show , so user choose one of these options?
This is how the enum looks like by the way: - public enum Frequency { Once, Weekly, Monthly, Daily, Cancel }
0 1358 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Dennis C. Drumm |
last post by:
I have a windows form configured as a fixed dialog I'm using as a custom
MessageBox (has some additional buttons). How do I get it to play the
standard windows sounds when envoked and can I insert the standard
MessageBox icons into this dialog?
Thanks,
Dennis
|
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...
|
by: John Smith |
last post by:
I have a custom enum to list comparison operators: =, <, <=, >, >= . I have
created it as follows:
public enum Comparator {Equal, LessThan,
LessThanOrEqual,GreaterThan,GreaterThanOrEqual}
Now I have to create static functions to convert these enum values to/from
the actual comparison operator strings. As I understand it, I can't add
methods to an enum, so is there any more elegant way to do this?
|
by: Michael Feld |
last post by:
Hello,
does anyone know how to produce a data type which offers Enum-like
IntelliSense in VS 2005?
What I am trying to create is a type which is very similar to an enum, i.e.
has a fixed set of values, but provides some more methods. Unfortunately,
you cannot derive from System.Enum to do this.
I noticed that if you type "Dim C as System.Drawing.Color = ", the editor
will display a list of colors, but this are actually ReadOnly Shared
|
by: Martin Engelhardt |
last post by:
Hi,
I want to use the following:
Class Test ...
Public Enum TestEnum as integer
Enum1 = 128
Enum2 = 256
End Enum
| |
by: Steven Nagy |
last post by:
So I was needing some extra power from my enums and implemented the
typesafe enum pattern.
And it got me to thinking... why should I EVER use standard enums?
There's now a nice little code snippet that I wrote today that gives me
an instant implementation of the pattern. I could easily just always
use such an implementation instead of a standard enum, so I wanted to
know what you experts all thought.
Is there a case for standard enums?
|
by: Peter Hartlén |
last post by:
Hi!
What's the correct syntax for the default value design time attribute, using
classdiagram view and Custom Attributes dialog.
For a boolean:
DefaultValue(true)
DefaultValue("true")
DefaultValue("bool","true")
|
by: Daniel Jeffrey |
last post by:
Hello.
Can anyone help me please. I have created an Enumeration, and I loop through
it, it all works ok, except the first item returns 2 times.
Code is below. When called I Get "Text Edit" 2 times
public enum CustomFieldTypes
|
by: deerchao |
last post by:
Hi, I'm using linq 2 sql, and I specified a custom enum type
(CompanyType) to one of the Company table field.
When I'm querying like this:
IEnumerable<CompanyTypevalidTypes= ...;
var v = from c in db.Companies
where validTypes.Contains(c.CompanyType)
select c;
I got an exception says:
|
by: Rex the Strange |
last post by:
Hello all,
Can anyone please tell me why I can't do this (and what I can do to
get the equivalent effect):
In the code:
public enum myenum
value1
value2
|
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,...
| |
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...
|
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,...
|
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...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |