|
I hope this is usefull.
Private Function Search(ByVal _Listbox As ListBox, ByVal SearchText As String)
Dim i As Integer</code>
' Loop thru all the items
<code>For i = 0 To _Listbox.Items.Count - 1</code>
' Use the basic string contains function and compare the two strings
<code>If _Listbox.Items.Item(i).ToString().Contains(SearchText) Then</code>
'in the if statement u can have multible out puts
' _ArrayList.Add(_Listbox.Items.Item(i).ToString())
'TIP: Remenber to check for duplicates at this stage.
<code>Return _Listbox.Items.Item(i).ToString()
End If
Next</code>
' Return _ArrayList
<code> Return Nothing
End Function
Very simple, but it Works.... sometimes;P
|
|
|
|
|
not working buth thanks...
|
|
|
|
|
Devenv.exe gets corrupted often results in the Eroor in Design page.
How to solve this?
Rekha
|
|
|
|
|
This is probably not the case, it's probably caused by your code. VS2005 crashes pretty easily in the designer, and it's by design ( pardon the pun )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Open the source code for the form or whatever is being designed and fix the problem(s) described in the designer error message.
|
|
|
|
|
Hi,
i want to merge 2 cells in excel when i am importing data from datagrid to cells. how can i do that .please send me a reply.
Thanks and Regards
Anu jose
|
|
|
|
|
Can you show an example of the code you are using to export data to excel?
Steve
|
|
|
|
|
Hi,
i am using like this
Dim XlApp As Excel.Application
Dim XlBk As Excel.Workbook
Dim XlSht As Excel.Worksheet
Dim r As Excel.Range
XlApp = CreateObject("Excel.Application")
XlBk = XlApp.Workbooks.Add
XlSht = XlBk.Worksheets(1)
XlApp.Visible = True
XlApp.Cells(1, 2).Font.Name = "Arial"
XlApp.Cells(1,2).Font.Bold = True
XlApp.Cells(1, 2).Font.Size = 9
XlApp.Cells(1, 2).value = "Mode Of Shipment"
r = XlApp.Cells(1, 2)
r.ColumnWidth = "Mode Of Shipment".ToString.Length * 1.5
XlApp.Cells(2, 2).Font.Name = "Arial"
XlApp.Cells(2, 2).Font.Bold = False
XlApp.Cells(2, 2).Font.Size = 9
XlApp.Cells(2, 2).value = DtGenReport.Rows(0)("Item").
if the heading is large i want to merge 2 cells.
Thanks and Rgards
Anu
|
|
|
|
|
|
I don't believe there's something like this built in. Is word order important ? The easiest way I can think to do this is as follows ( sorry, in C#, you'll need to convert it, I removed the semicolons )
string [] sr = str.Split(" ")
List<string> l = new List<string>()
foreach (string s in sr)
{
if (!l.Contains(s)) - This is something like if Not l.Contains(s) then in VB.
{
l.Add(s);
}
}
So, you turn the string into an array, you can add them to the array so long as they are not already there. An iterator to do this would be a sensible approach, it's probably a little more code, but it would be a nice solution.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi
try this
Dim strAll As String = "hi man, say hi to all"
Dim strWord As String = "hi"
Dim intFirstIndex As Integer = strAll.IndexOf(strWord) + strWord.Length
Dim strNew As String = strAll.Substring(0, strAll.IndexOf(strWord) + strWord.Length)
Dim strRest As String = strAll.Substring(intFirstIndex)
strRest = strRest.Replace(strWord, "")
strNew &= strRest 'strNew="hi man, say to all"
Tamimi - Code
|
|
|
|
|
sorry, how does this help ? This works fine, if you know before hand that only one word is repeated, and which word it is.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi
that sis true, thank you for correcting me .
we can replace this
Dim strWord As String = "hi" with Dim strWord As String = textbox1.text
to work around that this code is only for one repeated word.
Tamimi - Code
|
|
|
|
|
It's really cool that you're trying to help, but the OP asked for a way to find ALL duplicate words, not to have to specify them.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I am a novice programmer, trying to develop a small Excel based application using VBA.
I am trying to trap the event when a shape is added to a worksheet, so that I can execute some associated code - can anyone point me in the right direction?
Thanks
|
|
|
|
|
how to create datalinklibraries in vb.net
|
|
|
|
|
With code
My answer is as in depth as your question. If you have absolutely no idea how to do something this high level, google is a better place to start.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
What do you mean by "datalinklibraries"?
If you mean dynamic link libraries, there is a lot of information available, if you would just bother to look for it[^].
The questions that you have been asking in the message boards have been answered many times before, and there is plenty of information avialable. The best source for those answers is not a message board, but searching the existing information.
You are of course welcome to ask any question you like in the message boards, but unless you ask more specific questions, you will only get directed to google over and over again.
---
b { font-weight: normal; }
|
|
|
|
|
how to create datalinklibraries in vb.net
|
|
|
|
|
That depends on what your definition of a "datalinklibrary" is? I assume your talking about a Data Layer for a n-tier application?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
how to create delegates in vb.net
|
|
|
|
|
If you're incapable of finding the answer to this question online, or in your books, then you really have no excuse to be using a computer. If you haven't bothered to look, then you need to realise these forums are a resource best used by people who are capable of doing some research. If you can't type 'VB.NET delegate' into google, what are the odds you can even understand any explanation I may offer you ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Sir,
I want to learn NTFS file Extentions I mean how to make programs and before that what are NTFS File Extentions .
Can u please help.
Thanks
|
|
|
|
|
A file extension is just the last part of the filename. Or are you asking about NTFS File SYSTEM extensions??
This is not something VB.NET and C# are suitable to write something in. You won't find any examples unless you write them in VC++.
You have to have at least a passing kowledge of NTFS internals just to get started. I suggest reading this[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Can anyone point me in the right direction to adding a checkbox to the ListView results that are generated using ExpTreeLib, what I would like to do is have the directory listing appear in the listview control and have a checkbox next to each entry that will add the path to an array if the checkbox is checked and remove it if it is unchecked.
Any ideas?
|
|
|
|