Page 8 of 105 FirstFirst ... 5678910111858 ... LastLast
Results 281 to 320 of 4199

Thread: CommonControls (Replacement of the MS common controls)

  1. #281

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    This is the 1.0 ActiveX Control version. (End of support)

    Removed
    Last edited by Krool; Nov 4th, 2017 at 05:25 PM.

  2. #282
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    10-Mar-2014
    - Minor bugfix in the TextBoxW control.
    - Some component modifications. (it is recommended to replace everything)
    Krool thanks for your last update. Now there is no problem in the IDE even when opening the control and not have to constantly restart VB.

  3. #283
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    I understand that min WinXP SP2 is required for the all-in-one, please correct me if I am wrong. I also understand you running the controls all okay in WinXP.

    I have 3 users showing the following same issues in WinXP (one of them I know is SP3):

    1a) Tabstrip showing only the first tab stretched all the way horizontally.
    1b) The other 11 tabs cannot be seen.
    1c) The tabstrip body is shown correctly.
    1d) One is using "classic" theme, the other two using "blue" XP-theme.

    2a) The one using "blue" Xp-theme, all other controls showing in sexy theme but CommandButtons showing in classic.
    2b) All have CommandButton showing only the icon, no text. I understand comctl32.dll 6.1 required.

    I am guessing both issues could be due to not having comctl32.dll v6.1. I tried searching the Internet on how to get this version into WinXP, either a certain Windows patch or update, but unable to find any answer.

    Do you or anyone knows?

  4. #284

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by chosk View Post
    I am guessing both issues could be due to not having comctl32.dll v6.1. I tried searching the Internet on how to get this version into WinXP, either a certain Windows patch or update, but unable to find any answer.

    Do you or anyone knows?
    There is no way to get comctl32.dll v6.1 on WinXP.

    Quote Originally Posted by chosk View Post
    1a) Tabstrip showing only the first tab stretched all the way horizontally.
    1b) The other 11 tabs cannot be seen.
    2a) The one using "blue" Xp-theme, all other controls showing in sexy theme but CommandButtons showing in classic.
    1a+b) Please provide a demo showing the issues as I cannot replicate them in WinXP.
    2a) Is it a CommandButtonW control? If yes, then ensure that the "VisualStyles" property is set to True.

  5. #285
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    I don't have WinXP so I did a test project with the controls shown in the screenshots and sent the exe to 2 users to run and screenshot.

    Beside the controls, I add all 3 modules in the Common folder and the 2 modules and 4 classes in the Build folder. VisualStyles for all controls are set to True. The only code I add is as follows and nothing else:

    Private Sub Form_Load()
    SetupVisualStyles Me
    End Sub
    Here are the screen shots I got back from 2 users of WinXP SP3.

    Name:  etxa.jpg
