Visual Basic Online Course FlexGrid

Visual Basic 2010 - FlexGrid

vb.net 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 2010 Online Courses Free
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 online courses free
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 Online Courses
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].

FlexGrid in VB2010 .Net
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
Visual Basic Online Courses
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

Here are some online Visual Basic lessons and courses :

Popular posts from this blog

Visual Basic 2010 Working With DataBase Full Project Example

VB NET Check internet connection

VB .NET DropBox Api Source Code Example

Visual Basic .Net - Button Sound / Music Play

VB .NET WebView2 WinForms tips

Visual Basic Online Courses DataGridView Add Edit Delete