Problem with OpenFiledialog - C# CompactFramework
-
I have a Form with an maximized WindowState. When I open the Openfiledialog and select a File, wich i want to open in my program, the windowstate is no mor maxamized, but when i request the windostate from the system, it seems to be maxamized. using (OpenFileDialog myOpenFileDialog = new OpenFileDialog()) { myOpenFileDialog.InitialDirectory = "\\Storage Card\\"; myOpenFileDialog.Filter = "xml files (*.xml)|*.xml"; myOpenFileDialog.FilterIndex = 1; DialogResult result = myOpenFileDialog.ShowDialog(); if (result == DialogResult.OK) { xmlPath = myOpenFileDialog.FileName; if (activeProject != null) activeProject.CreateAndOpenEmptyProject(); activeProject = TModelProject.getInstance(); //InitApplDate(xmlPath); activeProject.open(xmlPath); if (activeProject.xmlDoc == null) { MessageBox.Show("Error"); } Cursor.Current = Cursors.WaitCursor; VMain.SuspendLayout(); activeProject.Load(); activeProject.LoadAll(); vTreeView1.InitView(activeProject); Cursor.Current = Cursors.Default; } } Can anybody help me? Thx
-
I have a Form with an maximized WindowState. When I open the Openfiledialog and select a File, wich i want to open in my program, the windowstate is no mor maxamized, but when i request the windostate from the system, it seems to be maxamized. using (OpenFileDialog myOpenFileDialog = new OpenFileDialog()) { myOpenFileDialog.InitialDirectory = "\\Storage Card\\"; myOpenFileDialog.Filter = "xml files (*.xml)|*.xml"; myOpenFileDialog.FilterIndex = 1; DialogResult result = myOpenFileDialog.ShowDialog(); if (result == DialogResult.OK) { xmlPath = myOpenFileDialog.FileName; if (activeProject != null) activeProject.CreateAndOpenEmptyProject(); activeProject = TModelProject.getInstance(); //InitApplDate(xmlPath); activeProject.open(xmlPath); if (activeProject.xmlDoc == null) { MessageBox.Show("Error"); } Cursor.Current = Cursors.WaitCursor; VMain.SuspendLayout(); activeProject.Load(); activeProject.LoadAll(); vTreeView1.InitView(activeProject); Cursor.Current = Cursors.Default; } } Can anybody help me? Thx