Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. Problem with OpenFiledialog - C# CompactFramework

Problem with OpenFiledialog - C# CompactFramework

Scheduled Pinned Locked Moved Mobile
helpcsharpxmlquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sven it
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • S sven it

      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

      S Offline
      S Offline
      sven it
      wrote on last edited by
      #2

      Hello, i just found the mistake. I suspend the mainfrom but i forgot to resume it. If you use this.SuspendLayout(); folowwing you have to use ResumeLayout(); Regards

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups