Filedialogbox control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • polrajuv
    New Member
    • Aug 2006
    • 2

    Filedialogbox control

    hi, pls sample code for filedialogbox control
  • godsent
    New Member
    • Aug 2006
    • 33

    #2
    right click in ur toobar ( where u drag n drop d items), thenn add items, n look for filedialog control

    Comment

    • joedeene
      Contributor
      • Jul 2008
      • 579

      #3
      or through code(in vb) you could just dim it

      Code:
      Dim mynewopenfiledialog As New OpenFileDialog
              With mynewopenfiledialog
      
                  .Title = "Your Title"
                  .Filter = "Filter Whatever extensions you want"
                  .InitialDirectory = "Where to defaultly show the directory"
                  'at last SHOWWW
                  .ShowDialog()
      
              End With
              'code to use selected file

      Comment

      • cnixuser
        New Member
        • Dec 2006
        • 80

        #4
        Originally posted by joedeene
        or through code(in vb) you could just dim it

        Code:
        Dim mynewopenfiledialog As New OpenFileDialog
                With mynewopenfiledialog
        
                    .Title = "Your Title"
                    .Filter = "Filter Whatever extensions you want"
                    .InitialDirectory = "Where to defaultly show the directory"
                    'at last SHOWWW
                    .ShowDialog()
        
                End With
                'code to use selected file
        C#:
        Code:
                 private void btnBrowse_Click(object sender, EventArgs e)
                {
                    openFileDialog.ShowDialog();
                }

        Comment

        • joedeene
          Contributor
          • Jul 2008
          • 579

          #5
          Originally posted by cnixuser
          C#:
          Code:
                   private void btnBrowse_Click(object sender, EventArgs e)
                  {
                      openFileDialog.ShowDialog();
                  }
          why did you put that? i was showing an example of making the openfiledialog through code, all code for at runtime(dynamic ally). that would show the openfiledialog if it were dragged onto the designer ? i wasnt doing that

          Comment

          • cnixuser
            New Member
            • Dec 2006
            • 80

            #6
            Originally posted by joedeene
            why did you put that? i was showing an example of making the openfiledialog through code, all code for at runtime(dynamic ally). that would show the openfiledialog if it were dragged onto the designer ? i wasnt doing that
            I was trying to answer the original posters question, I didn't read yours very thoroughly, sorry.

            Comment

            • joedeene
              Contributor
              • Jul 2008
              • 579

              #7
              Originally posted by cnixuser
              I was trying to answer the original posters question, I didn't read yours very thoroughly, sorry.
              ok, just checking, sorry for getting upset, but you could've click quote or reply up by his name and it would've quoted what he said, rather than quoting my dynamically created answer and then replying to the OP's post.

              Comment

              • Plater
                Recognized Expert Expert
                • Apr 2007
                • 7872

                #8
                This whol thread should have been answered with a canned message telling the OP to read the posting guidelines and to check msdn, search engines and basic tutorials for the answer to that question.

                Comment

                Working...