|
This looks like a word for word copy of a post on the Microsoft Forums a month back, and is now cross-posted to 'Quick Answers' here[^].
The Microsoft forum post is here[^]
Is there a problem with the solution suggested on that forum?
|
|
|
|
|
|
That's not easy to do; applications shouldn't hijack the entire computer just to ask the user a question.
Perhaps you could create your own desktop[^], and display the form there
I are Troll
|
|
|
|
|
I'm sure if you google for a c# shutdown dialog, you get something.
You don't seriously expect us to provide you with the code, I've had a look at your message history, and you have a habit of doing this, or asking trivial questions that can be answered with a simple search.
I suggest you try something, then let us know what went wrong specifically, this is not a website where people just do your work for you.
[Edit]
Also see Eddie's answer, which he posted when I was writing this.
modified on Thursday, December 10, 2009 10:16 AM
|
|
|
|
|
System Modal dialogs do not exist in Windows NT and above. They only existed in Windows 9x and below.
Don't try to tell me that this isn't true and point to the shutdown dialog. That's not a system modal dialog.
|
|
|
|
|
|
There are classes and libraries that can do this and make it look different, but I think what your asking about is how to make a WPF app (Windows Presentation Foundation). That requires .NET 3.0 or above and a considerable rewrite of your application, since WPF doesn't work anything like Windows Forms.
|
|
|
|
|
thanks for your response. but i dont want to write the whole app in wpf. could you please email me the classes i can add to my winform so that it will have a good look on vista. thanks. OMONIYI Ogunderu.
omoniyiogunderu@yahoo.com
|
|
|
|
|
Omoniyi Ogunderu wrote: could you please email me the classes i can add to my winform
No. I don't care about your email address and the only classes in the .NET Framework that will do this are in WPF. There are no other classes in the .NET Framework that will make your app look "pretty".
|
|
|
|
|
It sounds like you need to port to WPF (there was, for me, a fair learning curve) as the old winforms stuff just isn't as flexible as WPF in terms of display and will lookk flat. WPF has built-in themes such as:
PresentationFramework.Aero
PresentationFramework.Classic
PresentationFramework.Luna
PresentationFramework.Royale
You can also download themes to skin your application as well
Here is a source.
http://www.codeplex.com/wpfthemes[^]
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
can you please tell me your idea plz..
I want to create an accoutn number for every customer when they entered his details in my C# application..
and of course it must be unqiue account number
I though of the following:
DayOfYear + Month + Day + DayOfWeek + the_primary_key_from_customer_table
any other better idea?
|
|
|
|
|
the_primary_key_from_customer_table should be enough.Just have a RegisterdDate column that is datestamped the the user is set up if you need to know this info, I wouldn't put it on the primary key.
Another common thing is to register a user with their e-mail address, each of which is unique (but a user might have > 1e-mail addess), but you need to ensure that all potential users have an e-mail before using this method. This way you can send a confirmation e-mail to ensure they are in charge of the address.
You could also generate a GUID to identify the user and use that as a PK.
Note that whatever you do, preventing a user from registering twice under different accounts is fatastically difficult (or possibly impossible!).
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
no but thisis to be printed on the invoice of the customer so email and guid won't be ok..
what i wanted is something like a long number just to avoid tell customer that your account number is# 1 or #2
|
|
|
|
|
You could just start your seed for your customer table at something like 10,000 or something.
|
|
|
|
|
Now I understand what you want a bit better. Even if the you have customer no 1 it can still be printed 00000001.
You just need to decide how many digits you want at the outset though you can add more leading zeros if necessary. This will also free up more keys given the same number of digits, as you don't tie the key to the date which uses the first 8 up according to your scheme.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
I'd suggest not using the PK; sometimes people want to change their number, for whatever reason, and you'd have to update all the references.
Add an extra identity-field, set the seed to 8738234 and increment with 1
I are Troll
|
|
|
|
|
If you are trying to generate a number that the user can easily speak over the phone or type into an email you want to consider the number of digits.
If you do:
YearsSince2000 , DayOfYear , MemberThatDay
You could have it be 2+3+3 = 8 digits, but you would limit the number of accounts created in a day to 1000 (and only 100 years), which may be too low. (Unless you choose a base higher than ten, but I don't recommend that.)
|
|
|
|
|
Hi,
i would like to convert this DateTime format from
"Sat, 05 Dec 2009 14:37:55 GMT"
to
"05 Dec"
Please advice. Thanks
|
|
|
|
|
DateTime foo = DateTime.Now;
Console.WriteLine(foo.ToString("dd MMM"));
Should sort you out. I'm feeling helpful today, other people will probably just tell this stuff is easily googled (which it is).
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
|
I want to validate a string containing the first name of a person.
The regegular expression should return a match if the first letter of the name is capitilized and
the rest are lowercase. The first name could also be multiple name.
sample:
John
John Raymond
Gary John Smith
Thanks a lot.
|
|
|
|
|
Something like this?
([A-Z][a-z]*)(\s+[A-Z][a-z]*)*
Of course that'll fail for the more exotic names, but you can modify it.
|
|
|
|
|
Thanks a lot. That's all I need.
|
|
|
|
|
|
Top marks for J-C v-D!
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|