O
Ole
Hi,
It seems like there is an error with the openFileDialog because it crashes
the program.
The program is build for Pocket PC 2003 running Compact Framework 2.0
The error can easily be reproduced like this:
Create a new project called "File Dialog test".
Add an additional form "Form2" to the project.
Copy the below code to Form1.cs:
namespace File_Dialog_test
{
public partial class Form1 : Form
{
Form2 newForm= new Form2();
OpenFileDialog openFileDialog1 = new OpenFileDialog();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
fileSelection();
}
private void fileSelection()
{
newForm.ShowDialog();
openFileDialog1.ShowDialog();
}
}
}
Run the program and verify that the program crashes after closing the
Form2 - openfileDialog never shows up???
Any idea what to do instead??
Thanks and Best regards,
Ole
It seems like there is an error with the openFileDialog because it crashes
the program.
The program is build for Pocket PC 2003 running Compact Framework 2.0
The error can easily be reproduced like this:
Create a new project called "File Dialog test".
Add an additional form "Form2" to the project.
Copy the below code to Form1.cs:
namespace File_Dialog_test
{
public partial class Form1 : Form
{
Form2 newForm= new Form2();
OpenFileDialog openFileDialog1 = new OpenFileDialog();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
fileSelection();
}
private void fileSelection()
{
newForm.ShowDialog();
openFileDialog1.ShowDialog();
}
}
}
Run the program and verify that the program crashes after closing the
Form2 - openfileDialog never shows up???
Any idea what to do instead??
Thanks and Best regards,
Ole