|
1. Don't post the same question twice.
Reply to your original post right below.
2. Use a descriptive subject line.
3. Read the post by Chris Maunder, "How to get an answer to your question"[^]
Kristian Sixhoej
|
|
|
|
|
Typically, all processes and services should have a mechanism to be stopped or started as a user selects. Anything else is almost always designed for malicious intent.
|
|
|
|
|
|
Why? When I write a windows service I write it in such a way so that when it is stopped it recovers itself properly when it is restarted. This is the recommended way to write a service. It should be stoppable by the user for very good reasons.
|
|
|
|
|
SendKeys copy, cut, paste etc. does not seem to work. I get a "ding" but it does not perform the intended process.
It all used to work VS2005 and 32-bit 2003 server.
Has anyone else seen this??
tia
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Rafone wrote: I get a "ding"
Define "ding" in the current context.
|
|
|
|
|
Windows Default Ding.wav
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
You got a "ding" because the application that actually got the keystrokes, didn't like the key's being used at that time. The problem with SendKeys is that there is no guarantee that the application you "think" you sent them to was the one that actually got them.
|
|
|
|
|
In my App I am trying to use SendKeys.Send("^X") to cut tree nodes from a treeView. My App has focus.
This works in 32-bit Win XP but not on the 64-bit 2008 server machine.
??
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Rafone wrote: I am trying to use SendKeys.Send("^X") to cut tree nodes from a treeView.
To what end?
|
|
|
|
|
I have been maintaining the app since 2002. This is the way that the code was originally written.
The users have a complete, manageable treeview that is the basis of their user interface.
On the newest machine they have (64-bit 2008 server machine) the cut function is not working in the treeview. I have tracked it down to the sendkeys statement in the code. Same code works on numerous other 32-bit XP and 2000 Pro machines.
I was asking what I thought was a simple question.
Does anyone else using 2008 VS and 64-bit 2008 server have the same problem?
to that end...
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
I have been maintaining the app since 2002. This is the way that the code was originally written.
And this makes the technique you're using perfectly OK ... how?
OK, without knowing what you're using this for, I can only guess. But, why don't you copy the data you need to the clipboard WITHOUT going through the (as you've found out!) unsupportable solution you're using now?
|
|
|
|
|
I have an update code for table written by access 2003 it has 4 coloumns and one of these is id(Automatic numbering)
The problem : when i update the table occurs an error(error in update statment).
The code update is
OleDbCommand com = new OleDbCommand("update attributes set identifier=@identifier , language=@language ,title=@title, description=@description where id=@id ", con);
com.Parameters.Add("@identifier", textBox1.Text);
com.Parameters.Add("@language", (textBox2.Text));
com.Parameters.Add("@title", (textBox3.Text));
com.Parameters.Add("@description", textBox4.Text);
con.Open();
com.ExecuteNonQuery();
con.Close();
|
|
|
|
|
What is the exception? That will tell more about your problem than simply "error in update statement"
only two letters away from being an asset
|
|
|
|
|
Syntax error in UPDATE statement
|
|
|
|
|
That is T-SQL, not what ever varient of SQL that Access uses. Access needs question marks in place of named parameters and the parameters need to be in the same order as the question marks appear in the SQL.
|
|
|
|
|
To add to Colin's post: Also define a parameter for column id and give it a value.
|
|
|
|
|
Somewhere, somehow, a Queue's elements' values are being changed. The thing is, I'm not sure when they're changing. Is there a way to break at the moment a change is happening to an item in the queue?
I'm running this in a single thread, so multi-threading issues are an impossibility.
|
|
|
|
|
What about a conditional breakpoint with the condition set to "Has changed"?
But I'm not sure if it will work for Queue, without random access.
Regards,
Lev
|
|
|
|
|
I thought of that, but I can't guess in advance which item in the queue is getting changed.
|
|
|
|
|
Well, there is a quite awkward way, subclass the queue, add a property that will somehow reflect the inner state of the queue, breakpoint when it changes and checkout the call stack. Maybe it will help.
Regards,
Lev
|
|
|
|
|
Can't you use the "Watch" capability of the debugger?
As I recall, you can set a Watch to break when an expression changes, so just make up an expression that evaluates some member of your Queue, and set it to break when that changes.
|
|
|
|
|
See, the problem is that any item in the queue is being changed and arbitrarily. Its also quite tentative. I've narrowed it down to the method that's causing the change, but I'll be damned if I see what the heck is wrong.
|
|
|
|
|
Perhaps logging might be more helpful in this instance.
Create a log file and write to it every time this method is called.
|
|
|
|
|
That is precisely what I did.
|
|
|
|