Views: 7545
Size:  89.2 KB

  6. #286

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    As already mentioned the "PictureAndCaption" property needs at least Windows Vista.
    For the other issues. Please upload the demo project in order to make tests on it.

  7. #287
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    Oh Windows Vista. OK I see now. Means comctl32.dll 6.1 follows the Windows versioning. 6.1 = Vista.

    Attached is the test project.
    Attached Files Attached Files

  8. #288

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by chosk View Post
    Oh Windows Vista. OK I see now. Means comctl32.dll 6.1 follows the Windows versioning. 6.1 = Vista.
    No. Vista is NT 6.0. Win7 is NT 6.1.
    But the comctl32.dll version on Vista is 6.1.

  9. #289
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    OK. Now I know the actual details, should not have use icons by default for all the CommandButtonW. I will research whether I can check for comctl32.dll version and then Select Case either to or not to use the ".Picture" and ".PictureAndCaption" properties in Form_Load.

  10. #290

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by chosk View Post
    OK. Now I know the actual details, should not have use icons by default for all the CommandButtonW. I will research whether I can check for comctl32.dll version and then Select Case either to or not to use the ".Picture" and ".PictureAndCaption" properties in Form_Load.
    You can use the "ComCtlsSupportLevel" function and if the result is equal or higher than 2, then you can use the "PictureAndCaption" property.

    Code:
    If ComCtlsSupportLevel() >= 2 Then [...]

  11. #291
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    Thanks. I just tested this on Win7 and it works. The CommandButtonW1 does not have a picture by default. Now it is better I fix up a WinXP box and do all the testing.

    Code:
    If ComCtlsSupportLevel() >= 2 Then
        CommandButtonW1.Picture = ImageList1.ListImages(1).Picture
        CommandButtonW1.PictureAndCaption = True
    Else
        CommandButtonW1.PictureAndCaption = False
    End If
    Last edited by chosk; Mar 12th, 2014 at 11:55 AM. Reason: use CODE instead of QUOTE

  12. #292

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    I just tested on WinXP concerning the classic CommandButtonW appearance and it seems that if the ".Picture" property is used (in WinXP only) then the appearance is always classic. So this is not a bug, it is a "feature" in WinXP.

    Concerning the "vertically stack" problem on the TabStrip control. I could not replicate it. Does a extra "Me.Refresh" or/and "DoEvents" in the CreateTabStrip sub solves this issue on the concerned machine?
    Last edited by Krool; Mar 12th, 2014 at 12:20 PM.

  13. #293
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Concerning the "vertically stack" problem on the TabStrip control. I could not replicate it. Does a extra "Me.Refresh" or/and "DoEvents" in the CreateTabStrip sub solves this issue on the concerned machine?
    I am not sure whether I can go back and forth with them. Just receive another one, this time from the look it is either Vista or Win7. I think I have to remove the TabStrip and use another control. Maybe I try TreeView.

    Name:  jb4v.jpg
Views: 7727
Size:  5.3 KB

  14. #294

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by chosk View Post
    I am not sure whether I can go back and forth with them. Just receive another one, this time from the look it is either Vista or Win7. I think I have to remove the TabStrip and use another control. Maybe I try TreeView.

    Name:  jb4v.jpg
Views: 7727
Size:  5.3 KB
    Please check if my suggested solution will help. Thanks

  15. #295
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    I put DoEvents in the first location and also after the Me.Refresh in second location. I sent the exe over to test and came back same problem.

  16. #296
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    The one I did not know whether Vista or Win7, it is Vista Home Premium and the test (with the DoEvents) came back Tabs stack vertically.

    To retrace the issue:
    1) Initially, when I tested on my Win8 with 6 tabs, no problem.
    2) I increased to 12 tabs, on my Win8 they stack vertically starting from the bottom.
    3) I added the Me.Refresh, problem on my Win8 solved.
    4) I did not have a WinXP to test.
    5) I sent out updates.
    6) Problem reported on 3 WinXP (so far) and 1 Vista Home.

    Name:  g6nh.jpg
