Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 1st, 2003, 03:44 PM
Authorized User
 
Join Date: Jun 2003
Location: Birmingham, N/a, USA.
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
        OpenFileDialog1.ShowDialog()
        If OpenFileDialog1.FileName > "" Then
            Text1.SelectedText = Chr(10) & OpenFileDialog1.FileName & Chr(10)
        Else
            sMsg = "you did not choose a file"
        End If
*********************

Please help???!!!!
Reply With Quote
  #2 (permalink)  
Old July 1st, 2003, 04:57 PM
Authorized User
 
Join Date: Jun 2003
Location: Birmingham, N/a, USA.
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #3 (permalink)  
Old July 3rd, 2003, 11:09 AM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Tek


Reply With Quote
  #4 (permalink)  
Old August 3rd, 2003, 09:44 PM
Registered User
 
Join Date: Aug 2003
Location: kl, kl, Malaysia.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to weichunglow
Default

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?


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:56 AM.


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