Implement filebrowser dialog box in form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sekarm
    New Member
    • Mar 2007
    • 26

    Implement filebrowser dialog box in form

    Hi All,
    I came for one more doubt in dotnet windows application(C#. net or vb.net). how to implement Folderbrowserdi alog or Filebrowsedialo g box is appeared in form. All are them done in one button in form, if button is clicked the folderbrowserdi alog or filebrowserdial og will open, i dont want this, the folderbrowserdi alog or filebrowserdial og default loaded in form, i only select in file in filebrowserdial og, i dont want any click event in button to open dialog box.. this is my doubt, is it possible or not. Please give the valuble solution,

    Thanks in advance,
    Sekar.M
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by sekarm
    Hi All,
    I came for one more doubt in dotnet windows application(C#. net or vb.net). how to implement Folderbrowserdi alog or Filebrowsedialo g box is appeared in form. All are them done in one button in form, if button is clicked the folderbrowserdi alog or filebrowserdial og will open, i dont want this, the folderbrowserdi alog or filebrowserdial og default loaded in form, i only select in file in filebrowserdial og, i dont want any click event in button to open dialog box.. this is my doubt, is it possible or not. Please give the valuble solution,

    Thanks in advance,
    Sekar.M
    I dont understand your problem....Plea se be specific and clear...

    Comment

    • sekarm
      New Member
      • Mar 2007
      • 26

      #3
      what the problem is,
      i write the following code in button click event,
      that is

      Code:
      private void button1_Click(object sender, EventArgs e)
              {
                  OpenFileDialog of = new OpenFileDialog();
                  DialogResult dt = of.ShowDialog();
              }
      the show dialog is open, its ok.. what i am asking is the show dialog box is loaded in form window.Any time the user can selects the file, after select the file then click ok,[IMG]The following box is always appear in form.

      Comment

      • dip_developer
        Recognized Expert Contributor
        • Aug 2006
        • 648

        #4
        Originally posted by sekarm
        what the problem is,
        i write the following code in button click event,
        that is

        Code:
        private void button1_Click(object sender, EventArgs e)
                {
                    OpenFileDialog of = new OpenFileDialog();
                    DialogResult dt = of.ShowDialog();
                }
        the show dialog is open, its ok.. what i am asking is the show dialog box is loaded in form window.Any time the user can selects the file, after select the file then click ok,[IMG]The following box is always appear in form.

        Instead of the click event you can put your code in forms Load event...but I dont think you can make a FileDialog box to remain opened in your form always.....

        Comment

        Working...