Views: 6607
Size:  19.5 KB

  17. #297
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    I am researching on the Internet on CreateWindowEx TabStrip and usually see the WS_EX_LEFT as an included parameter. I did a find for WS_EX_LEFT in the CreateTabStrip proceedure and did not find any.

    What is this and what does it do?

  18. #298

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by chosk View Post
    I am researching on the Internet on CreateWindowEx TabStrip and usually see the WS_EX_LEFT as an included parameter. I did a find for WS_EX_LEFT in the CreateTabStrip proceedure and did not find any.

    What is this and what does it do?
    WS_EX_LEFT is default and its value is &H0, so this can not be the reason.

  19. #299
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    I just received another feedback the same thing happen in an Atom tablet running Windows 8.1 (non RT).

  20. #300
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    chosk,
    Your mistake with the control TabStrip confirmed in a your test project (on my Win7). To solve your problem, I tried to replace a Ambient.UserMode to global variable g_mbUserMode. And it happened, the compiled project looks correct.
    In the wilds of the Internet I've seen that, Ambient.UserMode not always work out.

    module startup prescribed definition
    Public g_mbUserMode As Boolean

    and assigning a value to a variable
    Sub Main ()
    g_mbUserMode = True

  21. #301

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    Your mistake with the control TabStrip confirmed in a your test project (on my Win7). To solve your problem, I tried to replace a Ambient.UserMode to global variable g_mbUserMode. And it happened, the compiled project looks correct.
    In the wilds of the Internet I've seen that, Ambient.UserMode not always work out.

    module startup prescribed definition
    Public g_mbUserMode As Boolean

    and assigning a value to a variable
    Sub Main ()
    g_mbUserMode = True
    You mean the reason that the tabs are vertically stacked is due to the Ambient.UserMode property?
    Last edited by Krool; Mar 13th, 2014 at 12:49 PM.

  22. #302
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    You mean the reason that the tabs are vertically stacked is due to the Ambient.UserMode property?
    Yes it is.
    Depends on what I do not know, on one win7 I look normal on the second win7 tab are not just vertically, but without pictures and caption. The problem occurs only in the compiled exe.
    All that i made ​​it - replaced Ambient.UserMode property, and after compiling all was well

  23. #303

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    Yes it is.
    Depends on what I do not know, on one win7 I look normal on the second win7 tab are not just vertically, but without pictures and caption. The problem occurs only in the compiled exe.
    All that i made ​​it - replaced Ambient.UserMode property, and after compiling all was well
    Can you try to isolate which call to Ambient.UserMode is causing exactly the problem?

  24. #304
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Can you try to isolate which call to Ambient.UserMode is causing exactly the problem?
    I will try to identify where the problem, but it is only at home in the evening, as on all working machines I have everything works correctly (XP/7/8).

  25. #305
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    I will try to identify where the problem, but it is only at home in the evening, as on all working machines I have everything works correctly (XP/7/8).
    Enough to replace one parameter
    Private Sub CreateTabStrip()
    ....
    If TabStripHandle <> 0 Then
    If Ambient.UserMode = True Then Call ComCtlsSetSubclass(TabStripHandle, Me, 1)
    End If
    End sub

  26. #306

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    Enough to replace one parameter
    Private Sub CreateTabStrip()
    ....
    If TabStripHandle <> 0 Then
    If Ambient.UserMode = True Then Call ComCtlsSetSubclass(TabStripHandle, Me, 1)
    End If
    End sub
    Hmmm.. is the Ambient.UserMode property returning "False" on the effected machine?
    Or does it return "True", but just the call to it will do the issue to the TabStrip?
    Is this also effecting the OCX version?

  27. #307
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Hmmm.. is the Ambient.UserMode property returning "False" on the effected machine?
    Or does it return "True", but just the call to it will do the issue to the TabStrip?
    Ambient.UserMode return "True" - I tested it by adding a Msgbox

    By my mistake I made ​​in the variable assignment procedure sub main, and the project started with a form Form1.
    As a result g_mbUserMode is always False, so the procedure call Call ComCtlsSetSubclass (TabStripHandle, Me, 1) does not occur. And then everything looks correct, but it works right? This is another question!

    Quote Originally Posted by Krool View Post
    Is this also effecting the OCX version?
    In OCX-version all is work correctly

  28. #308

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    Ambient.UserMode return "True" - I tested it by adding a Msgbox

    By my mistake I made ​​in the variable assignment procedure sub main, and the project started with a form Form1.
    As a result g_mbUserMode is always False, so the procedure call Call ComCtlsSetSubclass (TabStripHandle, Me, 1) does not occur. And then everything looks correct, but it works right? This is another question!


    In OCX-version all is work correctly
    So Ambient.UserMode returns the correct value. But the call to it mess up the TabStrip?
    Very strange problematic...

  29. #309
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    Recall that I have a Win8 x64 that exhibited the problem of the vertically stacked tabs. I was thinking this seems to be a problem of not able to create the tabs with the "proper" width and instead stretched full width and stacked. So I did a test. First I REM out the earlier Me.Refresh fix so that I can replicate the problem.

    Strangely this time there was a problem but not the same problem. It resembles the problem one of the user reported back on Vista Home Premium.

    Previously the tabs width were Justified. Now I tried Justified and Fixed. I hope the attached picture is self-explanatory and for further input hopefully can help in tracing the problem.

    Name:  7dx.jpg
