| | |
How do I load a file when a specific combo option is selected
Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Feb 2009
Posts: 11
Reputation:
Solved Threads: 0
I am writing a program and want to have a a file loaded to be written to a specific location on the drive when an option is selected in a combobox. Here is the code that I have:
VB.NET Syntax (Toggle Plain Text)
Private Sub ComboBox5_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox5.SelectedIndexChanged If ComboBox2.Text = "option" Then ComboBox5.Items.Add("File") If ComboBox5.Text = "File" Then loadfile.reasources.ep3() End If End If End Sub End Class
•
•
Join Date: Feb 2009
Posts: 11
Reputation:
Solved Threads: 0
I am writing software to open a .bin file from a computer and write it to an external location (ie. via com1 or usb). To start things off I am just trying to get my program to load in the background a specific .bin file when a combobox option is selected. Then when a submit button is pressed the file is written to the external location. I hope I explained that simply.
•
•
Join Date: May 2008
Posts: 51
Reputation:
Solved Threads: 8
So you want to copy the file. Here is your code. When you choose from combobx the file option, then you should dim the source file path and destination path. When you press submit button, you should just copy the file
VB.NET Syntax (Toggle Plain Text)
Dim FileToCopy As String = "C:\test.bin" Dim NewCopy As String = "D:\NewTest.bin" If System.IO.File.Exists(FileToCopy) = True Then System.IO.File.Copy(FileToCopy, NewCopy) MsgBox("File Copied") End If
![]() |
Similar Threads
- I lack focus... (Java)
Other Threads in the VB.NET Forum
- Previous Thread: Help finding records with birthdays in selected months
- Next Thread: Problem with Picture Box resizing
| Thread Tools | Search this Thread |
.net .net2008 2008 access account advanced application array basic beginner browser button buttons center click code combo cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic excel exists fade filter forms generatetags gridview html images input insert intel internet listview map mobile module monitor msaccess net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem regex remove right-to-left save search searchvb.net select serial settings shutdown socket sqldatbase sqlserver survey temperature textbox timer timespan transparency txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





