Really need your help.
I'm trying to list all text file in Application Startup path folder in combobox but cannot...can anyone help?.....In Application Startup Path folder i got more than 3 .txt file. So i want to list out in combobox...please help me..thank you
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim strPath As String = System.IO.Path.GetDirectoryName(Application.ExecutablePath) & "\"
Dim dirInfo As New IO.DirectoryInfo(strPath)
For Each file As FileInfo In dirInfo.GetFiles("*.txt", SearchOption.TopDirectoryOnly)
This might help also. Just change the ListBox to a ComboBox.
Dim myCoolFolder As String = "C:\!vbTemp\" '// your folder.
For Each myCoolFile As String In My.Computer.FileSystem.GetFiles _
(myCoolFolder, FileIO.SearchOption.SearchTopLevelOnly, "*.*")
ListBox1.Items.Add(IO.Path.GetFileName(myCoolFile)) '// add file name with extension.
'// to search subfolders, change "SearchTopLevelOnly" to "SearchAllSubDirectories".
'// to only get a certain file type, change "*.*" to your file type.
'//-- example for .txt files: "*.txt"
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...