-
Jul 10th, 2014, 08:56 AM
#401
Re: CommonControls (Replacement of the MS common controls)
This is the 1.1 ActiveX Control version. (End of support)
Removed
Last edited by Krool; Nov 4th, 2017 at 05:25 PM.
-
Jul 10th, 2014, 09:27 AM
#402
Member
Re: CommonControls (Replacement of the MS common controls)
Normally Yes
VBA Version
Attachment 116209
VB6.EXE 6.0.81.76
VB6IDE.DLL 6.0.97.82
VB6.DLL 6.0.0.9782
What would you like me to try the other?
Be careful, my system is in french!
-
Jul 10th, 2014, 10:01 AM
#403
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by lrd_VB6
Normally Yes
VBA Version
Attachment 116209
VB6.EXE 6.0.81.76
VB6IDE.DLL 6.0.97.82
VB6.DLL 6.0.0.9782
What would you like me to try the other?
Be careful, my system is in french!
Change again "Parent.Controls" with "ParentControls" in the hidden ControlsEnum properties and then try following:
Instead of this
Code:
Dim ControlEnum As Object
For Each ControlEnum In .ControlsEnum
If TypeName(ControlEnum) = "ImageList" Then
ComboImageList.AddItem ProperControlName(ControlEnum)
End If
Next ControlEnum
do this
Code:
If .ControlsEnum.Count > 0 Then
For i = 0 To .ControlsEnum.Count - 1
If TypeName(.ControlsEnum(i)) = "ImageList" Then
ComboImageList.AddItem ProperControlName(.ControlsEnum(i))
End If
Next i
End If
for instance in the "PPTreeViewGeneral.pag"
-
Jul 10th, 2014, 10:22 AM
#404
Member
Re: CommonControls (Replacement of the MS common controls)
Yes
When I saw my version of VBE.EXE and that of my folder ServicePacks VB6, I had a doubt.
VB6.EXE 6.0.81.76 (current) and VB6.EXE 6.0.97.82 (Service Pack)
After a New Update (again)
VB6.EXE 6.0.97.82
And it changes everything!
It seems that ControlsEnum working properly now!
Sorry for the time wasted on a failure who did not was not
-
Jul 10th, 2014, 10:52 AM
#405
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by lrd_VB6
Yes
When I saw my version of VBE.EXE and that of my folder ServicePacks VB6, I had a doubt.
VB6.EXE 6.0. 81.76 (current) and VB6.EXE 6.0. 97.82 (Service Pack)
After a New Update (again)
VB6.EXE 6.0.97.82
And it changes everything!
It seems that ControlsEnum working properly now!
Sorry for the time wasted on a failure who did not was not
Ok. Thats good. But would be interesting to know if the For...Next bypass would also solve it. Even on your VB6.EXE 6.0.81.76 level.
-
Jul 10th, 2014, 11:25 AM
#406
Member
Re: CommonControls (Replacement of the MS common controls)
confirmed
With VB6.EXE 6.0.81.76 level.
Attachment 116225
With VB6.EXE 6.0.97.82
OK No problems.
I found the cause and Workarounds in the following links.
http://support.microsoft.com/kb/q223104
http://codes-sources.commentcamarche...ients-80010108
The right question is:
What is the difference between UserControl.ParentControls and UserControl.Parent.Controls?
Last edited by lrd_VB6; Jul 10th, 2014 at 12:00 PM.
-
Jul 10th, 2014, 02:46 PM
#407
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by lrd_VB6
The right question is:
What is the difference between UserControl.ParentControls and UserControl.Parent.Controls?
Referring to your linked KB-Article from MS: This problem is only occuring when there are 32 or more controls on the form. And the bug is fixed when at least SP3 is installed. Just as info.
The UserControl.ParentControls returns also the parent itself. So the count is always 1 higher than the UserControl.Parent.Controls.
Anyhow, everyone should use SP6. As for sure there are also other problems which gets fixed by SP6.
But I don't want to look for every single problem when not SP6 is installed.
So I think I will stay with UserControl.ParentControls. And hey, this problem reminded you to update your VB6.
Last edited by Krool; Jul 10th, 2014 at 03:06 PM.
-
Jul 10th, 2014, 03:48 PM
#408
Member
Re: CommonControls (Replacement of the MS common controls)
Normally it should have been be the good version!
Mystere
Just for information,
What version of the VB6.EXE you use?
What interest to change the type of ControlsEnum in VBRUN.ParentControls if it is a hidden property?
Last edited by lrd_VB6; Jul 10th, 2014 at 03:52 PM.
-
Jul 10th, 2014, 03:53 PM
#409
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by lrd_VB6
Normally it should have been be the good version!
Mystere
Just for information,
What interest to change the type of ControlsEnum in VBRUN.ParentControls if it is a hidden property?
The hidden property is used in the property page of the concerned control.
For general it is always better to cast the object directly to which it belongs instead of generic 'Objects'. (Performance)
-
Jul 11th, 2014, 03:56 AM
#410
Member
Re: CommonControls (Replacement of the MS common controls)
Hello
In "TvwNodes.cls", Is it possible to change
Code:
Public Function Add(Optional ByVal Relative As Variant, _
Optional ByVal Relationship As TvwNodeRelationshipConstants, _
Optional ByVal Key As String, _
Optional ByVal Text As String, _
Optional ByVal Image As Long, _
Optional ByVal SelectedImage As Long) As TvwNode
In
Code:
Public Function Add(Optional ByVal Relative As Variant, _
Optional ByVal Relationship As TvwNodeRelationshipConstants = TvwNodeRelationshipNext, _
Optional ByVal Key As String, _
Optional ByVal Text As String, _
Optional ByVal Image As Long, _
Optional ByVal SelectedImage As Long) As TvwNode
This is the default reaction of Nodes.Add
http://msdn.microsoft.com/en-us/libr...=vs.60%29.aspx
-
Jul 12th, 2014, 05:51 AM
#411
Member
Re: CommonControls (Replacement of the MS common controls)
Hello
I proceeded a "few" changes to routines TreeView and Node(s).
I submit for your approval.
Now the Image and SelectedImage properties function as in the original.
You can use the keys as text or numeric.
Everything seems to work fine, but you never know ...
best regards
-
Jul 12th, 2014, 02:00 PM
#412
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by lrd_VB6
I proceeded a "few" changes to routines TreeView
What did you exactly suggest to change in the TreeView itself?
Originally Posted by lrd_VB6
Now the Image and SelectedImage properties function as in the original.
You can use the keys as text or numeric.
Ok. But what is the sense of have the Image and SelectedImage return a String if it was passed by a string, e.g. as "1" ? I dislike that overhead work.
Last edited by Krool; Jul 12th, 2014 at 02:36 PM.
-
Jul 12th, 2014, 02:33 PM
#413
Member
Re: CommonControls (Replacement of the MS common controls)
Everything is in the Zip file!
Before
Code:
Public Function Add(Optional ByVal Relative As Variant, _
Optional ByVal Relationship As TvwNodeRelationshipConstants , _
Optional ByVal Key As String, _
Optional ByVal Text As String, _
Optional ByVal Image As Long, _
Optional ByVal SelectedImage As Long) As TvwNode
Now
Code:
Public Function Add(Optional ByVal Relative As Variant, _
Optional ByVal Relationship As TvwNodeRelationshipConstants = TvwNodeRelationshipNext, _
Optional ByVal Key As String, _
Optional ByVal Text As String, _
Optional ByVal Image As Variant, _
Optional ByVal SelectedImage As Variant) As TvwNode
In MainForm
Code:
TreeView1.Nodes.Add , , , "1", "FOLDER_CLOSE", "FOLDER_OPEN"
TreeView1.Nodes.Add(1, TvwNodeRelationshipChild, , "1-1", "MAIL", "OPEN").ForeColor = vbBlue
TreeView1.Nodes.Add(1, TvwNodeRelationshipChild, , "1-2", 1).ForeColor = vbBlue
TreeView1.Nodes.Add , TvwNodeRelationshipNext, , "2", 1
Code:
?TreeView1.Nodes(1).Image
FOLDER_CLOSE
?TreeView1.Nodes(1).SelectedImage
FOLDER_OPEN
?TreeView1.Nodes(2).Image
MAIL
?TreeView1.Nodes(3).Image
1
Values "Image" or "SelectedImage" can be either text or numerical form.
This is normal operation.
I wrote a program that uses ONLY key in text form ..
-
Jul 12th, 2014, 03:38 PM
#414
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by lrd_VB6
Values "Image" or "SelectedImage" can be either text or numerical form.
This is normal operation.
I wrote a program that uses ONLY key in text form ..
Oh, Ok. Did not know that this can be a KEY of a ListImage.
Then this also effects to other controls?
-
Jul 12th, 2014, 05:03 PM
#415
Member
Re: CommonControls (Replacement of the MS common controls)
Yes
All controls that use a "ListImage" work like that.
ToolBar, ListView etc..
Example code snippet I wrote
Code:
Private Function ModeleActif() As Boolean
ModeleActif = (Toolbar1.Buttons(KEY_CONFIG).Image = "LOCK_GO" And Len(iniModele.IniFileName) > 0)
End Function
Private Sub ActiveModele(Name As String)
iniModele.IniFileName = Name
With Toolbar1.Buttons(KEY_CONFIG)
If Len(Name) Then
.Image = "LOCK_GO"
Else
.Image = "LOCK_OPEN"
End If
End With
SetMainCaption
End Sub
For cons, I have a question:
I saw in the TwNode class (and elsewhere)
Code:
Public Property Get NextSibling() As TvwNode
Set NextSibling = ShadowTreeView.FNodeNextSibling(PropHandle)
End Property
Public Property Set NextSibling(ByVal Value As TvwNode) ' Why???
Err.Raise Number:=383, Description:="Property is read-only"
End Property
Why was the Property Set ?
If one does put THAT Property Get," then the property IS Read-only
Thank you to enlighten me.
best regards
-
Jul 13th, 2014, 07:41 AM
#416
Re: CommonControls (Replacement of the MS common controls)
Minor change done in the 'InitReleaseVisualStyles' function in VisualStyles.bas.
Instead of
Code:
CopyMemory IUnk, VarPtr(VTableHeaderPointer), 4
changed to
Code:
CopyMemory IUnk, ByVal VTableHeaderPointer, 4
As this seems to be more "stable". Under "strange" circumstances there is a possibility to get a error no. 16 "Expression too complex". This was solved by this change..
-
Jul 13th, 2014, 08:53 AM
#417
Member
Re: CommonControls (Replacement of the MS common controls)
Good topic!
I do not know if you know this place but the following link should interest you.
This should simplify some routines.
http://www.xbeat.net/vbspeed/i_VBVM6Lib.html
As in the following code in the supplied Zip
Code:
lPrivate Function IHookXP_Message(ByVal hWnd As Long, _
ByVal uiMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long, _
ByVal dwRefData As Long) As Long
Dim pt As POINTAPI, hMouseWnd As Long, Shift As Long, Delta As Integer
Select Case uiMsg
Case WM_SETCURSOR, &H2A2
'Call TrackMouseEvent(mET)
MouseMove_Msg "WM_SETCURSOR"
Case WM_MOUSEHOVER
'Debug.Print "WM_MOUSEHOVER:"; hWnd, uiMsg, wParam, VBVM6Lib.AsDWord(lParam).HiWord, VBVM6Lib.AsDWord(lParam).LoWord
Case WM_MOUSEMOVE, WM_NCMOUSEMOVE
Call TrackMouseEvent(mET)
MouseMove_Msg "WM_MOUSEMOVE"
Debug.Print "WM_MOUSEMOVE:"; hWnd, uiMsg, wParam, VBVM6Lib.AsDWord(lParam).HiWord, VBVM6Lib.AsDWord(lParam).LoWord
Case WM_MOUSEWHEEL
GetCursorPos pt
hMouseWnd = WindowFromPoint(pt.x, pt.y)
If wParam And MK_CONTROL Then Shift = Shift Or vbCtrlMask
If wParam And MK_SHIFT Then Shift = Shift Or vbShiftMask
Delta = VBVM6Lib.AsDWord(wParam).HiWord
Debug.Print "WM_MOUSEWHEEL "; ObjName(hMouseWnd), Delta, Shift, Hex$(VBVM6Lib.AsDWord(wParam).LoWord)
Case WM_MOUSEHWHEEL
Debug.Print "WM_MOUSEHWHEEL "; ObjName(hWnd), uiMsg, wParam, lParam
Case WM_NCDESTROY
Call HookClear(Me.hWnd, Me)
Case Else
Debug.Print Hex$(uiMsg); ":"; hWnd, uiMsg, wParam, lParam
End Select
IHookXP_Message = HookDefault(hWnd, uiMsg, wParam, lParam)
End Function
-
Jul 13th, 2014, 11:16 AM
#418
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by lrd_VB6
For cons, I have a question:
I saw in the TwNode class (and elsewhere)
Code:
Public Property Get NextSibling() As TvwNode
Set NextSibling = ShadowTreeView.FNodeNextSibling(PropHandle)
End Property
Public Property Set NextSibling(ByVal Value As TvwNode) ' Why???
Err.Raise Number:=383, Description:="Property is read-only"
End Property
Why was the Property Set ?
If one does put THAT Property Get," then the property IS Read-only
If you have only a 'Get' then VB6 always crash if you want to 'Write' on that Property. If there is a 'Set' and/or 'Let' with error raising then you have a chance to not crash the app when 'On Error Goto/Resume Next' is in place. It's like in the original controls. On many Read-Only properties you get a "manual" error raised.
-
Jul 14th, 2014, 12:41 AM
#419
Junior Member
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Krool
Intrinsic controls are those controls who are always available, even on a blank project. If they also do not show the visual styles then something is wrong with your VB6.exe resource.
Here's my VB version.
i installing update sp 6
what i must to do?
-
Jul 14th, 2014, 04:52 AM
#420
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by putuoka
Here's my VB version.
i installing update sp 6
what i must to do?
When you put a normal VB.CommandButton on the Form. Are the visual themes visible in your IDE?
-
Jul 14th, 2014, 02:09 PM
#421
Re: CommonControls (Replacement of the MS common controls)
Important/Critical update released, when using the CoolBar control.
There were some major mistakes done on the update from 13-Jul-2014. Sorry..
Now everything should work.
-
Jul 14th, 2014, 09:23 PM
#422
Junior Member
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Krool
When you put a normal VB.CommandButton on the Form. Are the visual themes visible in your IDE?
i think yes, it's visible
here's more information from procmon(process monitor tools) when i drag your stylish button to the form
http://pastebin.com/raw.php?i=bdPVa0tN
-
Jul 15th, 2014, 01:55 AM
#423
Addicted Member
Re: CommonControls (Replacement of the MS common controls)
Judging by the about form, the obvious answer is no, because its buttons are not styled, either.
-
Jul 15th, 2014, 02:43 AM
#424
Junior Member
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Cube8
Judging by the about form, the obvious answer is no, because its buttons are not styled, either.
so what should i do to make this custom component work?
-
Jul 15th, 2014, 10:45 AM
#425
Re: CommonControls (Replacement of the MS common controls)
It is a good idea to have 2 copies of Vb6.exe
One is the original.
Second is with embedded resource for Theme support so you can see Themed controls in the IDE without needing to compile every time.
Then it is just a matter copying the desired Vb6.exe to "C:\Program Files (x86)\Microsoft Visual Studio\VB98" folder.
There is obviously something wrong with your Manifest or it didn't get embedded.
Your about screen should look like this?
-
Jul 19th, 2014, 02:04 PM
#426
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by lrd_VB6
Hello
I proceeded a "few" changes to routines TreeView and Node(s).
I submit for your approval.
Now the Image and SelectedImage properties function as in the original.
You can use the keys as text or numeric.
Everything seems to work fine, but you never know ...
best regards
I think for the moment I will not change this as in the original.
As this would result in a big overhead. Also for "design time visible" controls, e.g. TabStrip.
And it would propably slow down some controls, e.g. ListView control...
-
Jul 21st, 2014, 02:53 PM
#427
Re: CommonControls (Replacement of the MS common controls)
-
Jul 23rd, 2014, 12:40 PM
#428
New Member
Re: CommonControls (Replacement of the MS common controls)
-
Jul 24th, 2014, 12:17 AM
#429
Junior Member
Re: CommonControls (Replacement of the MS common controls)
Thanks for the update krool also thanks for the help before guys
now i think i know my problem because of manifest & comctl32.dll
i got this error
Could anyone help me to fix this please?
i'm new with vb6 need tutorial to fix this error.
thank you.
-
Jul 25th, 2014, 06:49 AM
#430
-
Jul 25th, 2014, 11:45 PM
#431
Junior Member
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by lrd_VB6
- Create a copy of "VB6.EXE" and rename to "VB6_XP.EXE".
- copy attached file in the same folder. (manifest).
- Rename VB6_XP.EXE.manifest.txt in VB6_XP.EXE.manifest
- execute "VB6_XP.EXE"
You have VB6 with the theme and not error.
It's working great. Thank you.
btw why we should change it to VB6_XP.EXE ? is it effect to deployment?
-
Jul 27th, 2014, 10:47 AM
#432
New Member
Re: CommonControls (Replacement of the MS common controls)
Hi!
Is there a way to modify the Tag property so as to use a Variant instead of a String?
Thanks
-
Aug 2nd, 2014, 02:06 AM
#433
Junior Member
Re: CommonControls (Replacement of the MS common controls)
Quick question, I did a search on this thread first and didnt return any results.
On the textbox control, I can change the alignment at runtime on windows 7 but on xp it refuses to change, it even shows the alignment has changed yet does take effect (I use a msgbox to tell me the current alignment and it shows it changed). But on a newer OS it does are works fine. The normal textbox does it just fine on xp, so I am not sure if this is simply needing the v6 like some of the other features do.
So I have a simple drop down list that the user can set the alignment. In the IDE it doesnt work and it doesnt work when complied on xp. But it works fine on 7.
Am I missing something?
Any info would be great, and keep up the great work.
-Shane
-
Aug 3rd, 2014, 11:58 AM
#434
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by SMC1979
On the textbox control, I can change the alignment at runtime on windows 7 but on xp it refuses to change, it even shows the alignment has changed yet does take effect (I use a msgbox to tell me the current alignment and it shows it changed). But on a newer OS it does are works fine. The normal textbox does it just fine on xp, so I am not sure if this is simply needing the v6 like some of the other features do.
I have tested the 'Alignment' property in the TextBoxW control. Worked on XP and 7. (Whether comctl32.dll v5.8x or v6.x)
Anyone else other results?
-
Aug 3rd, 2014, 10:28 PM
#435
Junior Member
Re: CommonControls (Replacement of the MS common controls)
Just to clarify, this is when the program is running and not in the IDE, in the IDE it works fine of course. Only changing it after it is running does it not work. But I have only tested on my XP in VMware that I program in, on 7 and 8 it works just fine. So the comctrl32 on the XP machine is 5.8 and of course the other OS's it is v6.
If it all helpful I could make a small short video showing it.
Shane
-
Aug 8th, 2014, 12:21 PM
#436
Junior Member
Re: CommonControls (Replacement of the MS common controls)
Another thing as well. The combo box. When I have a large list of items in a normal combo box I can start typing and it will pull up the best result. When I do that with the combo box with this one it is only taking the first letter and if I type a 2nd letter after it goes to a different item instead of using the first letter with it.
So say you have a combo box with these list items
Apple
Grape
Pie
And the combo current text is blank. You have focus on the combo box and start typing, as soon as you hit "a" apple shows up in the list, then just as quickly you hit "p" after the "a" and instead of staying on apple it goes right to "Pie"
So is there is a setting or option for the combo box that needs to be set so that it accepts more than just 1 letter when typing into it?
Shane
-
Aug 9th, 2014, 05:13 PM
#437
New Member
Re: CommonControls (Replacement of the MS common controls)
Halo Krool,
in the RichTextBox control (VBCCR11.OCX) there is no SelChange routine.
Thanks for your attention.
-
Aug 10th, 2014, 08:25 AM
#438
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by akogan
in the RichTextBox control (VBCCR11.OCX) there is no SelChange routine.
There is a SelChange event on VBCCR11.OCX. (Even on VBCCR10.OCX is this event available)
Code:
Private Sub RichTextBox1_SelChange(ByVal SelType As Integer, ByVal SelStart As Long, ByVal SelEnd As Long)
Originally Posted by SMC1979
Another thing as well. The combo box. When I have a large list of items in a normal combo box I can start typing and it will pull up the best result. When I do that with the combo box with this one it is only taking the first letter and if I type a 2nd letter after it goes to a different item instead of using the first letter with it.
So say you have a combo box with these list items
Apple
Grape
Pie
And the combo current text is blank. You have focus on the combo box and start typing, as soon as you hit "a" apple shows up in the list, then just as quickly you hit "p" after the "a" and instead of staying on apple it goes right to "Pie"
So is there is a setting or option for the combo box that needs to be set so that it accepts more than just 1 letter when typing into it?
This problem occurs because the ComboBox search is based on one character instead of the complete character set.
Last edited by Krool; Aug 10th, 2014 at 08:50 AM.
-
Aug 11th, 2014, 02:14 PM
#439
New Member
Re: CommonControls (Replacement of the MS common controls)
Is it possible to set the RTB background to transparent?
The following seems to work for the original Rich Text Box, but for some reason not the new one:
SetWindowLong richtextbox1.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT
Thanks again for all your hard work
-
Aug 11th, 2014, 03:22 PM
#440
Junior Member
Re: CommonControls (Replacement of the MS common controls)
This problem occurs because the ComboBox search is based on one character instead of the complete character set.
I was able to code a fix around for it. I had to change the combo from a list to a dropdown box, so the user could type in it. As they type the best result shows up (I have it set to show the drop down when they start typing) then, since I needed it as a list and not let them type in something, I have the combo do a find after the drop down closes and if there is a result it sets it, if there isnt it blanks out the text the typed in. So I get the effect that I need if the combo box was set back to a drop down list.
So I was able to do the effect I was looking for that way :-)
I dug in some more and think I know how the normal combo box does it. It holds a variable that if another key is pressed under a certain amount of time then it looks for that string, after a small amount of time pasts it resets back to the first letter that is typed next.
Just like how when you are typing text into the combo box it works fine as the best result comes up. When in drop down list mode you would have to have a variable and a timer to hold what the user is typing and then clear it after say, 1 sec.
If you like I could do that into the control for you and send your way to see if it is something you could add.
Shane
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
|