S
Salil.Khanwalkar
Hi,
When i click on the Close(x) button(upper right corner) , my
application does not exit completely , i have to use the HP Task
Swithcher program in order to close it. Now if i again try to execute
the program my device hangs, and i have to soft reset it.
There is a Form_Ok event in eVB, is it present in c# and .net cf?
I have a HP iPAQ rz 1710.
Here is the code - I am assuming that the Form_Closed() event will be
called when the Close button is clicked.
private void Form1_Load(object sender, System.EventArgs e)
{
openPort();
}
private void Form1_Closed(object sender, System.EventArgs e)
{
closePort();
}
public void openPort() {
try
{
if (port.IsOpen == true)
{
MessageBox.Show("Port already open");
}
else
{
if(port.Open() == true)
{
//MessageBox.Show("Port opened");
}
}
}
catch(CommPortException e) {
MessageBox.Show (e.ToString());
closePort();
}
}
public void closePort() {
if(port.Open()){
port.Close();
port.Dispose();
}
}
When i click on the Close(x) button(upper right corner) , my
application does not exit completely , i have to use the HP Task
Swithcher program in order to close it. Now if i again try to execute
the program my device hangs, and i have to soft reset it.
There is a Form_Ok event in eVB, is it present in c# and .net cf?
I have a HP iPAQ rz 1710.
Here is the code - I am assuming that the Form_Closed() event will be
called when the Close button is clicked.
private void Form1_Load(object sender, System.EventArgs e)
{
openPort();
}
private void Form1_Closed(object sender, System.EventArgs e)
{
closePort();
}
public void openPort() {
try
{
if (port.IsOpen == true)
{
MessageBox.Show("Port already open");
}
else
{
if(port.Open() == true)
{
//MessageBox.Show("Port opened");
}
}
}
catch(CommPortException e) {
MessageBox.Show (e.ToString());
closePort();
}
}
public void closePort() {
if(port.Open()){
port.Close();
port.Dispose();
}
}