Visual Studio 05: How to create a new popup box, and then design the popup box

Hi sorry its me again,

How do i create a popup box

for eg: i click on SETTINGS, it pop out a box which then i can edit the box so that i can set dropdown menu on the box for the relevant settings.

coz the program im doing is a webcam player, i want the user to click on settings where it can choose the type of video and which camera to use...

now i only know how to use the MessageBox.Show("Your Text here") command.




Answer this question

Visual Studio 05: How to create a new popup box, and then design the popup box

  • Socrates Kapetaneas

    you can use a form for this purpose and show the form as ShowDialog(). It will show the form as a dialog box.

  • Dinh Quang Son

    You can Right-click your project in the Solution Explorer and then select Add->New Item...->select Windows Form in the listbox and click the Ok button. Now you have a new Form in your porject. Edit the new form for your dialog, and then in the event of which you want to show this dialog to the user 1)create a new instance of the dialog form and 2) show the dialog by using ShowDialog() method.

    Hope this could be useful. :)



  • Dato0011

    Thanks..

    The problem is how do i start designing a new form where i am already in a solution/project which have the previous form in it.

    If i start a new form, it wills tart another new solution/project ...

    Im using visual studio 2005


  • Philippe Cand

    do u have any example on this


  • enric vives

    its pretty simple. Just create a new form, design it any way you want, then when the user clicks on settings for example, show the form :

    FrmSettings theSettingsForm = new FrmSettings();

    theSettingsForm.ShowDialog();

    in the settings form, you will of course code to load/save the settings. The ShowDialog() prevents the user from focusing back on the other dialogs that are open in your app until this dialog is closed, it prevents code from behind from continuing to execute until the form is closed as its in a model mode



  • programmer01

    Just dont want to create a new thread

    is it possible to change this code into individual code

    try
    {
    MenuItem m = sender as MenuItem;
    capture.RecFileMode = (DirectX.Capture.Capture.RecFileModeType)m.Index;
    this.txtFilename.Text = this.capture.Filename;
    switch(capture.RecFileMode)
    {
    case DirectX.Capture.Capture.RecFileModeType.Wmv:
    case DirectX.Capture.Capture.RecFileModeType.Wma:
    menuAsfFileFormat.Enabled = true;
    break;
    case DirectX.Capture.Capture.RecFileModeType.Avi:
    menuAsfFileFormat.Enabled = false;
    break;
    default:
    break;
    }

    so that my this.txtFilename.Text = this.capture.Filename; will be changed according to the button i click, let say AVI to .avi WMA to .wma and so on




  • Visual Studio 05: How to create a new popup box, and then design the popup box