Changing Color Of The Part Of Label.text?
Dec 4, 2009
How can i change color of just specific part of the label.text in visual basic 2010 express?
Dim b As Integer = 34
label.Text = "You have " & b.ToString & " new items"
for example, i just want to change color of the "b" here.or do i need to create a new label ?
View 1 Replies
ADVERTISEMENT
Apr 19, 2012
Windows forms .net 4.0 vb application. This is a small trivial thing but I was trying to just change the color of one word in label.text. But its not happening and I have a strong feeling that to make it happen is going to be more extensive than its worth... A snippet of what I am trying to use is below...
Dim _changeLabel1 As String = " Note Fields Marked in "
Dim _changeLabel2 As String = " are Required"
Dim _attrib As New Label
[code]....
View 1 Replies
Apr 6, 2012
Imports System.Data.OleDb
Imports System.Data
Imports System.Threading
Imports System.Data.SqlClient
Public Class Form1
[Code]...
i have written a quiz game in this code. i have 12 labels from LabelX1 to LabelX12. here i want their background color white one by one when a user click on the correct answer.how can i do that ?
View 1 Replies
Oct 22, 2009
I've got a program where I want something to happen when the user presses the 'k' key. I want my label to change colour.
vb.net
Private Sub k(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
lbl_letter2.ForeColor = Color.Magenta
End Sub
Doesn't work.
View 12 Replies
Mar 24, 2011
I've got a textbox and a label. In the label, I've got the string "alberto". What I want to do is, I want the charactes I write in the textbox to highlight in the label, so, for example, when I write "al" in the textbox, the first two characters will be highlighted.
So, the real question is: how can i highlight only some characters in the label instead of the whole text?
View 2 Replies
Dec 7, 2009
How can i change to bold a part of the label's text? e.g. "&Hello" will appear as: "Hello"
"Hello John" how can i make it appear as: "Hello John"?
View 4 Replies
Dec 15, 2010
Parser ErrorDescription: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.Parser Error Message:System.Web.UI.WebControls.DataControlFieldCollection must have items of type 'System.Web.UI.WebControls.DataControlField'.'ItemTemplate' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.
Source Error:
Line 66:
Line 67: <asp:TemplateField HeaderText="AS of" & label2.text>
[code]....
View 3 Replies
Aug 11, 2009
I'm using a richtextbox with scrolling and I need help with changing a certain line of text to an different color but when I use forecolor and appendtext it changes all the text in the textbox the same color. What can i do to change certain text lines?
View 3 Replies
Mar 25, 2010
I'm trying to change case(ToProper)and color of predefined strings as the user types them in a richtextbox,I know how to change color as for changing case the code I know works when I use it under a button or menustrip and it changes the whole text while what I need is to change color and case of my strings at the same time as the user types them Here is the code I know
'Changing Case
Dim Properstring As String
Properstring = StrConv(RichTextBox1.Text,VbStrConv.Propercase)
[code]....
View 5 Replies
Feb 15, 2010
Is there a way to specify the color of the text in the tabs of a Tab control ? The text is black but I'd like to change it .
View 1 Replies
Jun 14, 2010
I am wanting to create a simple text editor that will change certain strings of characters to specific colors in two instances when they are being typed or when a file is loaded. Do I need to use a richtext box to do this and what would I need to do to accomplish this.
View 1 Replies
Jul 1, 2011
I'm just starting out looking at asp.net. I've got this code that works in VB, but not in asp.
I've put this in the page_load:
Dim db_con As SqlConnection, ssql As String, db_cmd As SqlCommand, rdr As SqlDataReader
db_con = New SqlConnection("Data Source=myServer;Initial Catalog=processes;User Id=usrID;Password=mypwd;")
[Code]....
why this wouldn't work in asp.net? The issue is that the label is blank. In vb.net as soon as the form is shown, the lable says "It connected".
View 1 Replies
Mar 15, 2010
I have a Vista Glass form using dwmapi.dll. I have a problem, which is whenever I put the form over a white color, the text becomes very difficult to read, as it is white as well. But if I put it over a black or darker color you can read it fine. I want the text color on my form to be able to change when the form is moved over a certain color. No, I'm not trying to make a virus / automater...
View 2 Replies
Feb 23, 2010
Like wise when u change the font the font changes by using fontdialog
[code]...
View 3 Replies
May 13, 2009
This is my source that I created
Private Sub FontToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontToolStripMenuItem.Click
FontDialog1.ShowDialog()
RichTextBox1.Font = FontDialog1.Font
End Sub
Private Sub ColorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ColorToolStripMenuItem.Click
ColorDialog1.ShowDialog()
RichTextBox1.ForeColor = ColorDialog1.Color
End Sub
When I want to change color and font in richtextbox, all of text in textbox is changed. How to make source code that change color and font in text that we highlight.
View 2 Replies
Feb 15, 2012
I want the every text in my label to be different color
example
label text is Visual
the color of V is black and the rest will be red and if I press the key i the letter i will be black.
View 2 Replies
Aug 16, 2011
I have this label inside a repeater <asp:Label id="lblsub" runat=server text="sdds" /> I am trying to change the text of this label,this is the code behind
[Code]...
unfortunately this code doesn't work for me ,the text value doesn't change,
View 2 Replies
Nov 11, 2011
I wanted to have multiple color for text in single label controller e.g.
label1.Text = " $ 480.00 "
What I want is character $ in Red color and other digits or character after $ in color blue.$ 480.00 I cannot use separate labels for digits and $ due to limitation?
View 5 Replies
Dec 9, 2011
my code below, though it didnt work. i want to display text on label if the colors of label on anoda form is orange.correct me where am wrong. or advice better way to do this.
If Main1.Label15.BackColor = Color.Orange Then
Label2.Text = "1" And Label4.Text = "N5,000"
ElseIf Main1.Label14.BackColor = Color.Orange Then
[code].....
View 2 Replies
Feb 20, 2012
[code]What is the right code to change color and format?
View 2 Replies
Nov 11, 2011
I wanted to have multiple color for text in single label controller
e.g.
label1.Text = " $ 480.00 "
What I want is character $ in Red color and other digits or character after $ in color blue.
I cannot have separate labels for digits and $.
View 1 Replies
Nov 11, 2011
I wanted to have multiple color for text in single label controllere.g.
label1.Text = " $ 480.00 "
What I want is character $ in Red color and other digits or character after $ in color blue.
$ 480.00
I cannot use separate labels for digits and $ due to limitation?
View 17 Replies
Nov 11, 2011
I wanted to have multiple color for text in single label controller
e.g.
label1.Text = " $ 480.00 "
What I want is character $ in Red color and other digits or character after $ in color blue. $ 480.00 I cannot use separate labels for digits and $ due to limitation
View 1 Replies
Feb 15, 2012
I have a question of VB event handler and color picker. Now I have a label, and I want when user click it, it pops up a color picker dialog and let user to change the background color of the label. Not sure how to implement this, can anyone give me a direction?
View 2 Replies
Feb 26, 2009
I want to have some labels on a form with the same font color as the caption on my group boxes, and furthermore I want these colors to change if the user has applied a different Theme on their system.
Can I do this without changing the GroupBox caption from its default?[code]...
View 4 Replies
Feb 1, 2011
I'm returning a database query into a List object and using that list object to fill the X and Y axes of my chart as seen below. (_runData is a "List(of DatabaseTableName)" style Object filled with the results of my query.
Primary_Chart.Series(0).Points.DataBindXY(_runData, "DateTime", _runData, "UPPER_PRESSURE")
My Datetime field is returning as a Serial Number (i.e. 40116.76111) so I want to format the X Axis to display the field more readably. Enter my problem code.
[code].....
View 1 Replies
Feb 5, 2010
Im havin a problem changing my picturebox back color to System color "Control".I can set it to color.red , color.blue etc , but not control .
View 6 Replies
Mar 11, 2009
Toolstrip1 has toolstripdropdownbutton1 and some dropdown items are added with this.Now, Iam looking to set the color or marigin part of image dispalyed in toolstripmenuitem.Anyone can show me the details?
View 6 Replies
May 5, 2011
I have question about Label.Text.
When run the code Form1 load together with Form2.On Form2 I have Label1.I need that Label.Text flicker or blinking.
View 5 Replies
Oct 1, 2009
I want to display only the number in this link, in a label visual basic 2008 this is the code i have, it works it just displays the whole link in the label.
Dim
theElementCollection As HtmlElementCollection = Me.WebBrowser1.Document.GetElementsByTagName("a")
For Each curElement As HtmlElement In theElementCollection
Dim ctrlID As String = curElement.GetAttribute("innerText").ToString
[code]....
View 3 Replies