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. Creating customized dialog boxes

Creating customized dialog boxes

Scheduled Pinned Locked Moved C#
oophelpquestion
5 Posts 2 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.
  • V Offline
    V Offline
    Vernware
    wrote on last edited by
    #1

    OK, I am really stuck. I have a form with a button. I click the button and I want to display a dialog box. I created the dialog box using the age old inheritance stuff. That is: public class MySpecialDialog : System.Windows.Forms.Form I customize the form to my hearts content. Glory be. How simple can this be? But when I try do instantiate this customized dialog: private WindowsForms.MySpecialDialog aDialog; aDialog = new MySpecialDialog(); and then show the dialog in the button click routine: aDialog.ShowDialog(); I get a form that is just a blank form. Could someone tell me what I am missing here? Thanks in advance, Vern

    E 1 Reply Last reply
    0
    • V Vernware

      OK, I am really stuck. I have a form with a button. I click the button and I want to display a dialog box. I created the dialog box using the age old inheritance stuff. That is: public class MySpecialDialog : System.Windows.Forms.Form I customize the form to my hearts content. Glory be. How simple can this be? But when I try do instantiate this customized dialog: private WindowsForms.MySpecialDialog aDialog; aDialog = new MySpecialDialog(); and then show the dialog in the button click routine: aDialog.ShowDialog(); I get a form that is just a blank form. Could someone tell me what I am missing here? Thanks in advance, Vern

      E Offline
      E Offline
      Ennis Ray Lynch Jr
      wrote on last edited by
      #2

      Is the dialog of type dialog? Also make sure the constructor calls the InitializeComponents method of the WYSIWYG part won't work right. Also ... if(aDialog.ShowDialog() == DialogResult.OK){}... will let you use it.


      File Not Found

      V 1 Reply Last reply
      0
      • E Ennis Ray Lynch Jr

        Is the dialog of type dialog? Also make sure the constructor calls the InitializeComponents method of the WYSIWYG part won't work right. Also ... if(aDialog.ShowDialog() == DialogResult.OK){}... will let you use it.


        File Not Found

        V Offline
        V Offline
        Vernware
        wrote on last edited by
        #3

        Ennis: Thank you very much for your response. Calling InitializeComponenets in the constructor did the trick. I really appreciate your help. Vern

        E 1 Reply Last reply
        0
        • V Vernware

          Ennis: Thank you very much for your response. Calling InitializeComponenets in the constructor did the trick. I really appreciate your help. Vern

          E Offline
          E Offline
          Ennis Ray Lynch Jr
          wrote on last edited by
          #4

          Also, for future reference, the VS Desiner will often drop events on accident. So if your controls ever stop responding to user events check the events list.


          File Not Found

          V 1 Reply Last reply
          0
          • E Ennis Ray Lynch Jr

            Also, for future reference, the VS Desiner will often drop events on accident. So if your controls ever stop responding to user events check the events list.


            File Not Found

            V Offline
            V Offline
            Vernware
            wrote on last edited by
            #5

            I do believe I know what your talking about. I remember working on a project where I know I had an event handler and one day it was just gone. Now I know it was not my imagination. Thanks again.

            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