|
You can use the ExitWindowsEx[^] method, but remember, on Win2000/XP you'll need extra privileges to use it.
|
|
|
|
|
What is the extra privileges for window XP? I use this but it does not work. Thx
|
|
|
|
|
In VB5 is was
Shell "RUNDLL32.EXE user,ExitWindows"
so it should be
System.Diagnostics.Process.Start("RUNDLL32.EXE user,ExitWindows");
in VB.NET
|
|
|
|
|
I already use this code, but it is error "Can not find file" How about it? thx
|
|
|
|
|
Here's code that'll do it in C#. This includes the code to temporarily elevate the process' privileges so that it is allowed to shut down the system. (ExitWindowsEx will fail on WinNT/2K/XP if you don't elevate the process' privileges before calling it).
--
Russell Morris
"So, broccoli, mother says you're good for me... but I'm afraid I'm no good for you!" - Stewy
|
|
|
|
|
Here's code that'll do it in C#. This includes the code to temporarily elevate the process' privileges so that it is allowed to shut down the system. (ExitWindowsEx will fail on WinNT/2K/XP if you don't elevate the process' privileges before calling it).
link to google group message
--
Russell Morris
"So, broccoli, mother says you're good for me... but I'm afraid I'm no good for you!" - Stewy
|
|
|
|
|
Hello...
For some strange reason, several of the forms in my vb.net app no longer open up in form design mode. They only open up in the code view. Is there any way to change this back??
thanks
- dw
|
|
|
|
|
Every form file, has a resx counterpart. Try deleteing the resx file and opena the form file again.
Free your mind...
|
|
|
|
|
Would anybody be interested in a sample Programe for NET Framework.Compact (VS 2003) with a DateTimePicker ?
The source is based on C# Code found on there Server, but with Internalation support.
At the moment it cannot do two things :
- set the first day of the week (allways Sunday)
- automaticlly translate the word "Today".
The month picker supports all Maschine date formats.
The Day of Week and Month show local language.
Adding a new language takes 3 lines of code.
German and English are supported for the "Today".
Mail here or to mj10777@mj10777.de
Mark Johnson
|
|
|
|
|
I am using Microsoft Exception management application block. But it seems like whenever I have custom publisher configured, i cannot publish exception using default publisher to event log. How can I do this?
|
|
|
|
|
In the VS IDe when you type in the word "System."
a list of possible options appear just below your cursor.
Is there any way to do this same thing for a simple text box
or a RTF control??????
Thanks in advance.
=================================
When I was in school, all I wanted was to get out into the real world.
Now that I'm in the real world, all I want is to go back to school.
|
|
|
|
|
hmmm... Could you do it in the TextChanged event?
|
|
|
|
|
Does anyone know how the code is generated for managed C++? Is it converted into MSIL and thereby subject to the same decompiler issues as C#? If so, then what about mixing managed and unmanaged code - do you get a chunk of MSIL inside the PE format?
The reason for this is to avoid the (easy) decompilation of my source, without shelling out 1000+$ for an obfuscator or a 2nd level compiler (eg Salamander .NET protector). It seems to me that the obfuscation is only a partial or temporary solution - does anybody have some working experience on using this technique. Would hate to fall back to MFC to avoid this issue.
Thanks
/Boris
|
|
|
|
|
Does anyone know why PageScale doesn't work while double buffering?
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
This defaults to "ImeMode.NoControl."
For a CJK localized app, should the user be allowed to pick a mode, or should this simply be left at default? Or is mode changing part of IME?
When all else fails, there's always delusion.
- Conan O'Brien
|
|
|
|
|
Hello,
I am writing a web application using Visual Studio.NET. I noticed that whenever I make changes to the application I need to rebuild/compile the whole program in VS.NET and then re-upload the entire application on the server, otherwise the changes won't take effect. Is there any way for me to replace only the changed files on the server and then rebuild the application there without installing VS.NET on the server itself?
Thanks for your help,
RC
|
|
|
|
|
I have installed .NET Framework 1.1 and then I have uninstalled 1.0 (because I didn't needed it anymore) version. Since then, everytime I try to compile a C# program it generates this error:
"Required file 'C:\WINNT\Microsoft.NET\Framework\v1.0.3705\mscorpe.dll' could not be found"
So the question is: Is there any way how to configure VS.NET for new framework?
Thnx.
--------
Dave
|
|
|
|
|
If you are using VS.NET 2003, go in the project properties, Common properties, General, Supported Run-times, click on ... and select your preferred run-time.
Note this is a bad idea to remove the former run-time since many projects around might require it anyway. Removing the former SDK is ok though.
PS : if you are using VS.NET 2002, bad luck, the target run-time is hardcoded.
RSS feed
|
|
|
|
|
Thnx... I have installed the old runtime back. I thought that if I install a newer runtime, everything will work on the newer one. Actually I'm using VS.NET 2001. [just the first version]. So bad luck...
--------
Dave
|
|
|
|
|
I am trying to develop a simple project with vb.net to detect callerid. I am using tapi3.dll. I get as far as to process events and to detect rings. No luck with caller id. I get stuck with tapi3 "callnotificationevent". Any leads? Is callerid and vb.net not compatible?
Regards,
Dimitri
|
|
|
|
|
I am having trouble adding some of my existing controls to my toolbox in VS.NET. Here's what is going on:
1). I have an existing project that is a Windows Control Library with a bunch of controls.
2). I start a new solution and create an Application
3). I add the existing project with my controls to the solution, then create the reference.
4). I cannot get my tools that are in the project I added. I cannot see them in the Form Designer toolbox, but I am able to declare them in the code.
5). If I add a new control to the control library project, only the one I added inside this solution appears in the toolbox.
How do I get all my controls to show up in the toolbox? I don't want to add the compiled DLL because I still might make changes to the control library.
Thanks!
|
|
|
|
|
You can add your control with:
1. On toolbox add Tab
2. on new tab add/remove items
3. choose dll from your windows control library on tab Com Component
that's it i hope this will be help you thx
|
|
|
|
|
Hello all,
I've been looking for example code on this and have yet to find any substantial examples or discussions. Basically, I need to be able to communicate with a windows service. I want to hold objects in memory that will be accessed by other applications (the windows service will update the objects in memory periodically). I've read articles about remoting, but that doesn't seem to be the right way to go since remoting creates new instances of objects to service a request (even the singleton gets "instantiated" at point). What I need to be able to do, is have the service stop and start with the OS (like a normal automatic service) and have its data accessible at any time by other applications.
Any ideas?
Thanks in advance!
-Q
|
|
|
|
|
1. You could serialize the data into a file or DB, so your application can access the data and deserialize it.
2. With remoting, you can publish an specific instance of an object (I tried this and it worked fine for me) using RemotingConfiguration.Marshal(objRef)
Free your mind...
|
|
|
|
|
Ok, i hope this is the right place to ask this, on .. i reisntalled my system today to try to get .NET working properly .. but no luck.. the problem i have is that everything works but DirectX (Strange part is that the MS examples does not work but the managed directx tutorials here on CD works?!?!).
I get an error about a "pre-verison expired" then an unhandled exception, anyone knows what this can be and if so how to fix it? Ive reinstalled SDK a couple of times, DirectX has also been reinstalled and even with dxsetup /installmanageddx so ive tried everything i can come up with/searched the web for answers and nothing on it.
And please dont flame me, i want to try this thing out and want to see the speeds of it....
Ohh well, hope someone here got an answer for me ... :>
|
|
|
|