I read your article .NET - Diving into System Programming.It is really intresting.You had mention some links in order to gain the Intial knowledge of System found all three of the articles to be very informative. I am working on a little project that requires listing all the drivers for a certain device (much like the device manager in windows does) but I have been unable to accomplish it. Can you point me to a resource that explains this or give a brief explanation of how you could do it ? You mentioned Some of msdn but it does not work
Using Device Installation Functions
I have 2 buttons start and stop. Start will enable the timer and stop will disable the timer.
The problem was that the PDA would continuely vibrate. So I put it in the timer event and set the interval for 2 seconds. Then in the timer event I sleep for 1 second. This will vibrate it for 1 second then switch it off and do this every 2 seconds.
The problem now is, that the UI will freeze during the pause of 1 second.
I solved the problem using the code below and setting the boolean flag in the timer tick event. However, as the timer is enabled in a thread that is not the UI thread, when I set the timer to enabled to true, the timer doesn't start. I was thinking of invoking the timer. However, the timer doesn't have that property.
//Timer to oscillate the vibration in the PDA for an incoming call alert.<br />
//Timer is disabled when the user answers the call.<br />
static Boolean ledStatus = true; //Status of when to turn on and off the vibration<br />
private void tmrVibrate_Tick(object sender, EventArgs e)<br />
if (ledStatus == true)<br />
vibrateAlert.SetLedStatus(1, Led.LedState.On);<br />
ledStatus = false;<br />
vibrateAlert.SetLedStatus(1, Led.LedState.Off);<br />
ledStatus = true;<br />
I do have a problem:
I insert a picture in an application and try to fetch it again with my tool. the strange thing is although i insert 300x300 dpi pics when fetching they are 299x299 dpi.
after fetching they should be converted to a pdf, but it doesn't accept the 299x299 dpi, but it works fine with 300x300 dpi. (it throws an error it can't handle the format because it is unknown)
is there a chance to check this and to correct it to 300 dpi?
to change it to 300 dpi hardcoded isn't a good idea because there could be 600x600 dpi pics as well etc.
By setting a 10 second timer and then changing a flag or something. What are you aborting ? I assume a thread.
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
How should I abort a running procedure if it takes longer than 10 seconds?
Since this is in the C# forum I'm guessing you actually mean method rather than procedure. If you do mean procedure (as in a stored procedure) then you should proceed to the SQL Server forum and ask there.
You can run the method in another thread and WaitFor it to return. When you WaitFor it you can set a time out.