Shut Down Computer With A Program From Visual Basic?
Apr 17, 2009What is the code to shut down my computer with visual basic?
View 9 RepliesWhat is the code to shut down my computer with visual basic?
View 9 Repliesi want to shut down the computer after my programe exits how can i do that?
View 10 RepliesI'm making a simple app that checks if Windows Media Center is open, if it is open and the program receives the close command from windows, make my application shut down the computer. I was wondering if this was the most efficient way of doing this:
[Code]...
I need to give input to the VB code by outlook express ie the command to shut down the computer will be imported from OUTLOOK EXPRESS
View 2 Repliesi want to build a software which can lock the computer (not to lock the computer as i lock in windows) and then another software that can unlock it.
View 5 RepliesI need to make VB 08 scan for a random file for example "something.txt, .exe ext." how can I make it scan for that something any were on the hard drive? And the I could declare its path in a variable correct? if I am not specific enough I still don't know every thing about VB.
View 2 RepliesI just want to shut down my computer, but seems like nothing works. I'm using Visual Basic 2008 with Windows 7.[code]...
The only thing that happens, is that the program looses focus, then several more instances of the program is created. Are there some particular restrictions in Windows 7 that prevents shutting down the computer?
I am trying to make a console program in Visual Basic on Visual Studio 2008. I want to ask the user of the program if he wants the premium version or the standard version. If he chooses the premium version, then I want it to say premium in his "receipt" later on and if he chooses standard, then standard in the receipt.
[code]...
I've noticed that a few download management programs do this, like uTorrent for example, where you can set it to shut down the system when the download(s) complete and I would like to implement this in my app as well.Right now I'm usingProcess.Start("shutdown.exe", "-s -t 05")which works fine if the user is logged in, but my home computer has the screen saver set to lock the computer in which all my app does is exit but the system doesn't shut down like it does when it's logged in.
View 2 RepliesI have visual studio 2008 installed and was using C#. I am now trying to find Visual Basic. I can't find it. Is there a way to download it or should it be somewhere in my visual studio program? I don't want to use vbexpress, just regular VB 2008.
View 1 RepliesIn uTorrent the system shuts down whether the user is logged in or the system is locked, how is that possible?Also I would like to know how to detect if the system is locked or not because if they are logged in I, like uTorrent, would like to prompt the user that the system is about to shut down and give them 30 seconds to cancel it.
In addition to
Process.Start("shutdown.exe", "-s -t 05")
I also know about
[code].....
I've noticed that a few download management programs do this, like uTorrent for example, where you can set it to shut down the system when the download(s) complete and I would like to implement this in my app as well.
Right now I'm using
Process.Start("shutdown.exe", "-s -t 05")
which works fine if the user is logged in, but my home computer has the screen saver set to lock the computer in which all my app does is exit but the system doesn't shut down like it does when it's logged in. In uTorrent the system shuts down whether the user is logged in or the system is locked Also I would like to know how to detect if the system is locked or not because if they are logged in I, like uTorrent, would like to prompt the user that the system is about to shut down and give them 30 seconds to cancel it.In addition to
Process.Start("shutdown.exe", "-s -t 05")
I also know about
<DllImport("user32.dll")> _
Public Shared Function ExitWindowsEx(ByVal uFlags As Integer, ByVal dwReason As Integer) As Integer
End Function
Call ExitWindowsEx(1I, 0I) 'Shut Down
but this doesn't shut down the system if it's locked either.
I've recently started using visual basic express 2008 and am having problems with saving my project. Basically, the data sources keep dissapearing from the project when i have shut down my computer and come back to the project at a later time. This has happened to my project several times now and is getting quite irritating as i don't seem to beable to find a resolution to the issue.I could continue developing my application without having to re write the code constantly.
View 5 RepliesI have a procedure at the end of my console application that ask the user to either hit enter to end the program, or type s to perform another search. The issue I'm having is no matter what the user types in the program end. What I would like to happen is if the user types s, then the program starts over and lets the user perform another search. The program is procedural and I need to find a way to start back off at the top of the program which ask the user to type a name to search.
[Code]....
i'd like to make a tiny program that shows an image 2 images selected by a scrollbox that can be zoomed and pannedthere also would need to be a coordinate system added to the image so that the user can ad points of intrest (small cross apears on map)to the picture by entering the coordinates. these points of intrest should then be saved in a db file so they can be reloaded when the program is stopped and rerun.
View 6 Replies[code].....
View 3 Repliesi am trying to make a auto updater built into my program.[code]not it kinda works only its telling me i have updates when its the same version!
View 6 RepliesWhen I have tried to run a program in vb 2008 I get the following error message BC32400: Class 'CLSID_CorSymWriter' could not be created: System Error &H8004015 I have tried to uninstall and re install visual studio 2008 (academic) (several times) to no avail.
View 3 RepliesAnyone know of a way to do addon's with a visual basic program? I want to create a program that has some basic functions, but to stay away from bloatware and unused functions. How would you create a main program when it is installed and then be able to add and remove features to it?
View 4 Repliesi need to know how to make my Visual Basic program install onto the computer. right now my program is a simple .exe file and does not require instalation.
View 3 RepliesHow would I open a program within Visual Basic 2010? (Like running "Application.txt" from "C:" within a Visual Basic project.
Public Class getfrom
Dim getfrom As String
Dim saveto As String
Dim download As Boolean
[code]....
How do you remove a Reference from a Visual Basic progam?
View 3 RepliesI have a program written in VB.NET which stops a service that uses file x, modifies x, and restarts the service.
I have modified my code for testing so that it just reads in the file as a string and immediately writes it back out.
Shell("net stop " & SERVICE_NAME, , True)
Dim myReader As System.IO.StreamReader
myReader = My.Computer.FileSystem.OpenTextFileReader(x)
fileString = myReader.ReadToEnd()
[Code]....
The stopping of the service is no problem, and modifying the file is no problem, but when the service starts it stops immediately because, as best I can guess, the file is in use. Even when I try to start the service manually, it stops immediately. However, I found that I can open file x, click save without modifying anything, close the file, and start the service and everything works correctly.
If I comment out the writing part, everything works fine.
Also, the file I'm modifying has a .conf file extension. I don't know if this is relevant.
I'm doing a baseball program for a class project. And I almost have it complete, but it's giving me a syntax error. I can't figure out what i'm doing wrong. I'm using two functions to return a value for different type of baseball tickets to the button that calculates them. Here are the instructions 1.)User selects whether to purchase season tickets or single-game tickets 2.) User enters the number of tickets needed and the type of seats based on whether they selected season single-game tickets.3.) User clicks the Compute Ticket Cost Button to display final cost4.) User clicks the Clear Form button to clear the responseI just can't figure out what I did wrong. I know it's something stupid that i'm doing.the errors are happening inside the btnCompute sub routine. with syntax erros on SingleGameCost() and SeasonalCost() line 114 and 118
Public Class Form1
'Global Variables
Dim intTicketChoice As Integer
[code]...
I have made a Medical software writen in VBA and now I want"transfer" (?!) the same softwareto a Visual Basic program that can be run in a computer without Microsoft Office(Excel) installed. How can I do this? I dont want to write all theVBA program again because it is very large and full of spreadsheets and mathematical formulas.
View 1 RepliesI want to use firefox as a default browser for a webbrowser control in a form in Visual Basic Express. How do I do this? How do I launch firefox or an external .exe program from within my application and send a page for it to open or load automatically?
View 4 Repliesmake program in visual basic 2008 to covert .flv to .mp3?
View 6 RepliesIm trying to make a "database" in VB 08 and i donīt have a clue how to do it. I Want that my program will be able to update itself when i want it to update Ex: My friend downloads my program and lets say 2 days later i want to update it becuse i have discovered a flaw how would i do it? Do i have to use a installer so my friend gotta install it or what?. I donīt think that its a code im looking for or im i wrong. IS it a code im looking for or what ?
View 1 Replies[code]....
View 12 RepliesHow do you extract source code from a VB.NET .EXE file?
View 3 Replies