|
Thank you, but i mean how to prevent the shutdown command even in windows vista & 7?
|
|
|
|
|
Are you just trying to prevent the automatic reboot with windows update? You can modify the registry
HKEY_LOCAL_MACHINE
"SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU"
"NoAutoRebootWithLoggedOnUsers"
1
|
|
|
|
|
No, i'm in project to build an i-cafe software for my own i-cafe. I want to prevent user to shutdown/loggof/reboot/sleep/etc. My code work well in windows xp without any problem, but not in vista/7.
|
|
|
|
|
Sorry, then I'm not sure that I can help you. I am still using XP.
|
|
|
|
|
anyway thanks for your help...
|
|
|
|
|
Yes, but those are services running under System accounts. If you don't have th permissions, you can't stop those services. His app is under user-mode, which can be easily stopped.
|
|
|
|
|
Yeah, you're right. Handycafe is so easy to terminate. But what is the code for fully prevent windows shutdown like what handycafe do?
|
|
|
|
|
Hi Everybody!
I've been getting increasingly annoyed at my computer today owing to a most peculiar problem. Whenever I run my VB.NET 2010 console application with no command-line arguments, the icon in the console window caption is displayed as my application's icon just as it should be.
However, when the application is run with one or more command-line arguments, the correct icon is not displayed, and is replaced by the default icon for executable files. Does anybody know why on earth this is happening and what I can do to solve it?
Thanks in advance!
MrWolfy
|
|
|
|
|
I'm afraid there isn't enough information to work on.
- How do you launch your console app? inside a "Command Prompt"? using an Explorer shortcut?
- What is your operating system?
- Does your code do anything at all regarding its icon(s)?
- what are the icon sizes you provided in the .ico file?
suggestion: try on different machines, also running different Windows versions.
|
|
|
|
|
Hi!
Sorry if my question was slightly brief, here's the information you requested:
- The icon displays correctly when launched from windows explorer by double-clicking the program icon. When I launch it in debug mode from VB Express it's icon does not display at all, regardless of command line arguments (though I assume that this has something to do with the Visual Studio hosting process). When launched from "cmd.exe", the icon remains as the standard icon for the command prompt regardless of arguments provided.
When the program is launched because a file of a type associated with it (through the registry) is double-clicked in windows explorer, the icon does not display correctly, the default executable icon is used instead.
- My OS is Windows 7 Home Premium.
- My code does not alter the caption icon in any way.
- The icon sizes in the .ico file are 256x256, 128x128, 48x48, 32x32, 24x24 and 16x16 all of which are in 32-bit colour.
Until about 2 minutes ago, I had assumed that it was the command-line arguments that were causing this problem, but it appears to be the fact that the application is being launched through opening an associated file type with it. The DefaultValue value in the shell/open/command registry key associated with the file type is:
"C:\MyApplication" "%1"
I'm sorry for neglecting to make this clear in the first place.
MrWolfy
|
|
|
|
|
No problem.
You could try once more with Visual Studio, however with the hosting process disabled (there's a checkbox in the project settings somewhere).
MrWolfy wrote: When launched from "cmd.exe", the icon remains
I'm not sure but I think that is normal.
Best would be for you, or somebody else, to try some console app on another Windows version. It could just be the way things are...
|
|
|
|
|
Hi!
I think you're probably right, this 'problem' is most likely just the way Windows works with console applications launched by file association. Thanks anyway for the helpful and swift responses!
Message marked as solved.
MrWolfy
|
|
|
|
|
You're welcome.
|
|
|
|
|
I am working on a program that accesses two different databases. One of them has only one table and I am not having any problems with access/working it. The second database has three tables in it that I need access to and this is where the problems arise.
I have no problem reading the tables. I can navigate the records and even delete them without issues. However when I try to update a record, or add a record to the database I get the following error messages:
When trying to edit/update a record:
System.Data.OleDb.OleDbException was unhandled
ErrorCode=-2147217900
Message=Syntax error in UPDATE statement.
When trying to add a record:
System.Data.OleDb.OleDbException was unhandled
ErrorCode=-2147217900
Message=Syntax error in INSERT INTO statement.
I have looked over the code time and time again and I can't find anything wrong with it. It is identical to the code that I currently have working with the single table database. Below is one of the code blocks that I am having issues with:
Private Sub btnCommitSignin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCommitSignin.Click
Dim SignCB As New OleDb.OleDbCommandBuilder(SignDataAdapter)
Dim SignNewRecord As DataRow
SignNewRecord = SignDataSet.Tables("SignIn").NewRow()
SignNewRecord.Item(2) = cmbpatronsignin.Text
SignNewRecord.Item(1) = txtDateSignin.Text
SignNewRecord.Item(3) = txtTimeIn.Text
SignNewRecord.Item(4) = txtTimeOut.Text
SignDataSet.Tables("SignIn").Rows.Add(SignNewRecord)
SignDataAdapter.Update(SignDataSet, "SignIn")
MsgBox("New sign-in registered.")
SignMaxRows = SignMaxRows + 1
SignInc = 0
NavigateSignInRecords()
cmbpatronsignin.Visible = False
txtDateSignin.Visible = False
txtTimeIn.Visible = False
txtTimeOut.Visible = False
btnAddSignIn.Visible = True
btnEditSignin.Visible = True
btnDeleteSignin.Visible = True
btnCommitSignin.Visible = False
btnApproveSignin.Visible = False
btnCancelSignIn.Visible = False
End Sub
The program always crashes at the line:
SignDataAdapter.Update(SignDataSet, "SignIn")
If I comment it out and rerun the program, the dataset updates without any problems so I know that it has to do with the update command.
What could be some of the issues that I am having? What are the solutions to them?
|
|
|
|
|
The error explains it pretty obviously. The SQL statement you have for INSERT is screwed up somehow. Since you didn't provide that code, there's no way to tell you what's wrong with it.
|
|
|
|
|
You have not given us enough information to see the problem. Have a look at this[^] and make sure you are following the rules.
|
|
|
|
|
i want to vb two resourse
|
|
|
|
|
What?
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
See here[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
Yeah? People in Hell want ice water.
What are you talking about??
|
|
|
|
|
in a particular color?
|
|
|
|
|
Toasted!
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.”
|
|
|
|
|
that is no specification, I can toast things to most any color you like, especially dark black.
|
|
|
|
|
I always wondered that about toasters, they have a setting on the side that allows you to choose how much you want to toast something.
But 6 of the settings burn the toast and 2 of them don't toast it at all.
So why bother?
Can they not just make a toaster that Toasts?
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[
|
|
|
|
|
you obviously lack the Fingerspitzengefühl it takes to set the control right.
Basically the problem is the control system: rather than setting power and duration in advance (and hope for the best), they should use a sensor and a feedback control system. However that would make the equipment slightly more expensive, and offer more customer satisfaction, two characteristics that work against the business proper.
|
|
|
|