-
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
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)
Quote:
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)
Quote:
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.
Quote:
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.
No, thanks
-
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 .
I need help seriously .
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Hosam AL Dein
1 - In the STDExe version . when I open it and run the project , VB6 crashes
Do you mean ComCtlsDemo project?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
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.
-
Re: CommonControls (Replacement of the MS common controls)
https://www.youtube.com/watch?v=9ft8C7utHsk
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)
Quote:
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 .
but from here https://www.youtube.com/watch?v=9ft8...youtu.be&t=378 , this is (as I think after the quick reading) another problem .
-
Re: CommonControls (Replacement of the MS common controls)
-
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 .
https://www.youtube.com/watch?v=z7G4...ature=youtu.be
-
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 .
https://www.youtube.com/watch?v=uAl4...ature=youtu.be
https://www.youtube.com/watch?v=2QRL...ature=youtu.be
-
Re: CommonControls (Replacement of the MS common controls)
Hosam AL Dein, seens your system is screwed up. Did you try on another machine?
-
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 .
-
Re: CommonControls (Replacement of the MS common controls)
Update released related to VTableHandle.bas.
It must be the last fix for this now..
-
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 .
What could be wrong here ?
https://www.youtube.com/watch?v=UF0E...ature=youtu.be
-
Re: CommonControls (Replacement of the MS common controls)
The previous problem does not happen in a new user control .
https://www.youtube.com/watch?v=QxFy...ature=youtu.be
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Hosam AL Dein
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
I had the same problem a while ago, but it was solved some weeks ago for me.
Could you post your project that shows the error?
I would like to see if it happens here as well.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Karl77
I had the same problem a while ago, but it was solved some weeks ago for me.
Could you post your project that shows the error?
I would like to see if it happens here as well.
a while ago is older or earlier than some weeks ago?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
DaveDavis
a while ago is older or earlier than some weeks ago?
See post #2117.
http://www.vbforums.com/showthread.p...=1#post5332087
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Karl77
I had the same problem a while ago, but it was solved some weeks ago for me.
Could you post your project that shows the error?
I would like to see if it happens here as well.
Thanks for your reply karl ,
I will be wrapping a demo today attached with video as I am testing some scenarios now .
-
Re: CommonControls (Replacement of the MS common controls)
I could reproduce the scenario which causes this problem and it is such a strange and tricky .
https://www.youtube.com/watch?v=IaxZ...ature=youtu.be
I was limited to 15 minutes of recording so , there is an uncompleted test result at the end of the video but it should be enough to make the point clear for now .
Summary for video :
The scenario :
1- Add a new user control
2- Place normal textbox or any VB6 intrinsic controls in the user control .
3- Place any VBCCR control in the user control
4- In the UserControl_Initialize event , add these lines of code .
Lets say you used a VB intrinsic Textbox and a VBCCR CommandButtonW . Add these lines
Code:
text1.text="Hello"
commandbuttonw1.caption ="Hello"
5- The problem happens
6 - Uncomment the code , The problem now disappears .
7 - Put the following code in the same event
Code:
Dim s as string
s= "Hello , I prove that not all code causes the problem , It is only for the code that draws an item in the user control"
8 - With this previous case , the problem does not happen .
More details and tests are found in the video for tests on the ComCtlsDemo project
Thanks everybody for your help and sorry for bad English .
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Hosam AL Dein
I could reproduce the scenario which causes this
Easy to reproduce, and happens in here the same way.
While the effect is bothering, it is more a cosmetic issue.
I lived with it for a long time, and it didn't stopped me to get things done.
But good to point out the issue!
And I would appreciate a solution as well.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Hosam AL Dein
I could reproduce the scenario which causes this
problem and it is such a strange and tricky .
https://www.youtube.com/watch?v=IaxZ...ature=youtu.be
I was limited to 15 minutes of recording so , there is an uncompleted test result at the end of the video but it should be enough to make the point clear for now .
Summary for video :
The scenario :
1- Add a new user control
2- Place normal textbox or any VB6 intrinsic controls in the user control .
3- Place any VBCCR control in the user control
4- In the
UserControl_Initialize event , add these lines of code .
Lets say you used a VB intrinsic Textbox and a VBCCR CommandButtonW . Add these lines
Code:
text1.text="Hello"
commandbuttonw1.caption ="Hello"
5- The problem happens
6 - Uncomment the code , The problem now disappears .
7 - Put the following code in the same event
Code:
Dim s as string
s= "Hello , I prove that not all code causes the problem , It is only for the code that draws an item in the user control"
8 - With this previous case , the problem does not happen .
More details and tests are found in the video for tests on the
ComCtlsDemo project
Thanks everybody for your help and sorry for bad English .
It's a very bad idea to make some code involving the child usercontrol in the host usercontrol inside the UserControl_Initialize() event. The UC Ambient.UserMode property is not meaningful at that place. Please set your code that involves the child usercontrols in the UserControl_ReadProperties()/UserControl_InitProperties().
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
It's a very bad idea to make some code involving the child usercontrol in the host usercontrol inside the UserControl_Initialize() event. The UC Ambient.UserMode property is not meaningful at that place. Please set your code that involves the child usercontrols in the UserControl_ReadProperties()/UserControl_InitProperties().
Aha.
Now I know why did it right in my apps.
Not because of knowledge, I just don't use UserControl_Initialize anywhere in my UCs.
Except in one of them, and I will correct that immediately.
-
Re: CommonControls (Replacement of the MS common controls)
Krool, thank you for these superb usercontrols. In terms of DTPicker there is AllowUserInput, but this property does not 'lock' control fex. like in vb intrinsic combobox locked property does - maintaining control look like 'enabled'. Hence asking is your DTPicker control possible to set 'locked' state, without disabling it? If not, then could you consider adding locked property?
-
Re: CommonControls (Replacement of the MS common controls)
I need to change the BackColor of a tab control but it has no BackColor property. Is this an accidental omission or is there a technical reason for this?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
It's a very bad idea to make some code involving the child usercontrol in the host usercontrol inside the UserControl_Initialize() event. The UC Ambient.UserMode property is not meaningful at that place. Please set your code that involves the child usercontrols in the UserControl_ReadProperties()/UserControl_InitProperties().
Thanks for your reply krool ,
This is the first time to know that . I will go on your advice to avoid this issue .
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Update released.
Minor bugfix in each WM_MOUSEACTIVATE handler.
This is a very tiny behavior "bug" which I didn't notice and obviously nobody else. :)
The standard handler of WM_MOUSEACTIVATE looked like below (taken from TextBoxW)
and used MA_NOACTIVATEANDEAT when hittest the border or the Validate event doesn't allow to.
However, it is more correct to use MA_ACTIVATEANDEAT.
Code:
Case WM_MOUSEACTIVATE
Static InProc As Boolean
If TextBoxTopDesignMode = False And GetFocus() <> TextBoxHandle Then
If InProc = True Or LoWord(lParam) = HTBORDER Then WindowProcControl = MA_NOACTIVATEANDEAT: Exit Function
Select Case HiWord(lParam)
Case WM_LBUTTONDOWN
On Error Resume Next
With UserControl
If .Extender.CausesValidation = True Then
InProc = True
Call ComCtlsTopParentValidateControls(Me)
InProc = False
If Err.Number = 380 Then
WindowProcControl = MA_NOACTIVATEANDEAT
Else
SetFocusAPI .hWnd
WindowProcControl = MA_NOACTIVATE
End If
Else
SetFocusAPI .hWnd
WindowProcControl = MA_NOACTIVATE
End If
End With
On Error GoTo 0
Exit Function
End Select
End If
Because let's assume you have a TextBoxW which can't get focus because the currently focused control doesn't allow. (Validate Cancel = True)
Then assume the form get's inactive (for instance when clicking on desktop) then now when you click on the TextBoxW which is not allowed to get focus you will see that the Form will not get active. But in VB.TextBox the form will get active where the focus is still on the upper TextBox which have Validate Cancel = True.
Attachment 166999
So this update brings the behavior to same. I know it's a very tiny detail.
as Info: the MA_NOACTIVATE in above WM_MOUSEACTIVATE handler is still correct as SetFocusAPI implies activation of the top-level form. (SetFocusAPI internally also activates the form)
-
Re: CommonControls (Replacement of the MS common controls)
Hello Krool,
I found a bug.
I have a form with 200 texbox from vb6.
When i convert my project from VBCCR6 to Source code CommonControls, in the moment when I compiling the project I obtein a error , runtime '0' , the haven't a licence from your control.
-
2 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Hello Krool,
I use MzTools 3.0 ( https://programacion.net/noticia/mzt...ual_basic_1751 ) and the properties "Fontname" in TextboxW is missing.
The TexBox default have a properties "FontName".
Could you fix this?
Attachment 167753
Attachment 167755
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
pepegriyo2016
Hello Krool,
I found a bug.
I have a form with 200 texbox from vb6.
When i convert my project from VBCCR6 to Source code CommonControls, in the moment when I compiling the project I obtein a error , runtime '0' , the haven't a licence from your control.
You need to convert from VBCCR16.TextBoxW to [your project name].TextBoxW
-
Re: CommonControls (Replacement of the MS common controls)
Update released.
Bugfix in the internal ComCtlsTopParentValidateControls function.
If a control validation takes place in an MDIForm it was functional working, but it had a strange "re-position" effect on mdi-child forms.
Below illustration says more than words..
Before
http://krool.mooo.com/Data/VBForums/...ols_Before.gif
After fix
http://krool.mooo.com/Data/VBForums/...rols_After.gif
It could be fixed by just adding red marked code block:
Code:
Public Sub ComCtlsTopParentValidateControls(ByVal UserControl As Object)
With GetTopUserControl(UserControl)
If TypeOf .Parent Is VB.MDIForm Then
Dim MDIForm As VB.MDIForm
Set MDIForm = .Parent
MDIForm.ValidateControls
ElseIf TypeOf .Parent Is VB.Form Then
Dim Form As VB.Form
Set Form = .Parent
Form.ValidateControls
Else
Const IID_IPropertyPage As String = "{B196B28D-BAB4-101A-B69C-00AA00341D07}"
If VTableInterfaceSupported(.Parent, IID_IPropertyPage) = True Then
Dim PropertyPage As VB.PropertyPage, TempPropertyPage As VB.PropertyPage
CopyMemory TempPropertyPage, ObjPtr(.Parent), 4
Set PropertyPage = TempPropertyPage
CopyMemory TempPropertyPage, 0&, 4
PropertyPage.ValidateControls
End If
End If
End With
End Sub
VB.Form is inherited in each VB.MDIForm. However, it seems to work "better" if .ValidateControls is called on the VB.MDIForm directly.
So it's not a real functional bugfix but rather a cosmetic fix.
VBFlexGrid is likewise updated.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Hello Krool,
I have an error in TextBoxW
Attachment 168249
In line Of TextBoxW:
Code:
Public Property Set Container(ByVal Value As Object)
Set Extender.Container = Value
End Property
My code is:
Code:
Private Sub ZoomControls(miTxt As TextBoxW, miLb As LabelW, miFrame_1 As FrameW)
Set miTxt.Container = miFrame_1
End Sub
With the OCX Controls, i haven't the error.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Krool,
This is the example the error.
Add This form to ComCtlsDemo Project
Attachment 168251
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
pepegriyo2016
Hello Krool,
I have an error in TextBoxW
Attachment 168249
In line Of TextBoxW:
Code:
Public Property Set Container(ByVal Value As Object)
Set Extender.Container = Value
End Property
My code is:
Code:
Private Sub ZoomControls(miTxt As TextBoxW, miLb As LabelW, miFrame_1 As FrameW)
Set miTxt.Container = miFrame_1
End Sub
With the OCX Controls, i haven't the error.
In the OCX the FrameW interface is an amalgamation of VBControlExtender and the real FrameW interface.
Whereas in the Std-EXE version the FrameW interface is encapsulated. However, when using FrameW1 on the control itself it contains VBControlExtender, but not when passed to a sub with As FrameW.
Solution could be to not pass FrameW into the sub but VBControlExtender.
Changed:
Code:
Private Sub ZoomControls(miTxt As TextBoxW, _
miLb As LabelW, _
miFrame_1 As VB.VBControlExtender)
Unchanged:
Code:
Private Sub cmdZoomURL_Click()
Call ZoomControls(txtUrl, lbURL, Frame(1))
End Sub
-
Re: CommonControls (Replacement of the MS common controls)
Thank you very much!!
It's working
-
Re: CommonControls (Replacement of the MS common controls)
Problem:
1) Download Demo from first post in this thread
2) Copy contents of OLEGuids to Windows\System32
3) Open VB6
4) Open ComCtlsDemo.vbp (loads without issue)
5) Run
VB6 closes
Same thing happens when I try and open MainForm.frm in the IDE
Any ideas?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Darkbob
Problem:
1) Download Demo from first post in this thread
2) Copy contents of OLEGuids to Windows\System32
3) Open VB6
4) Open ComCtlsDemo.vbp (loads without issue)
5) Run
VB6 closes
Same thing happens when I try and open MainForm.frm in the IDE
Any ideas?
No idea.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Darkbob
Problem:
2) Copy contents of OLEGuids to Windows\System32
Did you register the TLB?
-
2 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
jpbro
Did you register the TLB?
I had to google registering a TLB... never heard of TLB's and I have no clue on how to register them. I can't see it mentioned anywhere in the readme. But I googled, found out how to register a TLB and got it registered.
Unfortunately now the project won't run.
Really a shame that the demo for this project won't run and there's really no mention of at least two critical steps to get the demo running. It must turn a lot of people off using it. But I'm determined to stick with it for a bit longer before I give up.
When I try and run the project I see this:
Attachment 168377
In Debug I see this line highlighted:
Attachment 168379
If the demo needs a manifest, shouldn't it be included? Where can I get one and/or make one for this project?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Darkbob
I can't see it mentioned anywhere in the readme. But I googled, found out how to register a TLB and got it registered.
It is mentioned in the GitHUb readme: "In order to use that type library, it is necessary to load the OLEGuids.tlb in the IDE. (Project -> References... -> Browse -> select file OLEGuids.tlb -> check item "OLE Guid and interface definitions")", but Googling works too so glad you got that part figured out and working.
Quote:
Originally Posted by
Darkbob
If the demo needs a manifest, shouldn't it be included? Where can I get one and/or make one for this project?
I suspect it doesn't include the manifest because it is actually outside the scope of the project, and is something most devs have done as a matter of course years ago. The VB6 IDE needs to be manifested to use the newer V6 common controls. Search for "manifest vb6 ide" for a bunch of results on how to do this. Here are a few articles I found with those search terms that might be helpful:
http://vbnet.mvps.org/code/forms/vbidevista.htm
http://www.vbaccelerator.com/home/VB...VB/article.asp
-
Re: CommonControls (Replacement of the MS common controls)
Well if the purpose of a demo is to show you how easy it will be to use... mission accomplished. The instructions are hidden on GitHub? You have to Google menifest creation in order to try out the demo?
Somebody put a ton of work into this. Much better than many commercial products and very necessary with Microsoft constantly playing games. Really a shame the demo is so poor that it won't run out of the box. Especially since all you would need to do is edit the readme and give people a hint on how to run it.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Darkbob
Well if the purpose of a demo is to show you how easy it will be to use...
I didn't see that purpose stated the documentation ;)
I think the purpose of the demo was to showcase the available controls, and the purpose of the project in general is to provide Unicode replacements for the ANSI common controls used by default by VB6. Nobody said that would be easy! You need to weigh your need for Unicode controls vs. the work required to get them up and running in your environment. I assure you that Krool has done the vast majority of the really hard work compared to writing your own Unicode control replacement library. Registering a TLB and adding a manifest to your VB6 IDE is a small step above the absolute minimum that can be expected from a developer to get an OCX working from source.
-
Re: CommonControls (Replacement of the MS common controls)
darkbob,
You do not need a manifest in order to run the demo. The only thing you need is to reference the OLEGuids.tlb file in your project. BTW, the .tlb means it is a type library. It enables VB6 to be able to specify data types, call stack order etc. differently than what is built-in to VB6. It is a powerful feature that is used all the time in VB6; normally it is behind the scenes.
Krool included the latest OLDGuids.tlb in the OLEGuids folder of the package yo downloaded. You can reference it there. Alternatively, I keep the ltest version in C:\Windows\SysWow64 (C:\Windows\System32if you are running 32-bit Windows). It hasn't changed in 2 years so it isn't much of a hassle to put it in the common folder.
You don't need to register it. Let's say you copied it to C:\Windows\SysWow64. In a blank VB6 project go to Project | References then click on Browse. Go find it and include it in your project. Now it will be available for all future projects you do. Just do Project | References and look for "OLE Guid and interface definitions" and check the choice.
Know also that the type library is only used when you are in the IDE &/or compiling. It is not required to be included with the final distribution program. So it is just a file you will want to keep n your development machine. It allows you to do a lot of interesting things as Krool's demo will show you.
That's all you need to run his demo or to use his controls.
You will probably notice that all of his controls are included in the demo are source files. Typically controls are distributed pre-compiled in a .OCX file and you never see the source files. The advantages of what Krool has done here is that once you get it compiled you no longer need the control files; they're compiled into your code.
There is another version of his controls where he has pre-compiled everything into one large .OCX file (read the first post of his to find the link to the thread containing that OCX file). If you go this route your compiles are faster because you dn't have to compile the source code for the controls each time but when you have your final EXE file you have to distribute that OCX with it. [That's where the side-by-side stuff can start coming into play but that's a topic for another day.]
Let us know how all of this works for you. Krool has put in some incredible work here and I hope you can benefit from it as we have.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Darkbob
I had to google registering a TLB... never heard of TLB's and I have no clue on how to register them. I can't see it mentioned anywhere in the readme. But I googled, found out how to register a TLB and got it registered.
Unfortunately now the project won't run.
Really a shame that the demo for this project won't run and there's really no mention of at least two critical steps to get the demo running. It must turn a lot of people off using it. But I'm determined to stick with it for a bit longer before I give up.
When I try and run the project I see this:
Attachment 168377
In Debug I see this line highlighted:
Attachment 168379
If the demo needs a manifest, shouldn't it be included? Where can I get one and/or make one for this project?
Please make the following setting in your VB6 IDE to not crash the IDE when it is not manifested.
In order to trap error raises via "On Error Goto ..." or "On Error Resume Next" it is necessary to have "Break on Unhandled Errors" selected instead of "Break in Class Module" on Tools -> Options... -> General -> Error Trapping.
-
Re: CommonControls (Replacement of the MS common controls)
Hello Krool,
great job. I have a question. Can these controls work in 64bit VBA?
Thanks a lot for reply.
Pablo72
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Pablo72
Hello Krool,
great job. I have a question. Can these controls work in 64bit VBA?
Thanks a lot for reply.
Pablo72
No. You can't even use MS comctl on 64bit VBA. That's why even MS advises that for companies it may be better to use 32bit office.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
No. You can't even use MS comctl on 64bit VBA. That's why even MS advises that for companies it may be better to use 32bit office.
Yes, I know... but I was hoping that comctl32.dll (as the basis of these controls) can be used on 64bit application..maybe :)
The problem is that next release of sotware (with integrated VBA) we administrate will be 64-bit only :( .. So I'm looking for some solution..
Anyway, thanks for quick reply.
-
Re: CommonControls (Replacement of the MS common controls)
Hi krool ,
In commandbuttonW , the dropdown event is not fired with the property SplitButton set to true and property SplitButtonNoSplit set to true .
Is this an intrinsic MS behavior ,intended or a bug ?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Hosam AL Dein
Hi krool ,
In commandbuttonW , the dropdown event is not fired with the property SplitButton set to true and property SplitButtonNoSplit set to true .
Is this an intrinsic MS behavior ,intended or a bug ?
Seems MS intended. In this case the button is treated like 'WholeDropDown'.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Hello Krool, it is suggest that ImageList can save the image list and open the image list, and it is perfect if PNG is supported when adding images.
Attachment 169283
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
No. You can't even use MS comctl on 64bit VBA. That's why even MS advises that for companies it may be better to use 32bit office.
I know it! :) See post bellow. And we can't use 32bit VBA cause our app with VBA integration is 64bit.
-
Re: CommonControls (Replacement of the MS common controls)
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
ChenLin
Hello Krool, it is suggest that ImageList can save the image list and open the image list, and it is perfect if PNG is supported when adding images.
Attachment 169283
You mean a save and load method for the designer only?
What's the reason? For backup?
For inter-project transfer you could copy&paste?
-
Re: CommonControls (Replacement of the MS common controls)
Yes, Krool, so if you don't need to re-add it when other projects are used, just open the saved image list file.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
ChenLin
you don't need to re-add it when other projects are used
Can't we just copy/paste the whole control that holds the images?
EDIT:
I load the images from a res file at runtime anyway.
It is more convenient than to handle the images in the imagelist directly.
Also for what DaveInCaz says.