I want to change the underline property (to true) when the mouse is over it (either mouse hover. enter, or move - i don't know which is best to use.Then change it back using the form's mouse over/hover/enter property.So how would I change it?
How can I use the Linked Label Control on a Form without the underlines. I mean, each time I add a Linked Label Control on a form, it has the underline by default. Is there anyway to remove the underlines? Only performance counts!
I am trying to write a quiz in Visual Basic 2010 .NET and I have come across a problem while putting in the textbox the user inputs the answer to. The Textbox obscures the upper half of the first line of text.
Public AnswerTextBox As New TextBox Public stdFont As New Font("Calibri", 12) Public Sub New() AnswerTextBox.Location = New Point(100, 100) AnswerTextBox.Size = New Size(200, 30) [Code] .....
I'm trying to place a Label at runtime like this:Form2.lblMaxLandingWt.Location.X = Form2.Panel1.Width * .65but I get an error "Expression is a value and therefore cannot be the target of an assignment"
I'm trying to change the existing 10 labels color on my form at runtime they are named this way (label1,label2,label3...label10) however i haven't bin able to successfully do it so far. Here is the code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim LabelArray(10) As Label For x As Integer = 0 To 9 Dim strLabelName As String = "Label" + x.ToString [Code] .....
I'm trying to create a bunch of labels during runtime that will be "inside" a picture box, so when I move them, if their new coordinates are outside the box's dimensions they wont display, or if they're right on the edge of the box only half the label will be visible etc.
I thought label.Parent = picturebox would work but it doesn't seem to do anything, and Google keeps telling me to set the label's container to the picturebox - which sounds right, but maybe it's no longer a VB.NET thing since the Container property seems to be Read Only.
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick curtime.Text = TimeValue(Now) 'curtime is label
I've got a simple assignment for my adv vb.net class at college and the only thing I'm stuck on is how to move a label around the form at run time with the mouse. Here's the code I have so far[code]...
I have a form with some labels. If the labels equal certain text, then I want the font size of the label to change.For example, if the text reads "apple",I want the font size of the label to be 16.If the text reads "banana", I want the font size of the label to be 8.This has to occur during runtime without any clicking of the label.I have an idea of the code I want to write in order for this to work, but I need to know where to put the code for the labels.I cannot put this under Label_Click or Form_Load.Where can I put this code so that it works for the labels during runtime?
I'm developing a Windows Forms Application in Visual Basic .NET with Visual Studio 2008.
I'm trying to compose fonts (Family name, font size, and the styles) at runtime, based on user preferences, and apply them to labels.
For the sake of both a simplier user interface, and compatibility between more than one machine requiring to use the same font, I'll NOT use the InstalledFontCollection, but a set of buttons that will set few selected fonts, that I know to be present in all machines (fonts like Verdana).
So, I have to make a Public Sub on a Module that will create fonts, but I don't know how to code that. There are also four CheckBoxes that set the styles, Bold, Italic, Underline and Strikeout.
How should I code this? The SomeLabel.Font.Bold property is readonly, and there seems to be a problem when converting a string like "Times New Roman" to a FontFamily type. (It just says it could not do it)
Like on
Dim NewFontFamily As FontFamily = "Times New Roman"
Is it possible to edit a labels' font and size etc at runtime? If so how would I do this? apparently it is read-only? Im basically learning about decision structures at the moment and would like to change a label font based on a case statement?
I've added some Labels to a form at runtime using this
vb.net Dim x As Integer = 25 For i As Integer = 1 To word.Length
[Code]....
Now, I would like to add text to one of them, but I'm not sure how. I thought by setting .Name I would simply be able to write something like lbl4.text ="A". But, of course, because the Label has not been created yet, this is not possible.
Also, I'm not even sure if .Name is working the way I think it is. I was hoping that it would name each Label consecutively: lbl1, lbl2, lbl3, lbl4...etc.
Am I naming the Labels properly? And how would I add text to one of these Labels?
Im trying to get an application to count letters and words. I want it to count them at runtime and display it in a label box. My form will run and I can type text in my textbox but my lblOutput doesn't update.[code...]
I am creating a custom Label control (by simply Inheriting the standard Label control and re-painting the background and text) because I need a very specific background and border. In the constructor of the control, I set the AutoSize property to false so I can have a standard default size for the new label.
Public Sub New() /*Set the default size of the control to 75x24*/ Me.Height = 24
[code]....
In my application that uses this control, if I create the new custom label at run time (in code), the AutoSize property stays False, and it works properly.If I try to add the new custom label to my form at design time, it comes in with the AutoSize property set to True, and I have to manually set it to False in the properties window. It's not a huge problem, but I don't understand why the behavior is different.
I have the following code: [code] and it's ment to change the backcolor of a label during runtime, which works.But when I use the same code and use it in a smart device - Windows Mobile 5.0 Pocket PC it don't work and comes up with the following error:'ColorTranslator' is not a member of 'Drawing'.Is there a way I can change the backcolor of the label during runtime when creating a smart device application (windows Mobile application) ? I want to be able to use a custom color rather then one already set in vb.net
I'm a second year A-level student (12th Grade U.S. equivalent) studying Computing, Physics and Maths. I like anime, PC gaming, climbing and mountaineering. That's an insight to who I am. Thought I'd add it here to my first post since I couldn't spot and introductions section.
How do you draw a solid underline from one cell to another? I tried the last line below to do this but it only underlines each word. Is there a way to connect the line?
I teach programming in Visual Basic 2010 Express Edition and I have one blind student in my class and it is essentiall for him to turn off every functional underline in text editor of Visual Basic enviroment.I know how to turn off intellisense. I know how to turn off green underline (warning), but I don't know how to turn off blue wavy underline (compiler error) in Visual Basic text editor.I found plenty of advices on web forums, but everything is about that should be possibility same like in C# (I use as well) -
selected a sentence from database to textbox or rich text bo in vb.net but i need to put a specific word underline in this textbox not all the sentence