|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
filtering which files can be openedI have created a program that opens a file and counts words, characters,
sentences, etc. I have not used the open file dialog control found in the VB ..NET 2003 toolbox. I instead have used Open.ShowDialog(). What I want to do is filter the open file so that only text files (*.txt) can be opened. The project I am working with has two projects and one solution. The main project uses Open as the variable for the Open file dialog. the The second project uses Obj.Openfile. Charlie,
Can you show us a little piece of code. Open.ShowDialog confuses me (and probably others as well), it means a form that you have instanced as Open and shows it than. Cor Show quoteHide quote "Charlie Brookhart" <charliebrookhar***@hotmail.com> schreef in bericht news:jOednb5jAO0tcOrZRVn-gg@adelphia.com... >I have created a program that opens a file and counts words, characters, > sentences, etc. I have not used the open file dialog control found in the > VB > .NET 2003 toolbox. I instead have used Open.ShowDialog(). What I want to > do > is filter the open file so that only text files (*.txt) can be opened. > > The project I am working with has two projects and one solution. The main > project uses Open as the variable for the Open file dialog. the The second > project uses Obj.Openfile. > > "Charlie Brookhart" <charliebrookhar***@hotmail.com> schrieb: OpenFileDialog has a 'Filter' property...>I have created a program that opens a file and counts words, characters, > sentences, etc. I have not used the open file dialog control found in the > VB > .NET 2003 toolbox. I instead have used Open.ShowDialog(). What I want to > do > is filter the open file so that only text files (*.txt) can be opened. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Here is the code which is being used to open a file and then process words,
characters, etc. What I want to do is filter the file types so that only text files can be opened. Private Sub btnAnalyzeFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAnalyzeFile.Click Me.txtBoxInput.Clear() Dim Open As New OpenFileDialog Dim Obj As New Unit5ClassLibrary.StringProcessor.StringProcessor Try If Open.ShowDialog() = DialogResult.OK Then Obj.Openfile(Open.FileName) Me.txtBoxCharacters.Text = Obj.characters Me.txtBoxWords.Text = Obj.words Me.txtBoxSentence.Text = Obj.sentences Me.txtBoxParagraph.Text = Obj.paragraphs End If Catch er As Exception MsgBox(er.Message) Finally End Try End Sub Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:e$1XbjXgGHA.3456@TK2MSFTNGP05.phx.gbl... > "Charlie Brookhart" <charliebrookhar***@hotmail.com> schrieb: > >I have created a program that opens a file and counts words, characters, > > sentences, etc. I have not used the open file dialog control found in the > > VB > > .NET 2003 toolbox. I instead have used Open.ShowDialog(). What I want to > > do > > is filter the open file so that only text files (*.txt) can be opened. > > OpenFileDialog has a 'Filter' property... > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/> >
VB.NET events creates a hidden delegate, but how do I access it?
Console app no accessible 'Main' method with an app... CurrencyManager Question current function / sub name ? How to use the httpwebrequest with Cookies in "GET" method Cal Dll was written by VC++ in VB why are there still COM controls in VS.Net 2005? receiving data over socket datagridview cell - get row/column info for updating data- how? Converting IP Address as string to MyIP as IPAddress |
|||||||||||||||||||||||