Harut Posted July 19, 2002 Author Report Share Posted July 19, 2002 People, i need help! how can i shut down Windows with BV or C++?is there any such statement or object that i can use? at least, how can i display the shut down box? one more thing.how can i miximize my output window in C++? with code, not manualy. thanks Quote Link to comment Share on other sites More sharing options...
Sip Posted July 19, 2002 Report Share Posted July 19, 2002 Harut jan, I think the function you are looking for, for shutdown is: BOOL ExitWindowsEx( UINT uFlags, // shutdown operation DWORD dwReserved // reserved); uFlags can be any of the following: [*]EWX_LOGOFF Shuts down all processes running in the security context of the process that called the ExitWindowsEx function. Then it logs the user off. [*]EWX_POWEROFF Shuts down the system and turns off the power. The system must support the power-off feature. Windows NT/2000: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. [*]EWX_REBOOT Shuts down the system and then restarts the system. Windows NT/2000: The calling process must have the SE_SHUTDOWN_NAME privilege.[*]EWX_SHUTDOWN Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all running processes have stopped. Windows NT/2000: The calling process must have the SE_SHUTDOWN_NAME privilege.[*]EWX_FORCE Forces processes to terminate. When this flag is set, the system does not send the WM_QUERYENDSESSION and WM_ENDSESSION messages. This can cause the applications to lose data. Therefore, you should only use this flag in an emergency. [*]EWX_FORCEIFHUNG Windows 2000: Forces processes to terminate if they do not respond to the WM_QUERYENDSESSION or WM_ENDSESSION message. This flag is ignored if EWX_FORCE is used. Ok, now about the minimizing thing, what kind of program is it? Is it a "console" program running in a "DOS" box, or is it a full windows program written in Visual C? Quote Link to comment Share on other sites More sharing options...
Harut Posted July 20, 2002 Author Report Share Posted July 20, 2002 thanks Sip. the shut down thing i found just after posting the message in MSDN, haven't tried it yet though. for the second one, i asked a wrong question.i need to make it full screen. it is running in console window. i'm just messing around with these stuff.i just write bunch of stupid aps and get in my friends' nervs. but i still learn from those. Quote Link to comment Share on other sites More sharing options...
Harut Posted January 29, 2003 Author Report Share Posted January 29, 2003 i've got a question. how can i make a link in a web page that will close the window without confirmation?something like the one we have in our poll feature. just want to say that i know nothing about web programing (html, javascript, etc.) YET.but i really need to know this. thanks Quote Link to comment Share on other sites More sharing options...
Azat Posted January 29, 2003 Report Share Posted January 29, 2003 Harut in IE there is a setting that each user can select to get those confirmations or not. No other way for the parent window to close itself without the confirmation. The only time you can close windows without the confirmation is when you had opened that window using code(openWindow). In other words a childwindow can be closed like that. Quote Link to comment Share on other sites More sharing options...
Harut Posted March 23, 2003 Author Report Share Posted March 23, 2003 people, what do you think about ASP.NET?it seems it's very easy to use and powerful platform. btw, thanks Azat. Quote Link to comment Share on other sites More sharing options...
Azat Posted March 23, 2003 Report Share Posted March 23, 2003 I am just starting to use ASP.NET and I like it alot. I have used classic ASP for some 5 years and find it very easy and powerful. ASP.NET does add lots of cool functionality that the classic did not. Plus the ability to compile some of your programs makes it much more powerful and faster. I like it alot... [ March 27, 2003, 02:27 PM: Message edited by: Azat ] Quote Link to comment Share on other sites More sharing options...
Azat Posted April 1, 2003 Report Share Posted April 1, 2003 Has anyone used PHP here? What about MySQL? I have to tell you that I got this small contract/project that I am working on and the client wanted it all on PHP and MySQL and at first I was not much interested in the project because of my lack of knowledge in both, but after I installed them on my machine and started playing with them I was very pleasantly surprised. It is very easy to learn, easy to code yet very powerful combo. I am impressed. I as able to knockout things that would take an experienced ASP programmer a day to do in sub 5 hours. Very cool. Quote Link to comment Share on other sites More sharing options...
Sip Posted April 1, 2003 Report Share Posted April 1, 2003 I have used both PHP and MySql ... just enough to get a small forum up and running ... not much messing around with MySql other an compiling and running it under Solaris and also configuring it. PHP, I've modified a few scripts here and there and looks to be like a fairly standard deal ... I am guessing it would take a few days to look up things in a manual to be confident enough to start writing stuff. Quote Link to comment Share on other sites More sharing options...
vava Posted April 1, 2003 Report Share Posted April 1, 2003 quote:Originally posted by Azat:It is very easy to learn, easy to code yet very powerful combo. I am impressed. I as able to knockout things that would take an experienced ASP programmer a day to do in sub 5 hours. Very cool.Our preferred platform for these type of things:PHP& MySQL running on Apache on some Linux/Unix box. Very smooth, stable and allows for rapid development of all sorts of tools. Unfortunately, I have never really had the time to learn much of the coding involved - but my guys love it as much as they cringe when I tell 'em it's in ASP. Quote Link to comment Share on other sites More sharing options...
Harut Posted August 19, 2003 Author Report Share Posted August 19, 2003 PERL what's wrong with this code? #!/usr/bin/perl $area = 14 * 15.5; print "The area is $area square feet\n"; Quote Link to comment Share on other sites More sharing options...
Sip Posted August 19, 2003 Report Share Posted August 19, 2003 Looks good to me ... it should output "The area is 217 square feet" followed by a new line. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.