Visual Basic Online Course FlexGrid
Visual Basic 2010 - FlexGrid
Visual Basic 2010 FlexGrid |
The Microsoft FlexGrid (MSFlexGrid) control displays and operates on tabular data. It allows complete flexibility to sort, merge, and format tables containing strings and pictures. When bound to a Data control, MSFlexGrid displays read-only data.
You can put text, a picture, or both, in any cell of an MSFlexGrid. The Row and Col properties specify the current cell in an MSFlexGrid. You can specify the current cell in code, or the user can change it at run time using the mouse or the arrow keys. The Text property references the contents of the current cell.
If the text in a cell is too long to display in the cell, and the WordWrap property is set to True, the text wraps to the next line within the same cell. To display the wrapped text, you may need to increase the cells column width (ColWidth property) or row height (RowHeight property).
Use the Cols and Rows properties to determine the number of columns and rows in an MSFlexGrid.
Note :
Before you can use an MSFlexGrid in your application, you must add the MSFlxGrd.ocx file to your project. To automatically include the file in your project, put it in the Autoload file. When distributing your application, you should install the MSFlxGrd.ocx file in the users Microsoft Windows System directory. For more information about adding an ActiveX control to a project, see "Standard ActiveX Controls" in the Visual Basic Programmers Guide.
How to add a FlexGrid component to Visual Basic .Net Form ?
MSFLXGRD.OCX is a COM not a Net component but it can be added to a .Net Form in Visual Basic 2010 and work with it. In order to do so :
1) Open Visual Basic 2010 - New Project - Windows Form Application
Visual Basic Windows Form Application |
2) Make sure you are displaying the design mode of the Form1.vb, to be able to choose components
Visual Basic 2010 Form Design Mode |
3) From Tools at the left side of the form, right-click anywhere and there will be a list, choose [Choose Items....]
Visual Basic 2010 Tools - Add FlexGrid |
4) You will notice a new dialog box is opened where you get to pick up .Net components and Com components, click on the Tab with COM Components, then navigate to [Microsoft FlexGrid Control].
Visual Basic 2010 - Adding FlexGrid to Form |
5) Click OK. Now from Tools, navigate to the end of the current section and you will file [Microsoft FlexGrid Control], just drag it on the Form or Double-Click it to be placed automatically on the Form
FlexGrid in VB.Net Form |
6) Now you successfully placed a COM component on .Net Form. Visual Basic 2010 will automatically convert this COM component into .Net component when Building your application.
link to this article : https://adonetaccess2003.blogspot.com/2013/08/FlexGridVB2010.html
link to this article : https://adonetaccess2003.blogspot.com/2013/08/FlexGridVB2010.html
♥ Here are some online Visual Basic lessons and courses :
- Visual Basic .Net snippets collection
- Visual Basic .Net - How to check for the internet connection
- Visual Basic .Net - POP3 and Receiving E-mails
- Visual Basic .Net - Generate Random Combinations
- Visual Basic .Net - Play sounds on Button Click or Mouse Hover
- Visual Basic .Net - Progressbar control
- Visual Basic .Net Solution - The application failed to initialize
- Visual Basic .Net - Working with Database full example
- Visual Basic .Net - There is already an open DataReader associated
- Visual Basic .Net - SyBase Advantage Database [Add, Edit, Search, Delete and DataGridView]
- Visual Basic .Net - Fade Image
- Visual Basic .Net - Free POS System Project Source Code