Views: 7211
Size:  45.3 KB

  30. #310
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    On the Toolbar. In your demo, the Divider is set to False, I set it to True to see how it would look like.

    1) With Schmidt's method of inserting manifest into VB6.exe (the normal manifest file method does not work for me):
    Initially, I see a thin sunken line between the top of the Toolbar and the Form caption bar. Then I run the project from the IDE. I get artifacts when I move the mouse around the Toolbar. Then when I close the run, back to the IDE, the Toolbar become black. I close and open the demo project, the Toolbar still black.

    2) With the original VB6.exe, that is no theme:
    No problem in the IDE, also after close the demo project and re-open no problem. But when I compiled (with your manifest in res), the compiled exe exhibited the same artifacts problem.

    Perhaps the problem have to do when the Toolbar is themed and Divider is True?

    Name:  4670.jpg
Views: 7286
Size:  24.6 KB

  31. #311

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by chosk View Post
    Perhaps the problem have to do when the Toolbar is themed and Divider is True?
    That issue and one issue concerning the double-buffering are now fixed. Thanks for your report.

  32. #312
    New Member
    Join Date
    Jan 2014
    Posts
    6

    Re: CommonControls (Replacement of the MS common controls)

    Krool, does ListView support unicode?

  33. #313

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Almeida View Post
    Krool, does ListView support unicode?
    Yes.

  34. #314
    New Member
    Join Date
    Jan 2014
    Posts
    6

    Re: CommonControls (Replacement of the MS common controls)

    Krool, thank you. i just wanted to make sure before delving into it.

  35. #315

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    I have found the problem with the "vertically stacked tabs" in the TabStrip control.
    Reason was that the variable PropTabMinWidth is an 'Integer' and the lParam of the SendMessage expects a 'Long' variable.
    So there was actually a value problem. It took the 2 bytes from the PropTabMinWidth variable and the other 2 bytes from "somewhere else" in the memory, resulting in a nonsense value. (but not always)
    The fix was simple. I just put a CLng() around it.

  36. #316
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Krool, Once we have so much time to discussing TabsStrip, make suggestions!
    Can add to your set CommonControls control SStab (TabCtl32.ocx)?
    I understand there are not very many differences from TabStrip, except that each tab is a separate container, and controls can be added to any of them even in the IDE.
    If interested, I have two examples of more or less working but unstable

  37. #317
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    Thanks Krool for the update. Very much appreciated.

  38. #318

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Update released. (Thanks to Jonney for finding)

  39. #319
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Using listview on some computers I have an incomprehensible situation. Text element is reduced to a certain size, and placed at the end ...
    Name:  listview.JPG
Views: 7618
Size:  9.8 KB
    How can I fix this?

    I use a view=2 'viewlist
    Elements add the following code
    With lvOptions.ListItems
    If .Count = 0 Then
    .Add 1, , strItemOptions1, , 1
    .Add 2, , strItemOptions8, , 2
    .Add 3, , strItemOptions2, , 3
    .Add 4, , strItemOptions3, , 4
    .Add 5, , strItemOptions4, , 5
    .Add 6, , strItemOptions5, , 6
    .Add 7, , strItemOptions9, , 7
    .Add 8, , strItemOptions6, , 8
    .Add 9, , strItemOptions10, , 9
    End If
    End With

  40. #320

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    Using listview on some computers I have an incomprehensible situation. Text element is reduced to a certain size, and placed at the end ...
    Name:  listview.JPG
Views: 7618
Size:  9.8 KB
    How can I fix this?

    I use a view=2 'viewlist
    Elements add the following code
    Use the 'ColumnWidth' property and set it to a higher value.

Page 8 of 105 FirstFirst ... 5678910111858 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width