the event ModifyTipText works now as expected with the new update!
Originally Posted by Krool
So a flag in the property bag is anyhow needed. But of course the drawback will always then be that it would only work on new image list set's.
Open question: Handling this issue? Or just keep it as it is as this obstacle was put up by MS.
i vote for the new flag at the property bag!
this will avoid the app crash under winxp!
I use the ListView in Report Mode with multiple columns and i want that the user can edit the cell of every column (subitems).
LabelEdit = True let me only edit the cell of the first column.
Is it maybe possible to add a LabelEdit for all columns?
I also tried to write my own LabelEdit-handler for subitems
but the Event ItemDblClick(ByVal Item As VBCCR16.LvwListItem, ByVal Button As Integer)
only returns a DblClick of the first column item.
Is it possible to enhance the Event ItemDblClick to return subitems too?
Last edited by Mith; Feb 16th, 2019 at 09:57 PM.
Reason: added more information
Re: CommonControls (Replacement of the MS common controls)
Krool,
I thought I would give my VB6 OCX form control a try in Wine. I was surprise it work since I haven't had much luck with VB6 and Wine in the past. This form is using your CCR OCX which works fine under standard Windows but for some reason the checkbox background is black. The other controls seem to render and theme okay.
Re: CommonControls (Replacement of the MS common controls)
Update released.
Replaced WM_CHANGEUISTATE with WM_UPDATEUISTATE in VisualStyles.bas.
This change was already done in ComCtlsBase.bas since a while. (use of WM_UPDATEUISTATE instead of WM_CHANGEUISTATE)
The difference between the two is (in short) the message travel direction. WM_CHANGEUISTATE travels the tree up, verifies if change is needed, and then issue WM_UPDATEUISTATE down the tree for all childs.
For our needs we want for SetupVisualStyles to have all child controls the needed ui state. So WM_UPDATEUISTATE is more direct and more performant.
Beside that, when using MDI child forms WM_CHANGEUISTATE will only work *once*. Because it travels up to the top-level window (MDI container form).
So next time a new MDI child form is open WM_CHANGEUISTATE will not issue WM_UPDATEUISTATE as the top-level window is already marked with the needed changes.
This is another argument why WM_UPDATEUISTATE is definitely better for VisualStyles.bas
Originally Posted by ScriptBASIC
I thought I would give my VB6 OCX form control a try in Wine. I was surprise it work since I haven't had much luck with VB6 and Wine in the past. This form is using your CCR OCX which works fine under standard Windows but for some reason the checkbox background is black. The other controls seem to render and theme okay.
Your screenshot looks like the typical VB.Frame theme bug
In the VisualStyles.bas this is fixed by redirecting WM_PRINTCLIENT message (for the black background drawing flaws) and WM_MOUSELEAVE (for some flicker) to DefWindowProc:
Code:
Private Function RedirectFrame(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long, ByVal uIdSubclass As Long, ByVal dwRefData As Long) As Long
Select Case wMsg
Case WM_PRINTCLIENT, WM_MOUSELEAVE
RedirectFrame = DefWindowProc(hWnd, wMsg, wParam, lParam)
Exit Function
End Select
RedirectFrame = DefSubclassProc(hWnd, wMsg, wParam, lParam)
If wMsg = WM_NCDESTROY Then Call RemoveRedirectFrame(hWnd, uIdSubclass)
End Function
Re: CommonControls (Replacement of the MS common controls)
You're right. My Windows 10 install of VB6 IDE isn't theming the executable's like they were under Windows 7. Do I need the SidebySide files? All I did was add VBCCR16.OCX to the project. I forgot how to enable theming since it's been so long since I set that up on Windows 7.
It's interesting theming works fine within the IDE but it's W2K look as an executable.
It took me while to get the instructions in your readme about OLEGuids to register. The file needed to go into SyWow64 rather then System32. Funny VB6 resource browser wouldn't even show the file even with *.*.
Appreciate any help or suggestions to refresh my memory.
Last edited by ScriptBASIC; Feb 19th, 2019 at 10:59 PM.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by ScriptBASIC
You're right. My Windows 10 install of VB6 IDE isn't theming the executable's like they were under Windows 7. Do I need the SidebySide files? All I did was add VBCCR16.OCX to the project. I forgot how to enable theming since it's been so long since I set that up on Windows 7.
It's interesting theming works fine within the IDE but it's W2K look as an executable.
It took me while to get the instructions in your readme about OLEGuids to register. The file needed to go into SyWow64 rather then System32. Funny VB6 resource browser wouldn't even show the file even with *.*.
Appreciate any help or suggestions to refresh my memory.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by ScriptBASIC
The file needed to go into SyWow64 rather then System32. Funny VB6 resource browser wouldn't even show the file even with *.*.
that's how Windows 10 (and 7) x64 works, it's actually only using SysWo64.
Also wasn't theming part of Aero which is removed from windows 10 (if I'm not mistaken). I never bothered with themes, was just too much hassle and to me it really didn't add anything to the application, I saw the problem with the black background with checkboxes and optionboxes in a competing application and it seems like it's got something to do with windowless controls (if I'm not mistaken).
Re: CommonControls (Replacement of the MS common controls)
Highlighting bug in monthview control 'Today' section?
- when mouse is over 'Today' last character is not highlighted 20.2.2019 -> 9
- when clicked today and mouse is out of 'Today' area last character 'stays' highlighted.
Tested in Windows 7x64, 10x64 finnish localized (fi locale = 1035) system, both has latest updates.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by ScriptBASIC
There is no InitVisualStyles function in VisualStyles.bas.
In the OCX project this is true. When you use the OCX in a EXE project then you shall use VisualStyles.bas from the first page in this thread from ComCtlsDemo.
Also on each Form_Load call SetupVisualStyles.
Re: CommonControls (Replacement of the MS common controls)
Krool,
I'm noticing other issues non-display related with trying to run VB6 apps / OCXs on Wine. I'm going to put this on the back burner till I have more time to trouble shoot the issues.
On a positive note my new laptop running Windows 10 with VB6 IDE / VS2008 installed is working great so far and that is where I would rather spend any free time I have to spare.
Thankls for your efforts with trying to get this going.
Re: CommonControls (Replacement of the MS common controls)
Krool's CommonControls is a great product set, and if it was released 10 years earlier, its value would be 10 times greater than it is now.
Since the release of Win8, the controls that come with Windows can meet the requirements of most VB6 UI designs. The need to use heavyweight custom CommonControls is not so urgent.
I once had the idea of rewriting Krool's CommonControls in a DUI way so that these controls could be made more lightweight, more flexible (using XML as the controls' configuration files), and easier to port to Linux (Wine).
Since there are fewer and fewer people using win desktop-apps, I gave up on this idea.
Edit:
Changing CommonControls to Dui-controls would be a huge benefit, and maybe Krool should take a look at this link:
Duilib: https://github.com/duilib/duilib
(use Google translator to translate Chinese into English)
The Windows APIs and Windows messages used in the DUI controls are identical to Krool's CommonControls, which means that a lot of code in Krool's CommonControls can still be reused in the DUI controls.
Last edited by dreammanor; Feb 22nd, 2019 at 11:04 PM.
Re: CommonControls (Replacement of the MS common controls)
Since there are fewer and fewer people using win desktop-apps, I gave up on this idea.
VB6 is a great way for me to create intelligent form OCX controls that the events call back to Script BASIC for processing. If I need cross platform then I use IUP for my GUI environment.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Tech99
Highlighting bug in monthview control 'Today' section?
- when mouse is over 'Today' last character is not highlighted 20.2.2019 -> 9
- when clicked today and mouse is out of 'Today' area last character 'stays' highlighted.
Tested in Windows 7x64, 10x64 finnish localized (fi locale = 1035) system, both has latest updates.
That's an issue from comctl32.dll. Nothing I can do about.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by dreammanor
Krool's CommonControls is a great product set, and if it was released 10 years earlier, its value would be 10 times greater than it is now.
It's never too late. If they decide to kill VB6 it will make at the end anyway no difference. And the idea is to just replace the stuff developed 10 or more years ago. (For example make an old app unicode aware)
But that concern about desktop app would slide to much into off-topic.
Originally Posted by dreammanor
Changing CommonControls to Dui-controls would be a huge benefit, and maybe Krool should take a look at this link:
Duilib: https://github.com/duilib/duilib
(use Google translator to translate Chinese into English)
The Windows APIs and Windows messages used in the DUI controls are identical to Krool's CommonControls, which means that a lot of code in Krool's CommonControls can still be reused in the DUI controls.
Re: CommonControls (Replacement of the MS common controls)
Bugfix in the StatusBar control concerning PanelClick.
Prior to bugfix the order in a double click sequence was:
Code:
panel click
mouse up
click
panel dbl click
dbl click
panel click
mouse up
The red marked part is not needed and also not happening in the original MS control.
The notification NM_CLICK is used for the PanelClick event. NM_DBLCLK for the PanelDblClick event.
However, NM_CLICK is also fired when NM_DBLCLK is generated.
To solve this issue it is necessary to detect a double click on NM_CLICK.
This is now done with help of GetDoubleClickTime(), GetSystemMetrics(SM_CXDOUBLECLK) and GetSystemMetrics(SM_CYDOUBLECLK) API.
EDIT: easier solution found. No need of GetDoubleClickTime(), GetSystemMetrics(SM_CXDOUBLECLK) and GetSystemMetrics(SM_CYDOUBLECLK) APIs anymore in StatusBar.
Re: CommonControls (Replacement of the MS common controls)
I am facing total instability in VBCCR16 through the last 7 months . I tried to post the problems here and could not go with any solution unfortunately . The fact that the problems I am facing can not be isolated in one single project and also can not be reproduced by a scenario . They simply happen occasionally with the same circumstances and sometimes they don`t .
This made me in some projects give up using VBCCR or using it in a small scale . I decided to check what could be wrong with my usage style for VBCCR , So , I have downloaded and read @MountainMan documentation for VBCCR . I followed all the instructions and started a new clean project and started to code again . Everything was ok and suddenly with no changes made to the last working copy of the project , the problems started to rise again and I changed nothing since it was last working .
The problem is vb6 crashes when I touch some VBCCR controls . I am using VBCCR in user controls mainly and not in forms directly .
I think this point needs investigation because not the majority here are using it in UserControls and this may explain why it is me the only one (or one of the minority) who is facing such problems .
Being not able to determine the problem because vb6 just crashes and shows me no clue why this happened , I was thinking it would be too easy for people to report problems and bugs if there was error handlers and reports within VBCCR . The only method I could preview my problems with VBCCR was by capturing my screen in a video and post it to youtube and pass the link here .
I need someone to chat with me instantly at any time he decides and discuss about these problems and post them here in a clear way .
problems :
1 - In the STDExe version . when I open it and run the project , VB6 crashes .
2 - I used the OCX version and : In usercontrols , VB6 crashes when I touch a user control that has a VBCCR text or listview within it .
3- Once I put a usercontrol on a form and this usercontrol has a listview in it , I can`t move the usercontrol by holding the listview in design time while I can do so by holding any other controls in the user control .
With these problems , I can get to that there is a problem with my usage for VBCCR in user controls . I have read that I should call SetupVisualStyles sub in the form_load event to make sure that all controls in a form can provide visual styles and this can not be done in user controls . If someone can help me implement the function SetupVisualStyles in a user control , this could be a good start and I will check what happens . I am thinking this may be the problem because these problems don`t happen in an unmanifisted IDE . Also I suspect the HwndUserControl Prpoperty although I am not using Hwnd or HwndUsercontrol in my code wheather in usercontrol or in forms .
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Krool
Do you mean ComCtlsDemo project?
yes krool .
Since I posted the above post , I have been trying t find the problem and I think I found something interesting . Give me half an hour and I will post a video .
Re: CommonControls (Replacement of the MS common controls)
@ Hosam AL Dein,
I might have just detected an instability which can causes crash in case a VBCCR control is hosted in another UserControl, but only in specific certain scenarios. (It's about references not being decremented)
I already have found the solution and await "approval" by the owner of the bug report.
Full story can be read there: https://github.com/Kr00l/VBCCR/issues/4
So I am quite sure this will fix maybe some issues which you struggle to replicate.
(I thought VTableHandle is now quite bullet proof. So I am quite confident that's THE last hole. )
But that being said, the ComCtlsDemo is certainly not effected by that bug. So I also suspect some corruption on your PC. Because the ComCtlsDemo ran on many other computers without a problem that I have tested.
sorry for lateness , I was facing some difficulties in video capturing and uploading .
the quality is a bit low . I will post it again in a higher quality and another video for comctlsdemo project
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Krool
@ Hosam AL Dein,
I might have just detected an instability which can causes crash in case a VBCCR control is hosted in another UserControl, but only in specific certain scenarios. (It's about references not being decremented)
I already have found the solution and await "approval" by the owner of the bug report.
Full story can be read there: https://github.com/Kr00l/VBCCR/issues/4
So I am quite sure this will fix maybe some issues which you struggle to replicate.
(I thought VTableHandle is now quite bullet proof. So I am quite confident that's THE last hole. )
But that being said, the ComCtlsDemo is certainly not effected by that bug. So I also suspect some corruption on your PC. Because the ComCtlsDemo ran on many other computers without a problem that I have tested.
I have read a little in this article , but I think it is a a part of the problem . This problem is referenced in my video in the first 6 minutes .
Re: CommonControls (Replacement of the MS common controls)
This is another video and shows ComCtlsDemo project crash behavior which is the same with my project . It also has the remaining explanation of the problem .
Re: CommonControls (Replacement of the MS common controls)
Have a look here krool , please .
I was trying to check if the previous issue only happens with usercontrols . So , I opened ComCtlsDemo after I removed most of the controls in MainForm with notepad . And the previous problem still exist even with the VBCCR controls placed directly on the form no only if they were hosted in a usercontrol .
I switched to my project to perform the same test but not with a usercontrol , but with VBCCR components placed directly on the form .But , another strange problem occured , VBCCR is not registered . I tried to re-register it and since then , the controls seemed strange . they were only gray and are not accessible as normal VBCCR components .
Re: CommonControls (Replacement of the MS common controls)
No krool , not yet . But regardless of the registration issue which appeared last , what about the issue related to the number of controls on a form ? Is it the same behavior on someone`s machine ? and if not , what could be the reason for it , especially that this crash occurred with me over the last 7 months with different new win10 setups . All were 64 bits by the way .
What could be wrong with my machine but only affects projects including VBCCR ?
should I post my event log of the error ? may it be helpful ?
could it be the copy of VB6 setup package I use ? because in the VB98 path I find ocx`s and dll`s which were not registered by me since the last VB6 setup I have made , like VBCCR14 and 15 and I did not open any projects containing these versions of VBCCR ocx .
Can you pass me a link of clean VB6 setup package ?
What makes me too worried about these problems is that I am committed to deliver a working copy of a large POS within the end of march and I was developing these user controls to save coding time for me and this can not go any good for now . So , excuse me if I am annoying you with these questions . Thanks for your help and appreciate your patience and time .
Last edited by Hosam AL Dein; Mar 9th, 2019 at 04:04 PM.
Re: CommonControls (Replacement of the MS common controls)
I solved the problem related to the number of controls on a form .
1 - I installed Win7 64bit and the problem remained as it was .
2 - VB6 IDE crashed and debugged it and found some message talking about " Access Violation "
3 - I suspected the VB6 exe . It was manifested internally and I was used to replace the default VB6.exe with a pre-manifested one that I have made .
4 - I cleared all manifest resources from VB6.exe and replaced them with manifest only that handles visual styles .
5 - It worked and the problem was solved in both ComCtlsDemo project and also in my project where I use the ocx version and I re-switched to win10 64 bit and it also worked on win 10
But , About the issue related to VBCCR CommandButtons and TextBoxes hosted in a user control and being able to click the separately in design mode in IDE , it is the same and still exists although I replaced the OCX with the latest version in the same path and unregistered the old one and re-registered the newer one too .