-
Feb 3rd, 2023, 11:41 AM
#801
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Is there a "test suite" for VbFlecGrid, which use all properties/methods? I though that this will be as a reference for those who want to get the most from this control.
-
Feb 4th, 2023, 01:29 PM
#802
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
Included the ShowScrollTips feature. The feature is most useful when the ScrollTrack property is set to False.
The demo project is updated to demonstrate usage of the ScrollTip event.
Code:
Private Sub VBFlexGrid1_ScrollTip(ByVal Row As Long, ByVal Col As Long)
If Row > -1 Then
VBFlexGrid1.ScrollTipText = "Row " & VBFlexGrid1.TextMatrix(Row, 0)
ElseIf Col > -1 Then
VBFlexGrid1.ScrollTipText = "Column " & VBFlexGrid1.TextMatrix(0, Col)
End If
End Sub
If you prefer that the scroll tip follows the thumb as the user scrolls set the ScrollTipFollowThumb property to True.
-
Feb 6th, 2023, 05:22 AM
#803
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I'd love to have a property that shows the status of the scrollbars, e.g. isScrollbarvisible = vbSBNone, vbBoth etc.
While the state of the scrollbar can be calculated by the app, the data is already in the grid, so why not make it easy.
Another issue is the behavior with many rows and sorting. It should be a doEvent (or maybe an other solution) to prevent the app from showing a non responding window titlebar. A grid with 60k records or more can freeze for minutes, and the user may not know that the sorting is still active and press repeatedly keys or clicks close.
I solved this in my private version of the grid with a property HandleDoEvents()= True or False to allow the grid a DoEvents while sorting or not.
Code:
'*Seniorchef
Public Property Get HandleDoEvents() As Boolean
HandleDoEvents = PropDoEvents
End Property
Public Property Let HandleDoEvents(ByVal Value As Boolean)
PropDoEvents = Value
UserControl.PropertyChanged "HandleDoevents"
End Property
'*End Seniorchef
Private Sub MergeSortRec(ByVal Left As Long, ByVal Right As Long, ByVal Col As Long, ByRef Data() As TCOLS, ByVal Sort As FlexSortConstants)
Dim Middle As Long
Static xTimer As Single
Middle = (Left + Right) \ 2
If Left < Right Then
Call MergeSortRec(Left, Middle, Col, Data(), Sort)
Call MergeSortRec(Middle + 1, Right, Col, Data(), Sort)
Call InplaceMergeSort(Left, Middle, Right, Col, Data(), Sort)
'*Seniorchef
'Every 250 ms a Doevents() to Prevent not respondig Control
If PropDoEvents Then
If Timer - xTimer > 0.25 Then
DoEvents
xTimer = Timer
End If
End If
'*End Seniorchef
End If
End Sub
Maybe the property HandleDovents() stores an intervall of milliseconds instead of a boolean value, where 0 disables DoEvents.
Of course, the calling app has to ensure that nothing weird happens while the grid processes its doEvents.
-
Feb 6th, 2023, 11:50 AM
#804
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by Seniorchef
I'd love to have a property that shows the status of the scrollbars, e.g. isScrollbarvisible = vbSBNone, vbBoth etc.
While the state of the scrollbar can be calculated by the app, the data is already in the grid, so why not make it easy.
Another issue is the behavior with many rows and sorting. It should be a doEvent (or maybe an other solution) to prevent the app from showing a non responding window titlebar. A grid with 60k records or more can freeze for minutes, and the user may not know that the sorting is still active and press repeatedly keys or clicks close.
I solved this in my private version of the grid with a property HandleDoEvents()= True or False to allow the grid a DoEvents while sorting or not.
Code:
'*Seniorchef
Public Property Get HandleDoEvents() As Boolean
HandleDoEvents = PropDoEvents
End Property
Public Property Let HandleDoEvents(ByVal Value As Boolean)
PropDoEvents = Value
UserControl.PropertyChanged "HandleDoevents"
End Property
'*End Seniorchef
Private Sub MergeSortRec(ByVal Left As Long, ByVal Right As Long, ByVal Col As Long, ByRef Data() As TCOLS, ByVal Sort As FlexSortConstants)
Dim Middle As Long
Static xTimer As Single
Middle = (Left + Right) \ 2
If Left < Right Then
Call MergeSortRec(Left, Middle, Col, Data(), Sort)
Call MergeSortRec(Middle + 1, Right, Col, Data(), Sort)
Call InplaceMergeSort(Left, Middle, Right, Col, Data(), Sort)
'*Seniorchef
'Every 250 ms a Doevents() to Prevent not respondig Control
If PropDoEvents Then
If Timer - xTimer > 0.25 Then
DoEvents
xTimer = Timer
End If
End If
'*End Seniorchef
End If
End Sub
Maybe the property HandleDovents() stores an intervall of milliseconds instead of a boolean value, where 0 disables DoEvents.
Of course, the calling app has to ensure that nothing weird happens while the grid processes its doEvents.
Thanks for feedback.
You can simply use GetWindowLong and check for existence of WS_VSCROLL/WS_HSCROLL.
If it's there then it's visible. IMO we don't need properties/functions for everything. It's fairly practical in this case.
About Sort.. well DoEvents is considered as Evil.
So I could offer a "SortTick" event.
A new property "SortTimer As Long" would tell the sort function to install a timer before processing with the given value as milliseconds.
The sorting function then ensures to PeekMessage WM_TIMER internally.
If SortTimer is 0 (default) it's disabled.
This way you could make your DoEvents in the SortTick event.
Is that an idea or stupid?
EDIT: or better just track GetTickCount inside the sorting and raise SortTick if it's due. I think that is ligher with less overhead.
Last edited by Krool; Feb 6th, 2023 at 12:03 PM.
-
Feb 6th, 2023, 12:27 PM
#805
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Don't use timer, just raise the event passing two variables, a Cancel and a Skip. Cancel true to stop sorting, and Skip true to not sorting now but command will be in use. So when the list is short, we do not use the event, and always the sort happen. For larger lists let the user handle it. The Skip flag means we have something other in process, so wait until that process end to continue.
Last edited by georgekar; Feb 7th, 2023 at 01:19 PM.
-
Feb 7th, 2023, 02:31 AM
#806
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Thanks for your answers.
@Krool - you're right, I'm also not a friend of too many "extrawürste". So, ok, I'll try your approach.
@GeorgeKar - It is not to allow another process to jump in or to stop the sorting, it is to enable the OS to process eg. users keystrokes (ESC) or mouseclicks and show a message without interrupting the sort. Some users tend to press keys all over again because there is no feedback (while the sorting is still in progress) and finally stop the running app with the taskmanager or the "wait or kill?"-query.
DoEvents is evil - I know. I still use it in certain circumstances, especially to keep the UI alive while processing time consuming subs.
And it's the only way I know to prevent the app's window from being grayed out by the OS (I'm not a expert in subclassing neither do I know the abyss of the API). Or am I wrong?
The GetTickCount in conjunction with raiseevent()is a good idea (I tested something similar before I made my first Post, and it didn't work -maybe I missed something).
I will give it another try and: I'll be back.
Greetings
Last edited by Seniorchef; Feb 7th, 2023 at 02:46 AM.
-
Feb 7th, 2023, 02:53 AM
#807
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Ok, I tested the Event - and it works for me.
I added a RaiseEvent SortTick() and placed a DoEvents in my app in the event handler and Tataa - it's what I need.
As I don't want to stop the sorting, it is up to you to add a Cancel to the Event. For the sake of completeness it would be better. And a timer for the SortTick would also be convenient.
Thanks and
Greetings
-
Feb 7th, 2023, 01:17 PM
#808
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
To not get Gray Window use this:
Private Declare Sub DisableProcessWindowsGhosting Lib "user32" ()
At sub main call DisableProcessWindowsGhosting and forget the gray window..
You say:
It is not to allow another process to jump in or to stop the sorting, it is to enable the OS to process eg. users keystrokes (ESC) or mouseclicks and show a message without interrupting the sort
But you have the tools to make not to do anything. Just use events to mark the start and end of the sort and at the "Start mark" disable the form, and enable it at the end (if it is time consuming sort).
The best for me would be to choose for time consuming work to display a wait message, with pause/cancel buttons, and not allow user to click anything else but the cancel/ pause key.
-
Feb 7th, 2023, 01:44 PM
#809
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
@georgekar - you're right. Honestly, I didn't know the DisableProcessWindowsGhosting, so I will learn to use it. That is a good piece of advice.
Thanks and greetings
-
Feb 7th, 2023, 10:25 PM
#810
Addicted Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by georgekar
To not get Gray Window use this:
Private Declare Sub DisableProcessWindowsGhosting Lib "user32" ()
At sub main call DisableProcessWindowsGhosting and forget the gray window..
...
Thanks Georgekar. I have never come across anywhere anybody mentioning about this API so far. Sounds so unique.
Kind Regards.
-
Feb 7th, 2023, 10:33 PM
#811
Addicted Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by softv
... .. . When I tried to increase the 'RowHeight' (say, in 'EditKeyUp' event - of any editable cell, not necessarily ComboEditable cell) to be in accordance with the 'TextHeight' of the contents of the cell in which I am editing and entering more content, the redrawing of the cell in accordance with the changed row height was not happening. Please see reference screenshot below. The 2nd line ('is my name') is what I have entered extra. The first line ('Arnold') is hiddden above it. These 2 lines are the actual contents of the cell. The 'Arnold' at the bottom you see in the sreenshot is actually not what I typed. This 'Arnold' is the original content (before I added 'is my name') appearing still at the bottom, along with a repeated ComboCue indicator (since the cell's and combocue's redrawing have not taken place, I believe).
I looked into the control's code and saw a DrawCell method. So, I did try giving .CommitEdit and .StartEdit one after the other whenever I changed the RowHeight but I was not able to place the cursor at the correct editing point again. Please guide me as to how to achieve what I wish for. May be the way I am adopting to change the RowHeight is not the correct way to do it. Kindly help.
...
Any ideas from you Krool? Or, from Georgekar, Seniorchef? Kindly guide and help, when possible.
Kind Regards.
Last edited by softv; Feb 7th, 2023 at 10:39 PM.
-
Feb 8th, 2023, 06:08 AM
#812
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I never use editing in place for VBFlexGrid. Before I will update VBFlexGrid I do a enable=false, so no redrawing happen. Then I make the update and then VBFlexGrid1.Enabled = True and VBFlexGrid1.Refresh. I always use a private variable busy as boolean, so in any event handling sub I have If busy then exit sub (so I am not disable controls like commandbutton type for a busy work).
So your problem is that you want more things that the VBFlexGrid can do, like to auto update and redraw according the desired height. So to check it split the process, to a placeholder outside the Grid, where you edit the value to be insert, maybe two ore more lines of text, and then disable Grid, update it, enable it and refresh it.
-
Feb 8th, 2023, 06:30 AM
#813
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by softv
Any ideas from you Krool? Or, from Georgekar, Seniorchef? Kindly guide and help, when possible.
Kind Regards.
There is already an internal helper "UpdateEditRect". It currently only moves (SWP_NOSIZE used) but that could be enhanced relativ quickly to also include sizing.
It's used for the moment only when scrolling occurs. (auto update)
The more discussion part is whether to "auto update" on various places, e.g. RowHeight/ColWidth property (and possible more) or to just "auto update" when calling .Refresh ?
I personally do like the "Refresh" solution better. What do you mean ? (the scrolling auto update would remain though)
 Originally Posted by Seniorchef
Ok, I tested the Event - and it works for me.
I added a RaiseEvent SortTick() and placed a DoEvents in my app in the event handler and Tataa - it's what I need.
As I don't want to stop the sorting, it is up to you to add a Cancel to the Event. For the sake of completeness it would be better. And a timer for the SortTick would also be convenient.
I am hesitating with this. It involves extra code in the sort routines.
For the bubble sort (custom sort only) it's practical but for the merge sort it would involve at various places to allow good resolution.
-
Feb 8th, 2023, 08:45 AM
#814
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
You should now be able to call .Refresh after your .RowHeight() change and the edit window will fit to the new situation.
-
Feb 8th, 2023, 08:45 AM
#815
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I am hesitating with this. It involves extra code in the sort routines.
For the bubble sort (custom sort only) it's practical but for the merge sort it would involve at various places to allow good resolution.
Yes, i see. That's why I used the timer and the positioning in the MergeSortRec().
As I understand this code, the MergeSortRec() is called recursively 'til the end of the splitting of the array. The static var xTimer counts on every recursion and the event should, with my sample code, be raised almost regularly. I put the code in my copy of the control and it works. Of course, the code in the MergeSortRec()-Sub to skip the checking of the event must be as short as possible.
Here's my code
Code:
Private Sub MergeSortRec(ByVal Left As Long, ByVal Right As Long, ByVal Col As Long, ByRef Data() As TCOLS, ByVal Sort As FlexSortConstants)
Dim Middle As Long
Dim Cancel As Boolean
Static xTimer As Single
Middle = (Left + Right) \ 2
If Left < Right Then
Call MergeSortRec(Left, Middle, Col, Data(), Sort)
Call MergeSortRec(Middle + 1, Right, Col, Data(), Sort)
Call InplaceMergeSort(Left, Middle, Right, Col, Data(), Sort)
'Every x ms a RaiseEvent() to process calling apps DoEvent
If PropSortTickIntervall > 0 Then
If (Timer - xTimer) * 1000 > SortTickIntervall Then
RaiseEvent SortTick(Cancel)
xTimer = Timer
End If
End If
End If
End Sub
This is only an idea that works for me. I don't bother if this feature is not included in the grid as long as I can implement it by myself. It was a suggestion.
The Custom sort has no need for this feature as there is already an event to be custom the can be used for this purpose, too.
-
Feb 8th, 2023, 08:55 AM
#816
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Another thing came to my attention:
I use the event "BeforeUserResize()" to throw a Cancel when a column must not be resized.
Works fine but that leads to a click_event on that column (and that leads to a sorting of the column in my app)
I think the cancelled UserResize() should not lead to a click_event. Either the column is resized or not, nothing else.
In my code, I have to set a flag to ignore the first click after a BeforeUserResize().
Greetings
-
Feb 8th, 2023, 09:05 AM
#817
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by Seniorchef
Another thing came to my attention:
I use the event "BeforeUserResize()" to throw a Cancel when a column must not be resized.
Works fine but that leads to a click_event on that column (and that leads to a sorting of the column in my app)
I think the cancelled UserResize() should not lead to a click_event. Either the column is resized or not, nothing else.
In my code, I have to set a flag to ignore the first click after a BeforeUserResize().
Greetings
I see, will check.
But you can also use the new ColResizable() property. This goes deeper and even not shows a resize cursor.
-
Feb 8th, 2023, 09:31 AM
#818
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by Seniorchef
Another thing came to my attention:
I use the event "BeforeUserResize()" to throw a Cancel when a column must not be resized.
Works fine but that leads to a click_event on that column (and that leads to a sorting of the column in my app)
I think the cancelled UserResize() should not lead to a click_event. Either the column is resized or not, nothing else.
In my code, I have to set a flag to ignore the first click after a BeforeUserResize().
Greetings
Fixed. Thanks
-
Feb 8th, 2023, 09:38 AM
#819
Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Thanks and I have a look at the ColResizeable() property.
Back to my sample code in post #815. The cancel in the event is a leftover from my tests and has no effect in the sample. I do not need a Cancel as I don't want to interrupt the sort. Sorry for this inconvenience.
Greetings
-
Feb 8th, 2023, 09:43 AM
#820
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by Seniorchef
Thanks and I have a look at the ColResizeable() property.
Back to my sample code in post #815. The cancel in the event is a leftover from my tests and has no effect in the sample. I do not need a Cancel as I don't want to interrupt the sort. Sorry for this inconvenience.
Greetings
Well. On a second thought one could use the CustomText sort. Which supplies only Text1/Text2 instead of Row1/Row2 but it uses the MergeSort. So there you could do the timer and DoEvents. Only draw back is you need to compare yourself.
-
Feb 8th, 2023, 10:15 AM
#821
Addicted Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by Krool
Update released.
You should now be able to call .Refresh after your .RowHeight() change and the edit window will fit to the new situation.
Thanks a TON, Krool. It works quite well. I did not see any issues.
Great!
Kind Regards.
-
Feb 19th, 2023, 09:47 AM
#822
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hi Krool, maybe a little bug?
If i set the grid as read only:

I can check and uncheck a cell created with .cellchecked = 0
I will check if i'm using your last version now (i think yes)
Edit:
Checked, i can still check/uncheck the cell with the last version
Last edited by Calcu; Feb 19th, 2023 at 09:52 AM.
-
Feb 19th, 2023, 09:58 AM
#823
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by Calcu
Hi Krool, maybe a little bug?
If i set the grid as read only:
I can check and uncheck a cell created with .cellchecked = 0
I will check if i'm using your last version now (i think yes)
Edit:
Checked, i can still check/uncheck the cell with the last version
That's intended. You can check/uncheck even when AllowUserEditing is False.
You can avoid this by .CellChecked = FlexDisabledUnchecked/Checked or by Cancel = True on the CellBeforeCheck event.
-
Feb 19th, 2023, 01:27 PM
#824
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
-
Feb 22nd, 2023, 03:48 AM
#825
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Updated released.
New ColCheckBoxes property to have predefined checkboxes in a column.
All FlexNoCheckBox values are mapped as FlexUnchecked.
This makes it easier to add new rows and automatically have new unchecked checkboxes.
Also included GetChecked/SetChecked to the IVBFlexDataSource2 interface to enable to have virtual checkboxes.
To avoid extra overhead here this feature is enabled only when ColCheckBoxes is set to true for the column.
And of course FlexDataSourceChecked must be returned on IVBFlexDataSource2::GetFlags.
ColCheckBoxes and IVBFlexDataSource2 work in conjunction but are still independent. So ColCheckBoxes can be used without IVBFlexDataSource2.
EDIT: Added FlexNoCheckBoxEver enum to FlexCheckBoxConstants as it can be useful to exclude individual cells for ColCheckBoxes. (e.g. for frozen rows)
Fixed rows are always excluded and must be set explicitly.
Last edited by Krool; Feb 22nd, 2023 at 07:21 AM.
-
Mar 1st, 2023, 05:40 AM
#826
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
ColFormat always applied to whole column. (like vsFlexGrid)
However, it can be safer sometimes to disable formatting on the fixed cells. So the new FixedFormat property can be used.
But you must apply "" and not vbNullString. If the StrPtr() is 0 then FixedFormat inherits from ColFormat.
Furthermore the internal GetLabelInfo respects now the text display. Also the AutoSize method respects the text display now.
-
Mar 1st, 2023, 09:20 AM
#827
Frenzied Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
In WIN11 operating system, it cannot be compiled into EXE, and finally it will prompt crash information such as unreadable memory
-
Mar 10th, 2023, 01:48 PM
#828
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
HI all,
A little question, the checkbox color can be changed ?
the cellforecolor is not working on a cell with a checkbox, i want a greeen checkbox when checked and a red one when it's not checked.
It's possible?
-
Mar 12th, 2023, 11:17 AM
#829
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by Calcu
HI all,
A little question, the checkbox color can be changed ?
the cellforecolor is not working on a cell with a checkbox, i want a greeen checkbox when checked and a red one when it's not checked.
It's possible?
I don't understand what you mean? Can you ilustrate by a picture how a checkbox with acertain forecolor would look like.
-
Mar 12th, 2023, 02:40 PM
#830
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Sure:

Done quick with paint xD
In red when checkbox not checked.
Green when checked
The last one is untouched (i just painted the 3 first)
-
Mar 12th, 2023, 03:52 PM
#831
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by Calcu
Sure:
Done quick with paint xD
In red when checkbox not checked.
Green when checked
The last one is untouched (i just painted the 3 first)
Hmm.. could be solved by an oppurtinity to have an OwnerDraw event for the checkboxes? So you could draw them yourself how you want.
-
Mar 12th, 2023, 05:24 PM
#832
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
i think it could be perfect
-
Mar 13th, 2023, 04:01 PM
#833
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Update released.
CheckBoxDrawMode property (run-time only) included with related CheckBoxOwnerDraw event.
The Row/Col parameter in the CheckBoxOwnerDraw event enables to draw certain columns differently for instance.
When the Cancel As Boolean parameter is set to True the default check box drawing will be done. This enables to only owner draw certain columns effectively.
The ItemState parameter is convenient to draw different states of the check box.
It can be ODS_CHECKED, ODS_GRAYED, ODS_HOTLIGHT and/or ODS_DISABLED.
The viewport is always 0, 0.
-
Mar 17th, 2023, 04:48 AM
#834
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hi all, another question.
Anybody else is suffering ide hangs ?
I mean, when I change code on a form with a vbglexgrid on it, and execute it, works fine, then I change some code (not from the grid, it can be an sql for example), on the form that contains the grid, I execute my program on the IDE, and when I load the form with the grid, it hangs.
I have to start visual basic again and then it works fine the first time, but it hangs if I start the program for a second time.
It's just me ?
-
Mar 17th, 2023, 05:31 AM
#835
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by Calcu
Hi all, another question.
Anybody else is suffering ide hangs ?
I mean, when I change code on a form with a vbglexgrid on it, and execute it, works fine, then I change some code (not from the grid, it can be an sql for example), on the form that contains the grid, I execute my program on the IDE, and when I load the form with the grid, it hangs.
I have to start visual basic again and then it works fine the first time, but it hangs if I start the program for a second time.
It's just me ?
The VBFlexGrid has no subclassing in IDE. Thus it shall be IDE safe.
Can you bundle an isolated demo proofing it? Maybe some other things involved in your form causes problem.
-
Mar 17th, 2023, 09:56 AM
#836
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I will try to.
what i can see is:
this is how a normal grid is displayed on IDE:

And when i change something AND save my project, then it displays this way:

If i start the project and go to any form with a Grid on it... IDE hangs and it closes.
I will try to create an small project and try if it hangs too.
-
Mar 19th, 2023, 05:38 AM
#837
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hi again,
I was thinking.. maybe i'm doing the things wrong?
What i'm doing is adding all the modules / controls /etc to my project (and it works)
Maybe i should add the whole project to my project? I tried, but if i set the property public to true, i have an error when adding the control to a form about :
Compile Error: "Private object modules cannot be used in public object modules..
Then... what is the best way to use this project? like i'm doing or.. there is another way ?
Edit1:
Uh...
I found that:
1.- adding whole project to mine (with add project)
2. changing the vbflexgriddemo project properties to control ActiveX
3.- setting to true the public property of the control
4.- setting the instance porp. to 6-globalmultiuse in both clas modules
it seems to work fine in my project?
It's then the best way to add this control to a project ?
Edit2.. no it's not working something else i need to do in order to use this way
Edit3: (sorry xD) Well finally it worked this way, adding the whole project to my project.
I will try to use this way in order to see if not more hangs on IDE when starting / closing it.
But, can you tell me if it's this the right way of using your control? thanks!
Last edited by Calcu; Mar 19th, 2023 at 07:45 AM.
-
Mar 19th, 2023, 09:54 AM
#838
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by Calcu
Hi again,
I was thinking.. maybe i'm doing the things wrong?
What i'm doing is adding all the modules / controls /etc to my project (and it works)
Maybe i should add the whole project to my project? I tried, but if i set the property public to true, i have an error when adding the control to a form about :
Compile Error: "Private object modules cannot be used in public object modules..
Then... what is the best way to use this project? like i'm doing or.. there is another way ?
Edit1:
Uh...
I found that:
1.- adding whole project to mine (with add project)
2. changing the vbflexgriddemo project properties to control ActiveX
3.- setting to true the public property of the control
4.- setting the instance porp. to 6-globalmultiuse in both clas modules
it seems to work fine in my project?
It's then the best way to add this control to a project ?
Edit2.. no it's not working something else i need to do in order to use this way
Edit3: (sorry xD) Well finally it worked this way, adding the whole project to my project.
I will try to use this way in order to see if not more hangs on IDE when starting / closing it.
But, can you tell me if it's this the right way of using your control? thanks!
There is a separate Ax version (OCX). See link in 1. post on this thread.
-
Mar 19th, 2023, 12:40 PM
#839
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
I know, but when I need to update it, it's better using it embedded in my soft.
It seems, that is working fine when I created the group of programs in vb6
Edit:
I did more tests (i inform just to see if maybe you/somebody has an idea).
Created New Project.
Added everything again (forms, modules, controls, everything from the old one).
Everything works fine, no hangs in IDE.
Then if i write anything in a form with no grid, and save, everything stills fine.
BUT if i modify a form that has a grid, and SAVE the project, when i load the project again and enter in a form that has a grid, it hangs.
In the windows events it created an error event:
Code:
Nombre de la aplicación con errores: VB6.EXE, versión: 6.0.97.82, marca de tiempo: 0x403acf6c
Nombre del módulo con errores: unknown, versión: 0.0.0.0, marca de tiempo: 0x00000000
Código de excepción: 0xc000041d
Desplazamiento de errores: 0x0968813f
Identificador del proceso con errores: 0x30cc
Hora de inicio de la aplicación con errores: 0x01d95b25eb387a57
Ruta de acceso de la aplicación con errores: C:\VB98\VB6.EXE
Ruta de acceso del módulo con errores: unknown
Nombre completo del paquete con errores:
Identificador de aplicación relativa del paquete con errores:
Last edited by Calcu; Yesterday at 08:43 AM.
-
Junior Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
Hi again, sorry for the monologue.
Found when it hangs:

If i stop the program at this line, and then i press F8, it hangs.
I will try to find if i have any api in conflict with it, but any ideas will be welcome.
Thanks in advance
Last edited by Calcu; Today at 04:08 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|