|
Thank you for your reply.
I tried your suggestion with a little test. So far it worked, i was able to create 2 separate cmd.exe processes and was able to send commands to it any time i wanted. However, the windows of the cmd.exe processes where all open, and got focus if it wrote a command in it. When i tried to hide the windows with this:
this.process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
It didn't work anymore. The problem is here i think that the combination of 'SetForegroundWindow' and'SendKeys' will need an active window - it simulates user input, so it needs an active window which isn't hidden to send keys to it.
Is there some way to hide it? The user must not be able to see the cmd.exe processes, it should all just run in the background.
|
|
|
|
|
i do not anything about state machine. so anyone please briefly discuss in easy way what is state machine? in what kind of situation people think to develop or use any existing state machine. explain with example & scenario. thanks
tbhattacharjee
|
|
|
|
|
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Try it yourself, you may find it is not as difficult as you think!
In this case, a simple Google would find you all the answers: it found me this straight away.
A Simple State Machine[^]
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
I wouldn't bother. It's plain from earlier questions that this member doesn't bother with anything as boring as doing research.
|
|
|
|
|
<pre>
using System;
using System.IO;
using System.Collections;
namespace check
{
static class Program
{
static void Main(string[] args)
{
ulong increment = 2;
for (ulong i = 0; i < 70; i++)
{
increment += i * increment;
Console.WriteLine("{0}",increment);
}
}
}
}
|
|
|
|
|
Use
checked
Like in example bellow:
try
{
z = checked(maxIntValue + 10);
}
catch (System.OverflowException e)
{
Console.WriteLine("CHECKED and CAUGHT: " + e.ToString());
}
checked on msdn
|
|
|
|
|
Where does the "e" comes from. What does "e" mean?
|
|
|
|
|
Look at type
catch (System.OverflowException e)
{ ...
e is my variable name it is short for exception. It is not obligatory to use any name if you wanna catch OverflowException without more information.
|
|
|
|
|
See here: checked (C# Reference)[^]
Or you can enable it for the whole app:
Go to project Properties and find the Build tab.
Click "Advanced" button.
In the resulting dialog, check the “Check for arithmetic overflow/underflow” box, and press OK.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Edit your question and provide better information.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Actually, it's not even a question. Just some words.
Regards,
Rob Philpott.
|
|
|
|
|
It's probably a question to him!
Trouble is he is so close to it (and likely English is not his first language) that he didn't consider that we need more than that. It's all he needs, because he knows what he is doing, and assumes there is only one way to do it, and we know what that is!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
|
A response exactly in proportion with the question
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
|
|
How to make windows form control DPI aware??
|
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Hi
I am doing one project using serialport. I have three forms in one form i receive command 'g' from serial port and display it to text box based on specify time interval. And in another form i want to receive command 'c' from serial port and display it to textbox and also wand to send data from textbox to serialport to update that value through one button click. And in last form i want to receive command 'v' from serialport and display it to textbox and send the data from textbox to serialport through button click. I have no idea to start this code... Please help me.... i am new in using serial port communication....
Thanks in advace
|
|
|
|
|
|
I am unable to get path of file that is in portable device.... please suggest me
|
|
|
|