-
3 Attachment(s)
[VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
This is the ActiveX Control version that comes out of the Std-EXE version.
Current version: 1.8.40
The development state of the ActiveX Control version does not necessarily match to the Std-EXE version.
That comes because the Std-EXE version is the "leading source" and the ActiveX Control version is derived from the Std-EXE version after a certain time.
Reason why is that it is not practicable to release a new ActiveX Control after each new feature.
However, certain bugfixes can and will be implemented into the current ActiveX Control version. (Revision)
It is not recommended to use the source code to compile another binary.
If own modification is necessary please rename the library to avoid redundancies.
The source code of the project can also be viewed on GitHub.
All controls are marked as "Safe for Initialization and Scripting" by the IObjectSafety interface.
Also everything is 100% IDE-Safe.
Here is a solution to use the VBFLXGRD18.OCX Registration-Free. (Side-by-side)
Keep in mind that this technology needs at minimum Windows XP SP2 or Windows Server 2003.
Tutorial:
The "Development" machine needs to register the VBFLXGRD18.OCX as usual and use the components for e.g. in a Std-EXE project.
The source project needs to include the Side-by-side resources. (see below)
Then on the "End user" machine you only need the VBFLXGRD18.OCX and the .exe (Std-EXE project) on the same folder.
It will work then without any registration.
The source code of "VBFLXGRD18SideBySide.res" is:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<file name="VBFLXGRD18.OCX">
<typelib tlbid="{075212A8-C1CF-444E-939D-F6046CCDBC08}" version="1.5" flags="control,hasdiskimage" helpdir="" />
<comClass clsid="{3E0B96F3-6E99-4E2F-8148-EFC4F54D8185}" tlbid="{075212A8-C1CF-444E-939D-F6046CCDBC08}" threadingModel="Apartment" progid="VBFLXGRD18.VBFlexGrid" miscStatus="" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,alignable,setclientsitefirst" />
<comClass clsid="{20933A6A-0A95-4C64-9027-CF1817966BC1}" tlbid="{075212A8-C1CF-444E-939D-F6046CCDBC08}" threadingModel="Apartment" />
<comClass clsid="{B6C4B119-AAA8-4F54-B13C-643DBEF3C0F6}" tlbid="{075212A8-C1CF-444E-939D-F6046CCDBC08}" threadingModel="Apartment" />
<comClass clsid="{16EAF508-2BA1-4C89-B69D-FA62927B835F}" tlbid="{075212A8-C1CF-444E-939D-F6046CCDBC08}" threadingModel="Apartment" />
</file>
</assembly>
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Hello Krool,
I have just downloaded and tried your VBFlexGrid
It is nice!
However, using late-binding slows down the grid performance drastically compared to MSFlexGrid
May I know the reason behind it? Also, what can be done to improve speed?
The following code takes about 10 seconds to execute.( 10 times more than MSFlexGrid)
Code:
Dim objGrid As Object
Dim w as Long
Set objGrid = VBFlexGrid1 'Grid added in design
With objGrid
.Rows = 5000
.Cols = 50
For i = 0 To 4999
For j = 0 To 49
w = objGrid.ColWidth(j)
Next j
Next i
End With
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Update released to version 1.1
Quote:
Originally Posted by
winman
using late-binding slows down the grid performance drastically compared to MSFlexGrid
Did you also try
Code:
Dim objGrid As VBFlexGrid
instead of
Code:
Dim objGrid As Object
?
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Yes, I did
Here is the report of time taken in seconds for early bound and late bound VBFlexGrid and MSFlexGrid as in the code snippet below
Case1: VBFlexGrid (early bound), time = 7.271313 s
Case2: MSFlexGrid (early bound), time = 6.834063 s
Case3: VBFlexGrid (late bound), time = 20.11294 s
Case4: MSFlexGrid (late bound), time =7.252 s
Code:
Dim objGrid As VBFlexGrid ' Case1
'Dim objGrid As MSFlexGrid ' Case2
'Dim objGrid As Object ' Case3
'Set objGrid = VBFlexGrid1 ' Case3
'Dim objGrid As Object ' Case4
'Set objGrid = MSFlexGrid1 ' Case4
Dim s as String
With objGrid
.Rows = 5000
.Cols = 50
For i = 0 To 4999
For j = 0 To 49
s = objGrid.TextMatrix(i,j))
Next j
Next i
End With
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Hi Krool,
I have checked the new update. It is really good
The new sort options and the row/column autofit features are awesome and very useful
I have also checked the speed for the late bound grid in the latest update. It is found to be same as the previous update. We have managed to use early bound VBFlexGrid for now. Any improvements in speed for the late bound grid would be of great use for our requirements here.
Thank you :)
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Included LinkSwitch /OPT:NOWIN98 on the VBCompiler which reduced the file size of the OCX binary by about ~16KB
-
1 Attachment(s)
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
I've add a Spread class (made by FlyGuy) for in-cell editing and formulas (Excel-like)
It seems that it works very well!
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
gibra
I've add a Spread class (made by FlyGuy) for in-cell editing and formulas (Excel-like)
It seems that it works very well!
Hey that’s my nickname on XtremeVBTalk :wave:
I bet you downloaded it from the FlexGrid functions thread.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Arnoutdv
Hey that’s my nickname on XtremeVBTalk :wave:
I bet you downloaded it from the FlexGrid functions thread.
Yes! ;)
Flexgrid functions - Xtreme Visual Basic Talk
http://www.xtremevbtalk.com/code-lib...functions.html
A lot of usefull routines.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Hi Krool,
I would like to replace C1 vsFlexGrid (that I use for years) with your VBFlexGrid as it seems to be up there with it.
In vsFlexGrid I'm able to "replace" the standard EditWindow with a DateTimePicker by catching the StartEdit event and turn a previously created DTPicker visibility on, right over the cell (StartEdit is called with Row, Col, and Cancel parameters).
I see that the event StartEdit doesn't exist in VBFlexGrid, thought there is a method with the same name. Will I be able to create a similar behavior with VBFlexGrid?
Thanks
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Can I add the attribute "GetColIndex" Property?
Public Property Get GetColIndex(ByVal Key As String) As Long 'Add
''''''''
End Property 'Add
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
still amazed on how VB6 still popular out there, and still many support additional control. like me. I am one of VB6 programmer and really appreciate this kind of thread..keep it up
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
smileyoufucn
Can I add the attribute "GetColIndex" Property?
Public Property Get GetColIndex(ByVal Key As String) As Long 'Add
''''''''
End Property 'Add
There is already a ColIndex property available which just does what you suggested with your "GetColIndex".
Code:
Public Property Get ColIndex(ByVal Key As String) As Long
Quote:
Originally Posted by
Carlos Rocha
I would like to replace C1 vsFlexGrid (that I use for years) with your VBFlexGrid as it seems to be up there with it.
In vsFlexGrid I'm able to "replace" the standard EditWindow with a DateTimePicker by catching the StartEdit event and turn a previously created DTPicker visibility on, right over the cell (StartEdit is called with Row, Col, and Cancel parameters).
I see that the event StartEdit doesn't exist in VBFlexGrid, thought there is a method with the same name. Will I be able to create a similar behavior with VBFlexGrid?
You can catch the BeforeEdit event (EditWindow not yet created) and set Cancel = True and turn on your own DTPicker.
If you catch EnterEdit event it's already too late as EditWindow is created.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
You can catch the BeforeEdit event (EditWindow not yet created) and set Cancel = True and turn on your own DTPicker.
If you catch EnterEdit event it's already too late as EditWindow is created.
Thanks, this info will save me lots of time.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
i have not use this grid before, right now i am focusing on LynxGrid, I tried your Grid before, but somehow the flexibility perhaps add ability for combobox to cell
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
jedifuk
i have not use this grid before, right now i am focusing on LynxGrid, I tried your Grid before, but somehow the flexibility perhaps add ability for combobox to cell
The following combo modes are available in VBFlexGrid:
FlexComboModeNone (only EditWindow)
FlexComboModeDropDown (DropDownList)
FlexComboModeEditable (DropDownCombo)
FlexComboModeButton (Custom)
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
gibra
Hello Everybody
Where I can I get the functions in
http://www.xtremevbtalk.com/code-lib...functions.html
The website seems to be offline.
Thanks per advance
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
@aklougbo you should have started your own thread for asking something which is not really related to your question.
XtremeVBTalk is gone, no one knows why.
There was no time for admins/mods to save the code libraries, everything is just gone.
Anything specific you needed or wanted from that thread?
The Internet Archive, Wayback Machinee saved parts
Page 1:
http://web.archive.org/web/201610070...functions.html
Page 2:
http://web.archive.org/web/201610070...nctions-2.html
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
The following combo modes are available in VBFlexGrid:
FlexComboModeNone (only EditWindow)
FlexComboModeDropDown (DropDownList)
FlexComboModeEditable (DropDownCombo)
FlexComboModeButton (Custom)
waoww..never know about this, i am using lynxgrid for my app, might switch to vbflexgrid, last thing...vbflexgrid support filter (I supposed so), but i meant filterbar on top of grid, similar to componentone tdgbrid ...thanks
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
The following combo modes are available in VBFlexGrid:
FlexComboModeNone (only EditWindow)
FlexComboModeDropDown (DropDownList)
FlexComboModeEditable (DropDownCombo)
FlexComboModeButton (Custom)
i couldn't find any documentation or example regarding VBFlexGrid, any information ?
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Arnoutdv
Thank you very much.
I still have to learn how to correctly post something on the forum.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
jedifuk
i couldn't find any documentation or example regarding VBFlexGrid, any information ?
If you can read the first post you would notice that there is also a Std-EXE version.
In that thread (first post) is a demo project showing the editing feature in one sub-form of the demo project.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
If you can read the first post you would notice that there is also a
Std-EXE version.
In that thread (first post) is a demo project showing the editing feature in one sub-form of the demo project.
waoww...what a dumb i am..might check this right away..
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
If you can read the first post you would notice that there is also a
Std-EXE version.
In that thread (first post) is a demo project showing the editing feature in one sub-form of the demo project.
waoww...what a dumb i am..might check this right away..
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Hi! Is 1.3.11 a last one from version 1.3?
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
SPB-667
Hi! Is 1.3.11 a last one from version 1.3?
1.3.12 was the last version for 1.3.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
From Object Browser, VBFLXGRD14.OCX v. 1.4.0.35
Code:
Event ValidateEdit(Cancel As Boolean)
Member of VBFLXGRD14.VBFlexGrid
Occurs before any changes made by a user are committed to a cell. If the validation fails the changes will be discarded and the control will remain in edit mode.
Am I wrong in assuming that this means that when Cancel is set to 'True' in this event that the originally changed value will be restored in the cell, or this is something I have implement myself?
Or maybe I am doing this the wrong or invalid way or is this scenario a bug? This is my scenario:
In the event I check the value in flexgrd.EditText and if not withing a certain range I fire a dialog to ask for a Yes/No confirmation, and if no I set Cancel = True. However, the value in the grid cell remain as the changed value, and the cell is no longer in EditMode. This is my validation code:
Code:
Private Sub grdPlanVals_ValidateEdit(Cancel As Boolean)
Dim X As Long
With grdPlanVals
X = Val(.EditText)
Select Case X
Case 1 To 6
Case Else
Dim cTaskDlg As cTaskDialog
Set cTaskDlg = New cTaskDialog
If X > 6 Then
'"Are you sure this is correct?"
'"Not recommended value"
'"This is a very large value"
If cTaskDlg.SimpleDialog(cLang.GetString(2002), TDCBF_YES_BUTTON Or TDCBF_NO_BUTTON, cLang.GetString(2001), cLang.GetString(2026), TD_WARNING_ICON, Me.hwnd) <> TDCBF_YES_BUTTON Then
Cancel = True
End If
Else
'"Are you sure this is correct?"
'""Not recommended value"
'"This value will eliminate the use of this planet"
If cTaskDlg.SimpleDialog(cLang.GetString(2002), TDCBF_YES_BUTTON Or TDCBF_NO_BUTTON, cLang.GetString(2001), cLang.GetString(2000), TD_WARNING_ICON, Me.hwnd) <> TDCBF_YES_BUTTON Then
Cancel = True
End If
End If
End Select
.HighLight = flexHighlightNever
If Not Cancel Then
mIsDirty = True
gpv(.EditRow) = X
End If
End With
End Sub
I also have code in the BeforeEdit event, the goal here is to prevent the user from edit unless he/she is double clicking in a cell that isn't in the first (fixed) column. Removing that code doesn't seem to have any impact on my issue though.
Code:
Private Sub grdPlanVals_BeforeEdit(Row As Long, Col As Long, ByVal Reason As VBFLXGRD14.FlexEditReasonConstants, Cancel As Boolean)
'If Not CBool(Col) Or Not (Reason = FlexEditReasonDblClick) Then Cancel = True
If Not CBool(Col) Then
Cancel = True
Else
If Not (Reason = FlexEditReasonDblClick) Then
Cancel = True
End If
End If
End Sub
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
@7edm, add the normal Validate handler too, like below.
Code:
Private Sub VBFlexGrid1_Validate(Cancel As Boolean)
' This must be handled when validation of the edit control should be for the whole form.
If VBFlexGrid1.hWndEdit <> 0 Then Call VBFlexGrid1_ValidateEdit(Cancel)
End Sub
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Unfortunately, that didn't change anything. I even tried with commenting out the dialog part and simply set 'Cancel = True' if the edited value was out of range, also tried to remove the 'BeforeEdit' event, no change. No button on the form have nether Default or Cancel set to True.
This is the full code I have in the grid events:
Code:
Private Sub grdPlanVals_BeforeEdit(Row As Long, Col As Long, ByVal Reason As VBFLXGRD14.FlexEditReasonConstants, Cancel As Boolean)
'If Not CBool(Col) Or Not (Reason = FlexEditReasonDblClick) Then Cancel = True
If Not CBool(Col) Then
Cancel = True
Else
If Not (Reason = FlexEditReasonDblClick) Then
Cancel = True
End If
End If
Debug.Print "BeforeEdit = Reason: " & CStr(Reason)
Debug.Print "BeforeEdit = Text: " & CStr(grdPlanVals.Text)
End Sub
Private Sub grdPlanVals_CellClick(ByVal Row As Long, ByVal Col As Long, ByVal Button As Integer)
With grdPlanVals
If Col = 1 Then
.HighLight = flexHighlightAlways
End If
End With
End Sub
Private Sub grdPlanVals_EditKeyPress(KeyChar As Integer)
Select Case KeyChar
Case 8, 13, 47 To 58
KeyChar = KeyChar
Case Else
KeyChar = 0
End Select
End Sub
Private Sub grdPlanVals_Validate(Cancel As Boolean)
' This must be handled when validation of the edit control should be for the whole form.
If grdPlanVals.hWndEdit <> 0 Then Call grdPlanVals_ValidateEdit(Cancel)
End Sub
Private Sub grdPlanVals_ValidateEdit(Cancel As Boolean)
Dim X As Long
With grdPlanVals
Debug.Print "ValidateEdit = EditText: " & .EditText
X = Val(.EditText)
Debug.Print "ValidateEdit = EditRow: " & CStr(.EditRow)
Select Case X
Case 1 To 6
Case Else
Dim cTaskDlg As cTaskDialog
Set cTaskDlg = New cTaskDialog
If X > 6 Then
'This is a very large value
'Re-enter value if this is an error
If cTaskDlg.SimpleDialog(cLang.GetString(2002), TDCBF_YES_BUTTON Or TDCBF_NO_BUTTON, cLang.GetString(2001), cLang.GetString(2026), TD_WARNING_ICON, Me.hwnd) <> TDCBF_YES_BUTTON Then
Cancel = True
End If
Else
'Zero Value will eliminate this aspect
'Re-enter value if this is wrong
If cTaskDlg.SimpleDialog(cLang.GetString(2002), TDCBF_YES_BUTTON Or TDCBF_NO_BUTTON, cLang.GetString(2001), cLang.GetString(2000), TD_WARNING_ICON, Me.hwnd) <> TDCBF_YES_BUTTON Then
Cancel = True
End If
End If
End Select
.HighLight = flexHighlightNever
Debug.Print "ValidateEdit = Cancel: " & CStr(Cancel)
Debug.Print "ValidateEdit = EditRow: " & CStr(.EditRow)
Debug.Print "ValidateEdit = EditText: " & .EditText
Debug.Print "ValidateEdit = Text: " & CStr(.Text)
If Not Cancel Then
mIsDirty = True
'gpv(.EditRow) = X 'was aspno
End If
End With
End Sub
And as you see I have put some Debug statements in there, and here are the result of these:
Code:
BeforeEdit = Reason: 4
BeforeEdit = Text: 5
ValidateEdit = EditText: 8
ValidateEdit = EditRow: 1
ValidateEdit = Cancel: True
ValidateEdit = EditRow: -1
ValidateEdit = EditText:
ValidateEdit = Text: 8
As you can see, the cell text value before edit is 5, I change it to 8, which gets rejected in the validate event, but cell text value still remains at 8, not reset back to 5 as expected.
Please let me know if you need some other info. Maybe I also should mention that this previously was a MSFlexGrid control and I upgraded it by open the form in a text editor, remove the MSFlexGrid Object reference and added
Code:
Object = "{3E5D9624-07F7-4D22-90F8-1314327F7BAC}#1.0#0"; "VBFLXGRD14.OCX"
Then changed the controls Begin row to
Code:
Begin VBFLXGRD14.VBFlexGrid grdPlanVals
saved the file and started VB6 and my project.
There is some code setting up the grid with values, cell widths etc. but I cannot see how it may influence this.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
7edm, I did a bugfix in the ValidateEdit event. Can you re-try after updating to new version ?
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Sorry, still no go :-( but let me stress or put a few things into focus:
I don't think this issue is related to the bugfix you just did in ValidateEdit, because it's not dependent of if a mesagebox is shown or not, when changing my code above to this
Code:
Private Sub grdPlanVals_ValidateEdit(Cancel As Boolean)
Dim X As Long
With grdPlanVals
Debug.Print "ValidateEdit = EditText: " & .EditText
X = Val(.EditText)
Debug.Print "ValidateEdit = EditRow: " & CStr(.EditRow)
Select Case X
Case 1 To 6
Case Else
Cancel = True
' Dim cTaskDlg As cTaskDialog
'
' Set cTaskDlg = New cTaskDialog
'
' If X > 6 Then
'
' 'This is a very large value
' 'Re-enter value if this is an error
' If cTaskDlg.SimpleDialog(cLang.GetString(2002), TDCBF_YES_BUTTON Or TDCBF_NO_BUTTON, cLang.GetString(2001), cLang.GetString(2026), TD_WARNING_ICON, Me.hwnd) <> TDCBF_YES_BUTTON Then
' Cancel = True
' End If
'
' Else
'
' 'Zero Value will eliminate this aspect
' 'Re-enter value if this is wrong
' If cTaskDlg.SimpleDialog(cLang.GetString(2002), TDCBF_YES_BUTTON Or TDCBF_NO_BUTTON, cLang.GetString(2001), cLang.GetString(2000), TD_WARNING_ICON, Me.hwnd) <> TDCBF_YES_BUTTON Then
' Cancel = True
' End If
' End If
End Select
.HighLight = flexHighlightNever
Debug.Print "ValidateEdit = Cancel: " & CStr(Cancel)
Debug.Print "ValidateEdit = EditRow: " & CStr(.EditRow)
Debug.Print "ValidateEdit = EditText: " & .EditText
Debug.Print "ValidateEdit = Text: " & CStr(.Text)
If Not Cancel Then
mIsDirty = True
'gpv(.EditRow) = X 'was aspno
End If
End With
End Sub
I still get the same result. Let me repeat, with some detail what happens:
I double click on a sell to put it in edit mode. This highlights the current value (5 in this case) and I type to change it to 8.
I then press Enter and this fires the ValidateEdit event, where the value 8 is considered to be outside of allowed range, and
The cell value does not switch back to its original value of 5 but stay at 8, and the cursor and focus seems to stay in the cell.
I note one significant different when looking at and comparing the Debug messages in the code above, they have changed and it seems like the validate event fires twice actually.
Code:
BeforeEdit = Reason: 4
BeforeEdit = Text: 5
ValidateEdit = EditText: 8
ValidateEdit = EditRow: 1
ValidateEdit = Cancel: True
ValidateEdit = EditRow: 1
ValidateEdit = EditText: 8
ValidateEdit = Text: 5
ValidateEdit = EditText: 8
ValidateEdit = EditRow: 1
ValidateEdit = Cancel: True
ValidateEdit = EditRow: 1
ValidateEdit = EditText: 8
ValidateEdit = Text: 5
Interestingly, the .Text value is now set back to 5 but the actual cell doesn't seem to be updated but continues to display 8.
Ok this should give you a bit more to go on.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
It is intended that a Cancel = True on ValidateEdit event will only keep your cursor or mouse in the cell, giving the user a chance to amend current input.
It's your choice to call .CancelEdit or resetting the text and remain in edit mode, .EditText = .Text in the event.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Hi Krool, You who are an expert in user control believe that your user control:
You can add properties such as:
1.- Sort in ascending and descending order by clicking on the column header.
2.- Add an Extendedlastcol similar to that of VsFlexgrid8.
3.- Add some function so that the grid at runtime or design time acquires the Windows theme regardless of the version.
4.- That the selected row is Windows 7 style.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Does this work in Excel? Does anyone have an example of how to get this up and running in an Excel form? Thank you!
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
southmark
Does this work in Excel? Does anyone have an example of how to get this up and running in an Excel form? Thank you!
It would work in 32-bit Excel but not 64-bit Excel. At least until I finish porting it.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
R.J. Dunnill
It would work in 32-bit Excel but not 64-bit Excel. At least until I finish porting it.
I have 32-bit Excel, but how do I go about adding and using it? I added a reference to the ocx and tlb but cannot see a control to add to the palette in the form builder. What are the steps please?
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
southmark
I have 32-bit Excel, but how do I go about adding and using it? I added a reference to the ocx and tlb but cannot see a control to add to the palette in the form builder. What are the steps please?
You don't need to reference ocx and tlb.
Just right click add.. on the control toolbox for VBFlexGrid.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
You don't need to reference ocx and tlb.
Just right click add.. on the control toolbox for VBFlexGrid.
Hi Krool, thanks for the response. I don't see the vbflexgrid in the toolbox. I don't have permissions to run regsvr32 on vbflxgrd14.ocx which was why I was hoping adding a reference to the ocx would do the trick. What am I missing here please?
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
The OCX needs to be registered on your machine before you can use it from VBA.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
How might I install the OCX control without admin rights? Anyone?
I got rights temporarily, ran regsvr32 and verified that the control works - awesome!
I then experimented with the Microsoft Regcap tool to capture a registry file.
`RegCap /O vbflxgrd14.reg vbflxgrd14.ocx`
I edited the file to change instances of HKEY_CLASSES_ROOT to HKEY_CURRENT_USER\Software\Classes as per a number of references. I also added the 'Windows Registry Editor Version 5.00' header line to the registry file. When run it was reported to have completed successfully.
However, the control is not enabled in the control toolbox unless I again run regsvr32 as admin. Still investigating but it would be great to hear from someone who got this working.
Thank you!
Quote:
Originally Posted by
Krool
You don't need to reference ocx and tlb.
Just right click add.. on the control toolbox for VBFlexGrid.
Quote:
Originally Posted by
Arnoutdv
The OCX needs to be registered on your machine before you can use it from VBA.
Thank you both for the replies. It had been a long time since I'd used VBA! Krool, this was amazingly single to switch out the microsoft control for, amazing project!
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Dear Krool, how can I upload a 15 mb file, I have some modifications made to vbflexgrid and I would like to upload the file
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
@lilizanodiaz: You can use github like this
1. Clone the repo at https://github.com/Kr00l/VBFLXGRD
2. Rebase your changes on latest version of the sources
3. Create Pull Request and explain what's been done so far
Don't expect anyone to wade through 15MB of changes to merge anything (potentially a "gem") into main branch.
cheers,
</wqw>
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Dear Krool, I already attached it to github in the following path: lizanodiaz/vbflexgrid.
Please I would like you to adapt it to your vbflexgrid and thus be able to obtain a more complete and powerful Grid
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Krool, am I correct in that version 1.5 is not a strait drop in replacement for version 1.4 (which I use currently) in my project? With strait I mean; looking at the form in a text editor where 1.4 has the class name "VBFLXGRD14.VBFlexGrid" I assume 1.5 will be "VBFLXGRD15.VBFlexGrid"?
In such case, would the proper upgrade path be to first register 1.5 on the developer machine and then manually edit all the forms in a text editor (changing class names), before starting my project(s) or is the a simpler and smoother way?
BTW I'm not a fan of this naming scheme of controls but I guess you have your reasons. As long as there are no broken interfaces for backward compatibility... I cannot see any good reason. Not crisism, just feedback ;-)
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Ok, this is how I ended up upgrade from version 1.4 to 1.5 and I cannot really see any other way to do it.
1. After unpacking the zip, open an elevated command window and register the ocx: # regsvr32 VBFLXGRD15.OCX
2. Open project and add component "VB FlexGrid Control 1.5": Ctrl+T or menu Project->Components
3. Add an instance of the new control to a form as a placeholder, Save and Close the project.
4. Open the form (with added control) in your favorite text editor. Search for all instances of the previous control e.g. VBFLXGRD14, in all form files. I use Notepad++, Search in files for this, which gives me a sub window with a line for each instance.
5. Note at the top of the (placeholder control) form, a line starting with "Object = " ... ending with "VBFLXGRD15.OCX". Copy this line to the clipboard.
6. Now look for same line but ending with "VBFLXGRD14.OCX" and replace this line (or delete if present in place holder form) with the one you saved to clipboard. Do this in all forms. If using NP++ just double click the (Object = ) line and the file will open with VBFLXGRD14 highlighted. IMPORTANT. Replace the whole line, not just VBFLXGRD14, as this version has a new GUID value.
7. Now iterate through the forms again and replace the control instances, by replacing VBFLXGRD14 with VBFLXGRD15
8. Special attention with the project vbp file, find the "Object=" for VBFLXGRD14 and replace it with the VBFLXGRD15 one you save to clipboard earlier, but... pay attention, format is slightly different; no spaces around = and no ", remove these. Check with the other Object items there is uncertain about format.
9. Save and close all form files, open your project in VB6, remove the place holder control and your project is upgraded.
I hope this will help someone.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
[deleted, (dunno how to delete a post)]
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
7edm,
I have a utility https://www.vbforums.com/showthread....ompile-Utility that automates updating VBFlexGrid and VBCCRxx that easily handles moving to newer versions. Let me know what you think of it...
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Hi, Krool. Thank you for your last updates of the STD EXE version, but I can't find these properties in the ActiveX 1.6.35 version:
- ColComboCue;
- ColLookup;
- EditLocked.
Best regards,
Nouyana.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Nouyana
Hi, Krool. Thank you for your
last updates of the STD EXE version, but
I can't find these properties in the ActiveX 1.6.35 version:
- ColComboCue;
- ColLookup;
- EditLocked.
Best regards,
Nouyana.
They will come in future in a 1.7 version.
Until that some more other features may be added..
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
R.J. Dunnill
It would work in 32-bit Excel but not 64-bit Excel. At least until I finish porting it.
great job!! I'm looking forward to the ocx control for 64 bit
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
Version 1.7 released.
Dear krool, you have done an impressive job creating this control, I have applied it in an old project (32 bits) and it worked perfectly.
Although I need to bring that project to win64, will you release the OCX control for that platform?
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
caesar_cat
Dear krool, you have done an impressive job creating this control, I have applied it in an old project (32 bits) and it worked perfectly.
Although I need to bring that project to win64, will you release the OCX control for that platform?
We need tB (twinBASIC) for that.
The 1.7 project is already ported to tB and works in x64.
Though it's experimental as tB is still BETA.
-
Re: [VB6] ActiveX VBFlexGrid (Replacement of the MSFlexGrid control)
Quote:
Originally Posted by
Krool
We need tB (twinBASIC) for that.
The 1.7 project is already ported to tB and works in x64.
Though it's experimental as tB is still BETA.
I understand, I hope you will soon surprise us with this OCX ready to work on x64, as well as the VBCCR :bigyello: