Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips

Forms - Page 3

41-60 of 468     Previous     Next
Dragging & dropping files on a form
by Marco Bellinaso
Most document-based applications typically allow to open a document file in two ways: with the Open File menu command / toolbar button, or by dragging and dropping the file from Windows Explorer to the application's window. This works with MS Word, Winzip and many other applications. ...
Enable a key-skipping mechanism for a TextBox
by Marco Bellinaso
Enable the key-skipping mechanism for the input TextBox and for the input chars Example: don't process the 'A', 'b' and '0' chars EnableTextBoxCharSkip(TextBox1, "A"c, "b"c, "0"c)
GetControlsByTag - Find all the controls with the specified Tag value
by Alberto Falossi
Find all the controls with the specified Tag value Example: Dim ctrls() As Control = GetControlsByTag("OK", Me) Dim ctrl As Control For Each ctrl In ctrls Debug.WriteLine(ctrl.Name) Next
GetTextBoxCurrentLine - Determine the current line in a multiline TextBox control
by Marco Bellinaso
Determine the current line in a multiline TextBox control Example: MessageBox.Show(GetTextBoxCurrentLine(TextBox1))
SaveCSV - Saving the content of a FlexGrid control as a CSV-file
by Pebe
Save the content of a FlexGrid control as a CSV-file Example: SaveCSV("C:\Test.csv", MSFlexGrid1)
Don
by Marco Bellinaso
Have you ever tried to change the BorderStyle, HideSelection, MultiLine, ScrollBars, WordWrap and TextAlign properties of a TextBox, or the ComboBox
FindControl - Retrieving a reference to the control with the specified name
by Marco Bellinaso
Return a reference to the control with the specified name, searched into the specified container and its sub-controls Note: it requires the GetAllControls function Example: get a reference to a Label named "lblTest", and set its Text property DirectCast(FindControl("lblTest", Me), Label).
InputBox - A .NET replacement for this VB6 function
by Marco Bellinaso
Create an InputBox like the one of VB6. You can define the dialog's title, question and default value. Example: MessageBox.Show(InputDialog.InputBox("Type your name:", "Test", "Marco"))
InsertImageIntoRtb - Inserting an image into a RichTextBox
by Marco Bellinaso
Insert an image into a RichTextBox, in the current position This version takes in input the target RichTextBox and the path of the image to insert Example: InsertImageIntoRtb(RichTextBox1, "C:\test.jpg")
Skipping columns when tabbing on a DataGrid
by Marco Bellinaso
It happens quite often that you have a DataGrid with hidden columns (with width = 0), because you need their values but don't want to show them to the user. However, when you tab through the DataGrid's columns, these "hidden" columns are still taken into account in the tab order. This means ...
Close All Child Forms in One Shot
by Unnikrishnan Thampy
GetAllControls - Retrieving all the controls inside a container and its sub-containers
by Marco Bellinaso
Returns an array with all the controls in the specified container control and its child containers Example: print the name of all the controls on the form and its child container controls Dim ctl As Control For Each ctl In GetAllControls(Me) Debug.WriteLine(ctl.Name) Next
GetValidationSummary - Builds a validation summary for all the controls inside a container
by Marco Bellinaso
Return a validation summary string with all the error messages, if any, of the controls inside the specified container, associated to an ErrorProvider control Example: Dim summary As String = "" display the validation summary for all the controls on the form summary = GetValid
GetControlsByType - Retrieving an array of controls of the specified type
by Marco Bellinaso
Returns an array of controls of the specified type, found within the specified parent control (or the form itself). Note: the search is optionally done recursively, by checking also controls' child controls Example: get an array with the form's textboxes Dim textboxes() As TextBox = ...
ResetControls - Reset the value for the input array of controls
by Marco Bellinaso
Resets the value for the input array of controls, and thier child controls Example: - reset all the controls on the form: ResetControls(Me) - reset specific controls: ResetControls(TextBox1, CheckBox1, GroupBox1)
ExplodeForm - Showing a form with an explosion effect
by Marco Bellinaso
Show a form with an explosion effect. the numSteps parameter is the number of steps to increase the form size from 0 to the original size the stepDuration argument is the number of milliseconds between each step Example: Private Sub Form1_Activated(...) Handles MyBase.Activated
ForceTextBoxNumeric - Force a TextBox control to accept only numeric digits
by Marco Bellinaso
Force a TextBox control to accept only numeric digits Cancel the effect by passing Force = False Note that it only accepts positive integer values
GetNodeNestingLevel - Returns the nesting level of a TreeView's Node object
by Marco Bellinaso
Returns the nesting level of a TreeView's Node object (returns zero for root nodes)
ImplodeForm - Hiding a form with an implosion effect
by Marco Bellinaso
Hiding a form with an implosion effect. the numSteps parameter is the number of steps to decrease the form size from the current size to 0 the stepDuration argument is the number of milliseconds between each step Example: Private Sub Form1_Closing(...) Handles MyBase.Closing
MoveListboxItem - Moving an item of a listbox to another index
by Marco Bellinaso
Moves an item of a listbox to another index If FROMINDEX = -1 then it moves the current highlighted item Example: move up the selected item MoveListboxItem(ListBox1, -1, ListBox1.SelectedIndex - 1) move down the selected item MoveListboxItem(ListBox1, -1, ListBox1.SelectedIndex + 1)
41-60 of 468     Previous     Next
Sitemap