I need to check this list sometimes against a file name and sometimes against both a filename and a file date.
I've been doing a for each loop and checking each value, I've tried a hash table keyed on file_name which is much faster, however I also need to check to see if the file_name and File_Date combination exist.
Is it possible to have a list that I can do a quick search on using either the filename or both the filename and filedate.
What I am trying to do is search through a list of file names looking for files with the same File name the following code is run from a button on the form The code seem to work ok up to the Array the line marked with ### is the line that the code stops at run time.
I'm using SQL as a database in VB 2010, I already add a table to my form as a datagrid view but I don't know how to add buttons for filtering, deleting and adding things in my table, for example I want to have one button on my form call it search button to search in table names or Phone Numbers. how can I do that and where shall I write the code?
Im using VB to set default dates and times for the file names when a form is saved through InfoPath, this is what I have so far:
[code...]
This works but i need to format it to this:
ddmmyyy and hhmmss
I need zero's before single characters as if its only a single character then it only displays 1 eg if its 9 in the morning it'll display 9 rather than 09 and i need 09.
I have a listbox populated with dates in the format of dd/mm/yyyy e.g. 12/03/1983, 06/07/1987 etc.. Could someone please post the code that I could use so that I could search the listbox to multi-select the dates that fall within a specific month (not year or day). So for example I might want to highlight all the dates that contain the month **/10/** (october). I'm really struggling with this.
I am used to C like languages such as C#. I added a list box with a list of names. In the code behind I added the below code. When I run the code I am getting the MessageBox but it will state "UserName favorite color is " but does not show the color. I thought it might be misspelled or non-matching names but this is not the issue due to the names being correct.
Public Class Form1
Private Sub lstData_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstData.SelectedIndexChanged
I have a txtSearch.text where I can search names in my Access Database by IDs',[code]My problem is, what if the user will wat to select and display the names of ID 1 to 3, or 1 to 5? if the user will put value of "1 - 3" in the txtSearch.text,how to query that so I can get the Value of IDs 1,2 and 3.
How to make regex match code for vb.net to extract domain names but only related like this url... and get output like this vbcity url...I type vb.net forums and i want to extract it only related vb forums doman names.Here is the picture and this is that what i want to extract only these links under as i type in searchbox and other all links remove that do not related and extract them all from google.[code]
i want to search item A (from a list of X items) in list B but i want to get the item not found example Search ITEM A in LIST B if not found then return a print....if found continue with ITEM B..and so on.
If i had a structure and a list of the structure like this [code]Using Linq, how would i get the total sum of the saleprice from the list but the solddate has to be within 2 given dates.
I am using the following to poulate a list box with the file names in a certain directory...lstImages.DataSource = IO.Directory.GetFiles("C:UsersLBDesktopSTRImagesPumps")This works, and does populate the list box, but it shows the full path on each line...
how to list names from a file, as you enter (spell) the name. eg if you enter 'b' all 'b' names will appear. If you next enter 'e' then all 'be' names will appear. repeating this until the last letters are entered. eg 'bell' will show all names starting with 'bell'. You can then select from the list the correct name?
So in my Textbox I have a list of (folder) names, such as:
Folder1 Folder2 Folder3
I want to compare THAT list to another folder somewhere in someones documents (no specific folder). So let's say we compare it to the 'Arts' folder, which contain these folders inside:
Folder1 Folder2
I want to put all of those folder names in the Art folder into a list. And then I want to compare the folder names in my Textbox to the folder names in the Arts folder, and Folder3 is missing in the Art folder, so I want the textbox to contain:
Folder3
...to tell you that you are missing Folder 3 in your Art folder.
I am using VB.NET in VS 2008 Professional. I wish to have my user select the server where the SQL Database resides. I can get a list of the SQL databases, but I am stuck on how to display the servers currently available to the user? I want to add the list of servers available into a list box and have them select the server.
The thing I am trying to duplicate is the drop down list of server names when you are doing an Add Connection from the Data Connections node of the Server Explorer.
I am trying to find out if an instance of an application (not vb.net) is already running - because I will want to start it but I don't want to start it if it is already running. I have found a solution to check if a process is running:
Dim proc As Integer = Process.GetProcessesByName(ProcessName).GetUpperBound(0) + 1
and return True if >=1 (or just the process number). My problem is, this is a third-party application, and its process name is not just a name but it contains a version number (which I may not know at run time), and it also seems to add a *32 (so probably a *64 if it is installed in x64 ?).
I need to get a list of running processes, by name, and test if "processname" is a substring of the name. But I haven't been successful in getting a list of names, only process id's.
I have a table in a Access Database that I'm loading into a VB.NET program and I want a way to get the name of each of the columns into a list of Strings. Googling has shown that this is much easier with a SQL database, but that doing so in Access is much more difficult. I came across this question Is there a query that will return all of the column names in a Microsoft Access table? Which gives a way to do it, but when I try the code it just populates my list with a bunch of "System.Collections.Generic.List'1[System.String]"
This is my adapted code. Public Function GetColumns(ByRef database As String, ByRef table_name As String, ByRef columns As List(Of String)) As Integer Dim com As OleDbConnection Try com = New OleDbConnection(database) com.Open() [Code] ..... My for each loop isn't printing the right string. Should be Console.WriteLine(holding)
I want to populate my combobox with the list of banknames available in my database.. I tried doing so but I am getting a blank list. i.e.. shows no value in combobox!
Here is what I tried... Private Sub ComboBox4_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox4.SelectedIndexChanged Try 'MsgBox("Open") cn = New OleDbConnection("Provider=microsoft.jet.oledb.4.0;Data Source=E:\Project-Hemtech\HemDatabase1.mdb;") [Code] .....
I have the need in my program to get the list of user logon names in a group. This is what I have so far but it only returns all the users...which I need cut down to those in a group, of which i have the name of.
Option Explicit On Imports System.DirectoryServices Imports System.DirectoryServices.ActiveDirectory
How can i add an array on names in a list box And be able to add and delet name in a listbox ps sence i just fond out .net cant mke control array ill use listbox with an array of names in it
I am trying to get the list of all the SQL Server names. Using the below code I got the name, but actually my server name is OWNER8SQLEXPRESS and I am getting only OWNER8. How I will get the full name.
vb.net Private Sub frmGetServerName_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim dT As DataTable = Sql.SqlDataSourceEnumerator.Instance.GetDataSources() DataGridView1.DataSource = dT End Sub
I have a winform that has one combobox. I want to populate that it with a list of folders in a directory. I thought this might be a common thing but I have not found any thing concerning this.For this example lets say the root folder is C:TestingFolder ListIn the folder "Folder List" directory there are 5 folders as such:
I have a WinForms applciation, I wrote a function that returns a list of all the controls on the form. The function returns a list of control objects.My target is to fill up a combo box with a list of the control names so that once clicked I set focus to it.So what is the correct code for converting a List(Of Control) to an array of string.
I have one application create tables in database dynamically during run. Another application need to find all these tables' name in the database. how should in do in vb.net
How would i read a set of names out of a file and then append them to a list box?I am not guaranteed a pair will be on the same line, and not guaranteed that a line would contain a maximum of one pair(i.e., it might have three pairs or it might have one and a half pairs - a first name, last name, and another first name whose matching last name would be on the next line). A line may also be blank.All of this needs to be in a visual basic format.