|
Hi, I already test your code and now I could get the row number that I select from the list view. But now I need you help on how to get the item of the select row? For example the 2nd row of my list that I select contain the followin form:
Name Sex
Janny Female
John Male (This is the row that I selected)
I could i get the value from the first column and the second column when I select the specific row? Please give me a sample code.
|
|
|
|
|
I'm not sure about this but I think the following will work in your example:
Integer = myListView.SelectedIndices
myListView.Items(Integer).Text 'gets the first column text
myListView.Items(Integer).SubItems(ColumnIndex).Text 'gets the column specified by ColumnIndex
Change 'ColumnIndex' to represent the subitem column whose text value you want to retrieve.
Steve
|
|
|
|
|
Thank you steve, I will try to use this code and let you know if I have any problem with it.
|
|
|
|
|
Hi all,
i have a problem here, can anyone please guide me more?
I want to click on a title which will link itself to open a pop up window that shows a checklist of things. How can i go about writing the codes to make a window pop up with all the contents i want inside?
Thanks in advance for taking up your time.
frossie
|
|
|
|
|
Just create the popup form and put your contents(such as checkbox, etc).
Remember your new form's name. Example: frmPopup
In Designtime.. doubleclik the title you to assign as triger to popup your content form.
in Click procedure just add a single code:
frmPopup.Show ()
Thats all..
|
|
|
|
|
Hello, I am trying to list all the URLs from a RichTextBox containing source code from a web page. They need to be stored in an SQL or Access database.
I am using Visual Basic.NET and i need some help, please.
Thanks
Aaron
|
|
|
|
|
Easiest way would be to cut/paste them yourself...
You want to create a function that strips URL's from web page source code?
Are you sure that is legal/ethical?
Steve
|
|
|
|
|
I don't know Steve, but I'm trying to write a search engine and need a program to index hyperlinks into a database, Google did it.
I would much appreciate any help though, thanks.
Aaron
|
|
|
|
|
Ok. You may want to have a look at the Split function using 'space' as the delimiter.
You could put each word into an Array or ArrayList.
Loop the Array/ArrayList and look for words beginning 'http' or containing 'www' using the InStr function or something similar.
Steve
|
|
|
|
|
OK, I will give it a go. Thanks;)
Aaron
|
|
|
|
|
You may want to find the first instance of a URL before assigning anything to your array. Just to keep the array size down.
You will probably need to use an ArrayList since it's capacity will increase dynamically and you don't know what the size will be.
You should probably strip as much out as you can before populating your ArrayList.
Steve
|
|
|
|
|
Sorry if I'm being a bit annoying but, I was just wondering if it would be easier to use RichTextBox1.DetectURLs, because I have no idea on how to use the ArrayList, I'm not the best at VB.NET in the world
But I'm trying. Thanks though
Aaron
|
|
|
|
|
Nice idea but I'm afraid that is a property not a method.
Its purpose is to automatically format a Uniform Resource Locator (URL) when it is typed into the control.
Steve
|
|
|
|
|
I think I will try again with your idea, thanks;)
Aaron
|
|
|
|
|
Look up the Split function in your help file. You will see an example of how to split a string into an Array or ArrayList.
Get the data from the textbox into a string (strip out unwanted text at beginning). Then split it into an array. Loop each item in the array to see if it contains 'www', if it does, add it to your DataSet or write it to your database.
That would be a start. Then you can play with it to make it more efficient.
Steve
|
|
|
|
|
Thanks, your help is much appreciated, thanks, it looks like you have helped a lot of people to day, Well Done!! Thanks again
Aaron
|
|
|
|
|
You're welcome!
|
|
|
|
|
Hi,
I want to change the color of the Tab pages on form load. I want the Tab pages of the Tab control to have the same color as the tab control.Please tell me how can i give color to the Tab pages.There is nothing in the properties of the Tab control.
Urgent help is required.
Thanks
Riz
|
|
|
|
|
The Tab control properties relate to the whole control that hosts the tab pages. You can set the BackColor property for this.
To set color of individual Tab pages, you can select it in the designer and change its BackColor property. Alternatively, you can click the ellipsis (...) button to show the tab page collection editor and set the BackColor property for each page there.
In code, you need to set the TabPage.BackColor property.
Steve
|
|
|
|
|
There's no property for what you want to do. You'll have to draw the Tab Control (not the Tab Pages) yourself. You'll need to inherit from TabControl and supply your own painting code in the Paint event. Unless you have experience in creating your own controls, this could prove to be a frustrating experience for you.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave says there is no property for this.
I'm not sure if I understand you correctly. In Visual Studio 2003.NET i have properties for the tab page BackColor that I can set.
Are you using something different or am I misunderstanding your question?
Do you mena that you want to change the tabs themselves, not their page (control area)?
If you really can't do what you want, I suppose you could place a Panel control on your tab pages and set the color of that...
Steve
|
|
|
|
|
i need connection string for file excel 2003
thanks for help
MD_NADA
|
|
|
|
|
What do you need to do with this file?
Steve
|
|
|
|
|
i need to select , insert and delete
MD_NADA
|
|
|
|
|