Wrox Programmer Forums
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 1st, 2003, 03:44 PM
Authorized User
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default Open File Dialog Box

Dear USers,

This is the code I have used to create a program which I will eventually let the user pick their own programs and then run them. My problem is still with the Open File Dialog Box, I would like to have a little more control, adn not show the full extnesion, as well at the show then on one line each. The Text1 is a textbox with multiple lines.

Private Sub cmdOpenFileDialog1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOpenFileDialog.Click
        Dim sMsg As String
        If OpenFileDialog1.FileName > "" Then
            Text1.SelectedText = Chr(10) & OpenFileDialog1.FileName & Chr(10)
            sMsg = "you did not choose a file"
        End If

Please help???!!!!
Old July 1st, 2003, 04:57 PM
Authorized User
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts

What I am trying to do is let the user look through some text files, choose the ones he wantes the program to check. After he selects them then they are placed in a Multi-Line text box, but the one I have created stacks the files one directly after the other. How can I have more control of the Dialog box? I would only like to show the file names listed neatly in the textbox.

Thank you
Old July 3rd, 2003, 11:09 AM
Authorized User
Join Date: Jul 2003
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts

I am not sure I follow you 100% but the first thing you might do is is put the user selections in a listbox instead of formatting a multiline text box. As for as the openfiledialog I think you are using it correctly, just look in the help to see how to manipulate other methods and properties to do exactly what you want regarding file extensions etc


Old August 3rd, 2003, 09:44 PM
Registered User
Join Date: Aug 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to weichunglow

In my opinion, the code you use to handle the code is not appropriate. You should return the result to the calling point where your dialog is called. Do you get what i mean?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open dialog box... hooking shikhar_ntd Visual C++ 0 April 13th, 2006 12:25 AM
Call windows' "Open file" dialog box from an swf vicky_barse Flash (all versions) 1 December 30th, 2005 12:47 PM
open file dialog box mh VB.NET 7 April 11th, 2005 10:15 AM
URGENT: automate - OPEN A FILE DIALOG BOX,SELECT chichi120976 Excel VBA 1 December 13th, 2003 05:22 PM
Open File Dialog Box KennethMungwira VB.NET 2 June 27th, 2003 04:36 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.