473,396 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

A part of ListBox.Add's text as bold

1
Here is the lines of code that I only need txtFind.Text's text as bold at the last part of ListBox1.Add(........)
How do I make it?

Expand|Select|Wrap|Line Numbers
  1.     Private Sub btnFindAndBring_Click(sender As Object, e As EventArgs) Handles btnFindAndBring.Click
  2.         Dim folderName As String
  3.         Dim ifileAmount As Integer
  4.         If FolderBrowserDialog1.
  5. ShowDialog() <> Windows.Forms.DialogResult.Cancel Then
  6.             folderName = FolderBrowserDialog1.SelectedPath
  7.             lblFolder.Text = folderName
  8.             Dim valueOfStringToFind = My.Computer.FileSystem.FindInFiles(folderName, txtFind.Text, True, FileIO.SearchOption.SearchAllSubDirectories)
  9.             For Each files In valueOfStringToFind
  10.                 ListBox1.Items.Add(files)
  11.             Next
  12.             ifileAmount = ListBox1.Items.Count
  13.             'txtFind.Font = New Font(txtFind.Font, FontStyle.Bold)   'This comment does not work to make bold in a part of string
  14.             ListBox1.Items.Add("- - - -" & "Result of " & txtFind.Text & " has " & ifileAmount & " file(s)" & "- - - -")
  15.         Else
  16.             FolderBrowserDialog1.Dispose()
  17.         End If
  18.     End Sub
Jan 15 '13 #1
0 1436

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Caroline | last post by:
Rather than opening a new window, how can I add a text (or HTML code) in the same HTML page, in a specific location? The code I tried is the following: <head> <script language="JavaScript">...
2
by: Manuel Reimer | last post by:
Hello, I want to add some text in front of an object. I want to use the ":before" tag for that. I've tried to do this like the following: object, embed + *:before { content:"test";...
7
by: Eddy Scheire | last post by:
Hi all, I've got this listbox and this text field on an ASP page. Now I want the item I click on in the listbox to appear in the text field and I can't find the code nowhere for what seems to me...
14
by: Stefan Mueller | last post by:
With the following code I can add a new row to an existing table. That really works great. Many thanks to all who helped me so far. But my problem is that the added cells do somehow not have the...
3
by: desmcc | last post by:
I know how to programatically add a text field to a web page. What I don't know is how to adjust the position of any controls below the one I am adding. (The page layout is grid layout). There...
0
by: jim4u | last post by:
Hi gurus, I have an automation add-in created using C# for Excel, in which I am exposing a number of functions. Is there any way I can add help-text the way excel does for other categories like...
2
by: Dixie | last post by:
CurrentDb.Execute ("ALTER TABLE tblMyTable ADD MyNewField Text 25") The above line does not pick up the 25 size, but instead makes it 255. What am I doing wrong? dixie
1
nirmalsingh
by: nirmalsingh | last post by:
how to add two text box values?refer my code below. it is concatinating instead of adding. my code is <html> <head> <script language="javascript"> function addone() {...
5
by: usa51 | last post by:
Hi, I have a dropdown options value from 2 to 5. After I change the selection, in the same asp page, I also have a button "Add", how do I dynamically add 3 text fields if I select value 3 and then...
6
by: kimiraikkonen | last post by:
Hi, I can read from a text file and insert text file's contents into a listbox whose format is line by line using this code: Dim reader As String reader = My.Computer.FileSystem.ReadAllText("c:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.