I am trying to access data from list view using columnheader name but I get errors
LVProduct.FocusedItem.SubItems("Name").Text
So, how do you use the function with string parameters? I don't want to use index it is too confusing
...
I have a gridview which in one column is displaying MAC addresses. Instead of displaying them in one row, its putting them in a column as wide as the "MAC" header column. If I remove the "-"'s, then it extends the column width and displays it as one row. Is there any way to have this happen with the "-"'s included?
Field in question loo...
Very easy today, I think. In C#, its:
Dictionary<String, String> dict = new Dictionary<string, string>() { { "", "" } };
But in vb, the following doesn't work.
Public dict As Dictionary(Of String, String) = New Dictionary(Of String, String) (("",""))
I'm pretty sure there's a way to add them at declaration, but I'm not sure how. ...
I have a function that works perfectly when I attempt to add a user from the same domain into a group of the same domain.
Function AddUserToGroup(ByVal strUserDN As String, ByVal strGroupDN As String, ByVal strGRPDC As String, ByVal strUserDC As String) As Boolean
Dim oUser As DirectoryEntry
Dim oGroup As DirectoryEntry
Dim ...
Is there a way to use the Select Case statment in VB.net for beginswith? Or do i have to use a long elseif? Example:
If text.StartsWith("/go") then
elseif test.StartsWith("/stop")
elseif test.StartsWith("/continue")
End If
But instead something like:
Select Case text
Case text.StartsWith("/go")
Case text.StartsWith("/stop")
Case text...
I've just started to learn VB.Net and SQL. Now I'm creating my first software but I have a problem: I have two tables in my database and I managed to transfer data from table1 to table2. How can I just insert specific rows from table1 to table2. I don't want to copy all the data in table1 to table2; I just want to copy the selected rows....
I have seen others with a similar issue but not quite what I was looking for. In the backgrounderworker class dowork event I create an instance of a new class and call one of it's function. Previously, I had this code in a windows.form.timer tick event and would pass a delegate in as one of the parameters which would allow the function...
I am delimiting my data with the "//" as I am passing it up to my webservice. My webservice is splitting the data into an array like so:
myArray = al(i).ToString.Split("//")
Everything works great, however, if I pass in some data like this: 100/100 then that also gets split. Is there a way to make sure that only the "//" gets split?...
I have a vb.net app using plain old ado.net to run a s'proc on the database server. The proc simply inserts a record that contains binary data.
When this executes, I can see the exec call on the proc being made from within sql profiler.
ado.net claims everything worked, no errors. However, a record isn't inserted. There are no key c...
I have radio button list in a gridview that needs to be bound to a column. If the value in a column is 0, the first radio button is selected, if 1, the other is selected.
This is the code, some of it is partially removed because it is not necessary
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<>"
SelectC...
Hello everyone,
I found this source code which is an application that will return a command prompt result with the given command. However, the string of the result is not being correctly outputed sometimes. You guys can try for yourself: Download Here
In the application, there is a "while" loop going on which looks at the StandardOutpu...
On my form I have one button (button1). When I click this button it starts my app. My app is meant to loop forever. Is there a way for my app to click button1 on the 20th loop?
Here is an example of my app:
**Click button1**
webbrowser.navigate("")
looping:
'some code
'some code
goto looping:
...
I recently came across a problem with My.Computer.FileSystem.DeleteDirectory(). It will not delete read only files.
I found out by Googling that I could delete the read only files by changing the file attributes to 'Normal'. So I wrote a recursive function, as below.
Private Sub DeleteDir(ByVal dir As DirectoryInfo)
For Each d In ...
Something just occurred to me earlier today that has got me scratching my head.
Any variable of type Nullable<T> can be assigned to null. For instance:
int? i = null;
At first I couldn't see how this would be possible without somehow defining an implicit conversion from object to Nullable<T>:
public static implicit operator Nullable...
hello every one,
i m doing a project using vb .net visual studio2005 . i need to develop a online chat application on my website for customer care supports.
so please can anyone suggest me from where i should start and which technology i should use for this web based application...
please reply me as soon as possible....
thanks & rega...
Hi guys,
Having a really strange issue at the moment with an ASP.NET site I'm currently building.
At the moment, I'm writting the HTML and CSS for a page called Dashboard.aspx. But when I go to view the page in a browser, half the time it throws up this error:
ASPNET: Make sure that the class
defined in this code file matches the...
I want to have a string in the following format
"FAG001 FAG002 FAG003"
and want to split it into
"FAG001"
"FAG002"
"FAG003"
using a regular expression. Unfortunately my knowledge of regular expression synatax is limited to say teh least. I have tried things like
Dim result = Regex.Split(npcCodes, "([A-Z]3[0-9]3)").ToList
withou...
Dear All,
I have a small requirement and that is as follows:
I have opened a file using the "openFileDialog" provision and i have set the filer as (*.txt). Now when the openFileDialog is displayed, only the test files are visible, but the user can also select "All Files" and choose any other file type.
Now what is require is that,...
When trying to validate controls on a windows form I realise the .validated() for each controls fires when the focus is lost. Instead I'd like to validate only when the button is pressed at the bottom, how would I do this?
...
hi,
how to set header color for tabpages in WINFORMS. and also the back color.
In my code..
For j = 0 To dataset4Category(i).Tables.Count - 1
Dim Finder As Integer = Decimal.Floor(((dataset4Category(i).Tables(0).Rows.Count) / 30))
key = dataset4Category(i).DataSetName
name =...