Following example code demonstrate how to find selected item of combobox control in vb.net with the help of Combobox1.Selecteditem property.
Continue reading “How to get selected item from Combobox control in vb.net”
Tag: Windows Control
How to get CheckState of checkbox in vb.net
If the ThreeState property of the CheckBox control is set to false, then it shows only two state(checked and unchecked). you can get the selection state of the CheckBox control with the help of CheckState() property that has three enumerations:
Continue reading “How to get CheckState of checkbox in vb.net”
Paint event of Button control in vb.net
The Paint event is raised when the control is redrawn. It passes an instance of PaintEventArgs to the method that handles the Paint event.
Continue reading “Paint event of Button control in vb.net”
Character casing in Textbox control
You can use the CharacterCasing property of the TextBox control in .net to change the case of characters as required by your application. For example,
you could change the case of all characters entered in a TextBox control used for username and password. When user can enter some textbox in both textbox, these textbox automatically change the text into upper case.
This example requires two textbox (txtUsername, txtPassword) and one button(see in the picture).
we can set the CharacterCasing property of the TextBox control through designer window as well as code.
[vb]
txtUsername.CharacterCasing = CharacterCasing.Upper txtPassword.CharacterCasing = CharacterCasing.Upper
[c#]
txtUsername.CharacterCasing = CharacterCasing.Upper; txtPassword.CharacterCasing = CharacterCasing.Upper;
Bind fonts by name with their font style in the ListView in c# and vb.net
In this article we create a function in c# language that bind all system’s fonts in a Listview
control, with the fonts displayed by name in that format. you can see below picture.
Continue reading “Bind fonts by name with their font style in the ListView in c# and vb.net”
Add ContextMenu to treeview nodes in c#
In this article we will learn that how to add contextmenu or contextmenustrip in treeview nodes at design time as well as runtime using c# programming language.
Continue reading “Add ContextMenu to treeview nodes in c#”
Add ContextMenu to treeview nodes in vb.net
In this article we will learn that how to add contextmenu or contextmenustrip in treeview nodes at design time as well as runtime using vb.net programming language.
Continue reading “Add ContextMenu to treeview nodes in vb.net”
Create Treeview from Datatable in c#
In this article we will learn that how to create TreeView control from datatable object in c# programming language.
Continue reading “Create Treeview from Datatable in c#”
Checkboxes in TreeView control in C#
A check box can display to the left of both the tree node label and tree node Image, if any. Check boxes allow the user to select more than one tree node at a time.You can do it with the help of ‘CheckBoxes’ property.
Continue reading “Checkboxes in TreeView control in C#”
How to Add and Remove Nodes with the TreeView Control at runtime in .net
The Windows Forms TreeView control has the top-level nodes in its Nodes collection. Each TreeNode also has its own Nodes collection to store its child nodes.
Continue reading “How to Add and Remove Nodes with the TreeView Control at runtime in .net”