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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How to make a dialog box modal? [modified]

How to make a dialog box modal? [modified]

Scheduled Pinned Locked Moved C#
jsonhelptutorialquestion
2 Posts 2 Posters 2 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.
  • T Offline
    T Offline
    TaiZhong
    wrote on last edited by
    #1

    I call the "GetOpenFileName" (Win32 API function) to creates and Open a dialog box. The dialog box is popped up but it is a modeless dialog. What I want is a modal dialog box. Anyone know how to solve this problem? Thanks. -- modified at 5:35 Wednesday 29th August, 2007 I have to customise the OpenFileDialog so that it support the picture preview in the OpenFileDialog box. So I can't use the normal OpenFileDialog class.

    B 1 Reply Last reply
    0
    • T TaiZhong

      I call the "GetOpenFileName" (Win32 API function) to creates and Open a dialog box. The dialog box is popped up but it is a modeless dialog. What I want is a modal dialog box. Anyone know how to solve this problem? Thanks. -- modified at 5:35 Wednesday 29th August, 2007 I have to customise the OpenFileDialog so that it support the picture preview in the OpenFileDialog box. So I can't use the normal OpenFileDialog class.

      B Offline
      B Offline
      Bekjong
      wrote on last edited by
      #2

      Why not use the .net function in stead of the win32 one? You can show it modally like this:

      OpenFileDialog ofd = new OpenFileDialog();
      ofd.ShowDialog();

      Standards are great! Everybody should have one!

      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