Forms :: Changing State Of Label Depending Upon Two Checkboxs?
Aug 7, 2010
I have added two checkbox controls chkBox1 and chkBox2. What I want to do is that when both the chkbox are same meaning checked or unchecked the label should be On and if both are not same label should be Off.
[Code]....
View 17 Replies
ADVERTISEMENT
Apr 30, 2009
I have managed to get it to write a string to a textfile if the listviews checkbox is checked but i can not get it to write a particular string if it is unchecked.
'LOOP CHECKED ITEMS
For Each lstItem As ListViewItem In Me.ListView1.CheckedItems
Next
How do i Iterate an unchecked item as the library doesn't have .UnCheckItems?
If its checked i need to add "true" to the string and if its unchecked i need to add "false" to a string that gets written to a textfile.
View 4 Replies
Jun 3, 2011
I have a Main form, called Main.vb, that is a Parent Form. I have another form called Notes.vb. Inside Main.vb I have a toolstrip with a button on it called Notes. I'm wanting to change the checked status of the Button to either True when the Notes.vb window is open inside the parent or to false when it is close. Is this possible?
View 6 Replies
Mar 16, 2010
I'm kicking my self for not being able to resolve this.I have a few items in my context menu thats for my listbox that toggle enable/disable depending on eitheritem is selecteditem is checked.the top 3 items should be enabled only if a item is selected, which works,and the bottom 2 only if an item is checked in the list.(it is a chked list)But what i would really like is that if ONE checkbox is checked then the top three would be disabled. i did try adding a for loop to check for an item is checked but it only half the time worked. (i added the code also)
vb
''' <summary>
''' Ensures the process manager context menu items reflect the selection/checked
[code].....
View 1 Replies
Jun 3, 2012
I need to write a method in C# to save all rows in a given datatable back to the database, but I cannot depend on the rowstate of each row. I can't think of how best to do this without extensive looping through the database table data or constant database querying.
I want to essentially perform the following insert / update for each row in the datatable, but more efficiently:
[Code]...
View 2 Replies
Mar 18, 2011
I have a basic bubble sorting algorithm that can sort either A-Z or in numerical order with just the change of a "less than" or "more than". However, I have to use the code twice in order for it to sort correctly.
'Sub Sort(ByVal array As Object)
'--A-Z
If Array(i) > Array(i +1) Then
[code]....
Anyway, if there is a way to do it, that'll allow me to have just one sort instead of having two sorts which use the same sorting algorithm, but just a different comparator.
View 2 Replies
Nov 2, 2010
I am trying to make a window manager and I am wanting to know how to change states (SW_HIDE, SW_SHOW) of an external window such as a firefox browser or explorer window.
View 1 Replies
Mar 12, 2012
I have a list of 12 buttons on a form. I want to label each of them representing a month from left to right starting at the most recent month. So if today is the 12/3/12 my buttons will be in THIS order MAR12,FEB12,JAN12,DEC11,NOV11 ETC UP TO BUTTON 12. I have already written code for it and it works but it is long winded.
Here is my long winded
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
DTPicker1.Value = TimeValue(Now)
End Sub
[Code]....
View 8 Replies
Sep 21, 2010
I'm searching for a way to change the font size of selected text in a RichTextBox (rtf) having different font families (e.g. Arial and MS SansSerif) and font styles (underline, bold...) using the FontDialog, but without changing the families and styles. The following code resets all the font attributes, which is not what I want:
[Code]...
View 5 Replies
Oct 6, 2009
Am migrating VB6 to VB.Net and am stuck once again. We use App.HelpFile in vb6 to set Path and Filename of current help file.Current help File can change depending on which form is displayed.How do we assign help files in VB.net?
[Code]...
View 1 Replies
Apr 13, 2012
I've just finished creating a basic login system which enables you to create an account and select either a "Student" or "Teacher" account.
Once the account is created it's stored in an Access 2007 database. The field the account type gets stored in is called AccountType. When users log in with their unique username and password I want the program to take them to a different form depending on whether they have a student or teacher account.
View 2 Replies
Oct 15, 2011
I am developing a windows application, how can i store the view state of a page in vb.net. i have 12 labels on a page and when i click on each label the color of the label changes to black, what i want is when i come back to the same page, i want the labels to retain their colors....
View 1 Replies
Jun 2, 2010
I have 2 combo boxes. One is in a form called subcat_selector.vb
on the button Pick Sub Catagory.click event it shows the subcat_selector form. form there, the onload event:
Dim button As DialogResult
[Code].....
View 10 Replies
Jul 18, 2007
I've got a tab control and want to dynamically add tabs depending on the output from a database. I can easily add a new tab, however I want to inherit the controls and layout from the initial tab.
View 7 Replies
Jul 28, 2009
just wondering if it is possible to add a method to all forms in my project without having to do it on one form and Inherit all my other forms from that one
View 3 Replies
Aug 3, 2009
i'm making a vb aplication (only my second one so dont be to cruel) and i'm just wondering how to make it so that when somebody closes my aplication down and open it back up it restores it to the same state, i've had a look on google and the only thing i can find are how to remember the size and position of the form using the registry and also using flat file databases to hold the values of all the text box's but is there an easier and more elegant way
View 2 Replies
Feb 25, 2011
If i use the form.showdialog method to open a form, then input data.. when I close the form then re-open it the data is still there.Is there a way of restoring the forms original states, as it is on load?
View 1 Replies
Apr 16, 2010
I need to be able to change the font of a label, to bold.I know it's very simple but i'be forgoten.I've tried: Form1.Label1.Font.Bold = True but i get the error: Error: Property 'Bold' is 'ReadOnly'
View 2 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
Aug 22, 2009
I have a label where several sentences of text is displayed, 2 radio buttons below it and then a Button. Instead of making the radio buttons display a MsgBox, would it be possible to make the radio button (depending on which you choose) alter the Label where the text is?
View 6 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
Jul 18, 2010
if the users clicks on a setting the text of a label will change, but its not aligned so I want to get it aligned? Label1.Location and then?Label1.Location (blabla ;blabla) won't work so..
View 7 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
Dec 11, 2009
Just wondering if someone can at least point out where I'm going wrong here. I've already got the code to populate the listbox by a button click from the user and am just trying to figure out how exactly to alter the text of a label based on what the user selects in the listbox. From what I have the Label will display the case else selection but nothing else despite my best efforts to get it to change. Here is what I've tried. I realize it is very trivial, but I am only a beginner to programming.
[Code]...
View 3 Replies
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
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
Jan 24, 2011
First I am using 'Microsoft Visual Studio 2010' and am making a 'windoms forms application'. I am wishing to implement a way of changing the text colour through out the whole application. I have managed to put on a customisable background using
Quote:
CODE:
I know I'll have to change the 'BackColor' bit but I don't know what to. Is there something that turns all text on the form one colour or do I have to do it label by label?
Also I am can't figure out how to rotate labels to display text at a 60 degree angle (to display along the edge of an equilateral triangle) And for the triangle I have drawn it using lines which move independently from each other, is there anyway to 'group' these lines together so they are fixed.
View 3 Replies
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
Dec 7, 2009
How would I go about changing the font in a multi line label
Private Sub error_page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.Label1.Text = "Warning!" & Environment.NewLine & "If you proceed with this
[Code]....
View 5 Replies
May 29, 2012
I have an application I am creating that displays pump information based on customers in a database. I am using VB2008 .NET3.5.I have a combobox that has a selection for a unit of measure. What I want to happen is when that is changes the labels that have a unit of measure change to reflect the change. There are 15 labels total that need to be changed and all there names are the only ones in the project that start with a X if that helps at all. I would like to avoid creating a bunch of labels and changing the visible property and just change the text value of each one.
View 1 Replies