|
I'm currently setting the text at design time, and just doing the select+font change in the constructor. That works, but struck me as a little ugly when looking at my old code; if MS won't give a better way to do it...
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
why do you need to do it at design time anyway?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I don't need to, but aesthetically prefer to have as much static UI initialization as possible done in the designer.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
Hi everyone,
Please can someone tell me how to shutdown my computer with C#?
I'll appreciate it. Thanks in advance.
Emma.
|
|
|
|
|
There is a command "SHUTDOWN". Just call it using Process.Start("...");
For help, use SHUTDOWN /?
|
|
|
|
|
Thanks stancrm, you were really helpful!
But you meant:
System.Diagnostics.Process.Start("ShutDown", "/s");
|
|
|
|
|
Here[^] is an article on doing it in VB.Net, should be fairly easy to convert to C#.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I've seen lots of these lately, are we going to have a outbreak of shutdown-virii soon?
|
|
|
|
|
Quick, I found a fix, I'm uninstalling the .net framework now!!
|
|
|
|
|
But can you do it before the shutdown timer starts?
Seriously, I really wish Windows had per-process permissions. For example, the user has to allow Process X to access the screen, use the sound card, etc. It would make life so much simpler, and could probably neutralise a lot of the viruses that are out there
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
And people thought the level of user complaints about Vista's UAC was bad.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
As long as it gives a clear error message, and provides the option to provide the necessary permissions I would be fine with it
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
You and 1% of other PC users (basically the masochists who've spent so long being popuped to death by ZoneAlarm that they never even noticed the new UAC popups). *shudder*
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
AVG doesn't annoy though, IMO.
Of course M$ can't do it right, but that doesn't necessarily mean that no one can, right?
|
|
|
|
|
IF you're talking about the anti virus software, AVG only prompts when it blocks something. Hopefully you encounter trojan web pages/email much less frequently than you install applications or reconfigure your OS.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
Actually, no. Maybe I just frequent the wrong places on the 'net, but I get plenty of warnings from my trusty ol' AVG
More often than I install something probably, most programs don't need installing.
Anyhow, they could fix UAC for the biggest part with one small fix: a checkbox "Remember this choice for this application"
|
|
|
|
|
harold aptroot wrote: Actually, no. Maybe I just frequent the wrong places on the 'net, but I get plenty of warnings from my trusty ol' AVG
That or maybe AVG's gotten considerably more noisy since I last used it 5(?) years ago. I maybe see an avast warning once a quarter, I get a UAC prompt once a week after installing all my base apps.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
Oh I don't know, I never get UAC prompts
(XP)
|
|
|
|
|
*biff*biff*biff*biff*biff*biff*biff*biff*
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
Perhaps. Then again it doesn't seem that bad:
- Run Fx for the first time
- Get a prompt. "This program doesn't have the necessary permissions to access the Internet. Do you want to grant the permissions this once, or permanently"
- If the permanently option is selected, always give Fx permissions. Otherwise, just do it this once
Maybe add the option to always grant the necessary permissions to software made by the manufacturer
The only people this should annoy are the people who don't read dialog boxes anyway, and don't notice the 'permanently' option. Prevent Weven being booted from anything other than a command prompt and you solve that
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
You might as well use ExitWindowsEx()[^] with EWX_POWEROFF flag.
Yes, it isn't a function from the .NET library; but you could use p/Invoke.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I want to ask some question about vb.net and c# . I had created dll file that write in vb language and I want to used in c# project Its possible or not if I do that!
thank you for all that give some advice me !!!
|
|
|
|
|
Yes it is possible. Once its compiled it does not matter if it is in VB.Net or C#.Net you will still be able to make use of its functions from within another class. Just make sure you reference the DLL correctly.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi, like musefan said, it's possible
But, I'm wondering.. why didn't you just go ahead and try it?
|
|
|
|
|
Though, you have already been answered. It would be nice to read a bit about this[^].
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|