|
Thanks for your advice.
But how can i keep the timer thread running even it is suspend or stopped, just like the system clock ?
|
|
|
|
|
The system time depends on a hardware component that is built into the motherboard. As you know it works even when the computer is off (even unplugged).
However you cannot run anything when the computer is off. If you are tracking elapsed time you should record the starting and ending times and take the difference.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
You can't. That's what "Suspend" means: everything is stoppped.
|
|
|
|
|
The you save the timestamp on a regular basis (say every 15 seconds) and use that when the sustem is un-suspended. That's as close as you can come. If the OS is suspended, message loops are not executed and there is no way (even using hardware interups) to run anything.
|
|
|
|
|
Does anyone know how to retrieve the return value of a SQL2000 stored procedure in C#? I'm using OleDbConnection, OleDbDataReader. The stored proc returns an integer value, and I can't seem to be able to retrieve it. I have named a parameter "retval", Direction = ParameterDirection.ReturnValue, type is SqlDbType.Int.
Any suggestions?
John K
|
|
|
|
|
The parameter with the Direction property set to ParameterDirection.ReturnValue will be set to the value returned by the stored procedure after the command is executed.
OleDbCommand command = new OleDbCommand(sql, connection);
OleDbParameter retval = command.Parameters.Add("ReturnValue", OleDbType.Integer);
retval.Direction = ParameterDirection.ReturnValue;
command.ExecuteNonQuery();
int returnValue = (int)retval.Value;
Charlie
if(!curlies){ return; }
|
|
|
|
|
were would i find them or how would i play the note 'a' from the computer are there pre-recorded things, how would i do this?
IM PROUD TO BE A GMAIL;
|
|
|
|
|
It seems like your second or third time asking this question and you still didn't get an answer. I did a 10 second google search and found the perfect solution for you:
http://www.codeproject.com/cs/media/MIDIToolkit.asp[^]
What you want to do is play notes. In Windows the easiest way to do this is MIDI. The above link seems like a highly rated MIDI toolkit. I hope you figure it out
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
Hi,
I want to receive mail from my mailserver in c#. Could any one pls help with code.
Thanks,
Jr
jr
|
|
|
|
|
|
Hi there,
I'm trying to find a free NET excel spreadsheet style grid control that works well. Any ideas anyone...It has too be very easy, fast and comfortable to use, specially intended for input of a huge amount of data: easy navigation, extended copy and paste, row/colum reordering, dynamic row and column insert, etc.
Any help appreciated. The closest thing to what I need is a DataGrid MFC control posted in this web:
<url>http://www.codeproject.com/miscctrl/gridctrl.asp
...but I need it to be in Managed code if posible. Dont need source code, .dll would be enough.
P.D. dont need any incorporated databinding, will manage that myself.
|
|
|
|
|
|
|
Its not possible to insert negative sign into double textbox. Maybe anybody knows how to correct double textbox
control ?
|
|
|
|
|
Hello all
Thanks for your help
i check a some thing with if conditian i need it true check another condtion but if false cancel all the next steps
Regards
hay
|
|
|
|
|
Beginner question obviously.
if (<condition>)
{
}
else
{
}
If you need more help please be more specific.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
If it helps you you can use the following block:
bool success = false;
do {
success = DoWork1();
if (!success)
break;
success = DoWork2();
if (!success)
break;
...
success = true;
}while(false);
if (!success)
{
}
The do{...}while(false); is a clean way not to use a goto statement.
Another way is write something like:
bool success = true;
success = success && DoWork1();
success = success && DoWork2();
if (!success)
{
}
Regards,
Ami
|
|
|
|
|
Hi gurus,
Using WMI & C#, is it possible to monitor the CPU and graphic card temperature? If so, how? What is the query? I see that there is a Win32_TemperatureProbe class. Is the start point?
Thanks for the help.
Best regards.
There is no spoon.
|
|
|
|
|
I believe its possible. It depends if your hardware supports it though.
Yes Win32_TemperatureProbe is the correct place to start with. More information can be obtained here: MSDN[^]
If you need further help with something specific please ask.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
In addition to what Alex said, most motherboard manufacturers DON'T supply WMI providers for the chipset probes (temp, fan speed, ...).
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ok, that's why I have 0 item when I query the interafce.
maybe my motherboard does not provide WMI interface.
There is no spoon.
|
|
|
|
|
It's not the motherboard, but the drivers for the motherboard. You might want to check with the manufacturer to see if they offer any WMI Providers.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm attempting to write a "SQL Replication Watcher".
Basically I need to link into SQL somehow and determine 4 things:
1 - Is replication currently enabled
2 - Is replication currently active
3 - Are there changes on my machine waiting to be pushed
4 - Are there changes on the server waiting to be pulled
Assume that the subscriber/publisher relationship is already established and the SQL connection is completely reliable. I'm looking for very basic (ie: easy to follow) information here.
Thanks in advance!
Z - I never met a proof of concept I didn't like.
|
|
|
|
|
You should have posted this question in SQL forum. C# forum is for C# only.
As you might know replication is done through SQL Agent. There are programmatic interfaces available for controlling replication - I believe its an ActiveX lib. Google for it.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
But since I'm writing it in C#, and the SQL forum is going to be primarily people familiar only with SQL (and therefore not C#) this would end up being the appropriate place.
I'll see if I can find anything using the information given. Thanks.
|
|
|
|