Page 60 of 94 FirstFirst ... 10505758596061626370 ... LastLast
Results 2,361 to 2,400 of 3726

Thread: CommonControls (Replacement of the MS common controls)

  1. #2361

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Update released

    The BackColor property works now when the VisualStyles property is False and regardless of the style, placement or draw mode.. So BackColor is always rendered now.

    Name:  TabStripBackColorUnthemed.png
Views: 1399
Size:  493 Bytes

    Due to the 2-step drawing of the TabStrip (WM_ERASEBKGND+WM_PAINT) I decided to include a DoubleBuffer property merging the two steps into one in a memory DC on WM_PAINT.
    This reduces flicker also for the themed TabStrip.(!)

    Quote Originally Posted by Mith View Post
    At the beginning i was confused because at the IDE your dont see the defined background color.
    That's because I want to avoid subclassing the control + usercontrol at design time. The property is clearly stating:
    "Returns/sets the background color used to display text and graphics in an object. This property is ignored at design time."

    Quote Originally Posted by Mith View Post
    There exists a ListItem property named "UseItemStyleForSubItems" that enables you to change the backcolor of ListItems and SubItems.

    Is it possible to add this property to the ListView control?

    See https://www.google.com/search?q=list...yleForSubItems
    You'r right. There is no BackColor property for ListItems and SubItems..
    However, you can change the BackColor via the ItemBkColor event. (applicable for all it's SubItems of an ListItem)

    Code:
    ListView1_ItemBkColor(ByVal Item As LvwListItem, RGBColor As Long)
    Quote Originally Posted by Mith View Post
    the first item is auto selected but i used AutoSelectFirstItem=False
    I re-checked and confirm that this behavior is intended.
    If AutoSelectFirstItem is True the item has LVIS_SELECTED + LVIS_FOCUSED
    If False the item has only LVIS_FOCUSED

    But in both cases .SelectedItem returns an item because it checks for LVNI_FOCUSED.
    This behavior is intended to be like this and won't be changed.

    Quote Originally Posted by Mith View Post
    can avoid this alignment-swapping
    As you noted you can workaround this by having fullrowselect = true
    MSDN says:
    LVS_REPORT
    This style specifies report view. When using the LVS_REPORT style with a list-view control, the first column is always left-aligned. You cannot use LVCFMT_RIGHT to change this alignment. See LVCOLUMN for further information on column alignment.


    I know this limitation. In my implementation I workaround this by adjust the LVCOLUMN.fmt value after the insert of the item.
    So at least it works for fullrowselect = true. However, when that's False then you have glitches.
    Last edited by Krool; Aug 24th, 2019 at 09:38 AM.

  2. #2362
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    416

    Re: Run-time-error ´429´ ActiveX component can´t create object

    Quote Originally Posted by Mith View Post
    VBCCR15 v1.5.20 (side by side)

    some users got the following error message box when starting my app under windows 10:

    Code:
    VBCCR15
    Run-time-error ´429´
    ActiveX component can´t create object
    This error message displays 2 more times after clicking the OK button.
    after that the app shows "Run-time-error ´440 Automation error" and the app GUI never displays.

    Any ideas how to fix or debug this problem?

    Does anyone know what kind of objects will be created by VBCCR15 ?

    Maybe it is some kind of a dependency problem?

    BTW: i cant reproduce this problem by myself using win10...
    Did you ever discover the cause of this? I'm having what I believe is a similar issue. Upon launching my application, two users both report a msgbox window with title "VBCCR16" and a message of "Run-time error 0". When they click OK they get a Run-time-error 429. And my app never appears. This is my first app I've deployed with VBCCR16 so any support tips for dealing with these issues would be appreciated!
    Last edited by AAraya; Sep 1st, 2019 at 06:50 PM.

  3. #2363

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: Run-time-error ´429´ ActiveX component can´t create object

    Quote Originally Posted by AAraya View Post
    Did you ever discover the cause of this? I'm having what I believe is a similar issue. Upon launching my application, two users both report a msgbox window with title "VBCCR16" and a message of "Run-time error 0". When they click OK they get a Run-time-error 429. And my app never appears. This is my first app I've deployed with VBCCR16 so any support tips for dealing with these issues would be appreciated!
    Do you use ImageList with 32 bit pictures?
    It has been discussed several times with run-time error 0. It's MS fault and I can't really help.

  4. #2364
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    416

    Re: Run-time-error ´429´ ActiveX component can´t create object

    Quote Originally Posted by Krool View Post
    Do you use ImageList with 32 bit pictures?
    It has been discussed several times with run-time error 0. It's MS fault and I can't really help.
    I may. I will check. What is the solution for this problem? What color-depth is acceptable for this control?

    Also, I'm curious why only a couple of my users see this. What other factors are involved here?

  5. #2365
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: CommonControls (Replacement of the MS common controls)

    Try to investigate the differences between the users.
    Windows versions etc etc

  6. #2366
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: Run-time-error ´429´ ActiveX component can´t create object

    I remember a similar problem.
    No special reason found, but the solution:

    Some of my form had an icon associated in the IDE.
    On my test-PCs all worked fine, on some but not all users PCs not.
    Error 429, error 0, and only when using VBCCR.

    The solution was to remove the icons of the forms.
    And set them by code during runtime.
    No single error since then.

    This is a shot in the dark, but perhaps you can try.

    EDIT:
    I think the error came up on Win7 systems only.
    Last edited by Karl77; Sep 2nd, 2019 at 08:26 AM.

  7. #2367
    Junior Member
    Join Date
    Nov 2015
    Posts
    30

    Re: Run-time-error ´429´ ActiveX component can´t create object

    <deleted duplicate post>

  8. #2368
    Junior Member
    Join Date
    Nov 2015
    Posts
    30

    Re: Run-time-error ´429´ ActiveX component can´t create object

    IIRC the problem is that Win10 accepts images to be loaded into the imagelist at design time which are NOT acceptable to Windows 7. So everything works fine on a Win10 dev machine but can fail when the app is run on Win7.

    Details:
    https://stackoverflow.com/a/54136587/3195477


    and actually this other post was trying to get to the bottom of the issue in Windows:
    https://stackoverflow.com/questions/...ion-of-windows

    but never had a satisfactory conclusion.

  9. #2369
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    445

    Question Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    VBCCR16 v.1.6.45

    one user recieved this error message using my app under win10:

    Name:  Zwischenablage01.jpg
Views: 1344
Size:  8.8 KB

    Run-time-error -2147221164 (80040154) Class not registered

    I use VBCCR16.OCX side-by-side w/o registering the ocx.

    any ideas how to fix that?

    I cant reproduce this error message myself using a fresh installed win10.

    Thanks for any help!

  10. #2370

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    Quote Originally Posted by Mith View Post
    VBCCR16 v.1.6.45

    one user recieved this error message using my app under win10:

    Name:  Zwischenablage01.jpg
Views: 1344
Size:  8.8 KB

    Run-time-error -2147221164 (80040154) Class not registered

    I use VBCCR16.OCX side-by-side w/o registering the ocx.

    any ideas how to fix that?

    I cant reproduce this error message myself using a fresh installed win10.

    Thanks for any help!
    Is the side-by-side msnifest in a resource file integrated into the .exe or external file?
    Some windows installation don't accept external file manifests due to settings.

  11. #2371
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    445

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    Quote Originally Posted by Krool View Post
    Is the side-by-side msnifest in a resource file integrated into the .exe or external file?
    Some windows installation don't accept external file manifests due to settings.
    Yes, the manifest file is integraded into a ressource file compiled into the exe.

    but guess what, i told the user to manually register the VBCCR16.OCX and now the app runs w/o the error!

    i thought we dont need to register SxS files at the system to use them, or im wrong?

  12. #2372
    Junior Member
    Join Date
    Nov 2015
    Posts
    30

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    <deleted duplicate post>

  13. #2373
    Junior Member
    Join Date
    Nov 2015
    Posts
    30

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    Quote Originally Posted by Mith View Post
    i thought we dont need to register SxS files at the system to use them, or im wrong?

    Registering it manually was a workaround for the problem in the manifest. If you can correct the manifest then it isn't necessary.

    I've sometimes found Process Monitor and Process Explorer (google) useful to debug VB6 manifest issues. You can see what tries to get loads & fails, what really is loaded, etc.

  14. #2374
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    445

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    Quote Originally Posted by DaveInCaz View Post
    Registering it manually was a workaround for the problem in the manifest. If you can correct the manifest then it isn't necessary.

    I've sometimes found Process Monitor and Process Explorer (google) useful to debug VB6 manifest issues. You can see what tries to get loads & fails, what really is loaded, etc.
    i tested the app with windows 10 / WinXP and no error occured. the manifest file should be correct, or?

    i also compared my manifest file with the file "VBCCR16SideBySide.res" and everything is the same.
    my manifest file includes more than 20 ocx/dll files and none of them makes a problem.
    i guess there must be another problem with the computer of the user because all other users can use the app w/o any problem!
    The question is: what is wrong with this computer?
    SxS works at this computer, because all other OCX files dont need to be manually registered.
    Last edited by Mith; Sep 7th, 2019 at 09:42 AM.

  15. #2375
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    Can someone tell me the advantages to not register the OCX?

  16. #2376

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    Quote Originally Posted by Karl77 View Post
    Can someone tell me the advantages to not register the OCX?
    Yes, "dll-hell"

  17. #2377
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    445

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    Quote Originally Posted by Karl77 View Post
    Can someone tell me the advantages to not register the OCX?
    - your app can use another dll version than the one on the system installed
    - all the DLLs you use can stay in one (sub)folder
    - portable app

  18. #2378
    New Member
    Join Date
    Sep 2019
    Posts
    8

    Re: CommonControls (Replacement of the MS common controls)

    Thanks a lot for your valuable work sir!
    I Packaged the 'ComCtlsDemo' project using 'Package & Deployment Wizard' and installed the application on my Windows 10 - 32 bit PC. When I run the application, all the controls look beautiful with latest theme. But, when I click on 'RichTextBox' or 'Command2' button, the application crashes without any warning. However, everything works just fine under VB IDE, though the controls look in classic style.

    Please suggest a solution!

    Also, if possible, please add Scrollbar controls.

  19. #2379
    Junior Member
    Join Date
    Nov 2015
    Posts
    30

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    Quote Originally Posted by Karl77 View Post
    Can someone tell me the advantages to not register the OCX?
    In general (not specific to this OCX) I've found that our manifested VB6 apps are far more robust. Our manifest is quite comprehensive of dependencies and this has reduced a lot of brittleness and customer support issues because there are just far fewer places for things to go wrong.

    Aside from the fact that the manifested app is more isolated from other random changes on the customer's PC, it also means we are always running against & testing against exactly the configuration that we ship.

    Dave

  20. #2380
    New Member
    Join Date
    Sep 2019
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Hi, I have a problem with the Toolbar. The TAGs of the ButtonMenus of the Buttons disappear when saving/running the project. I've used the KEY instead of TAG as a workaround but don't know if it's a bug.

  21. #2381

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by PauloFranc View Post
    Hi, I have a problem with the Toolbar. The TAGs of the ButtonMenus of the Buttons disappear when saving/running the project. I've used the KEY instead of TAG as a workaround but don't know if it's a bug.
    That was a bug, which was easy to fix now.
    Thanks for reporting.

  22. #2382
    New Member
    Join Date
    Sep 2019
    Posts
    8

    Re: CommonControls (Replacement of the MS common controls)

    I am using VBCCR16. OCX.
    I observed that when rtf text is loaded in RichTextBox and if ScrollBars property is 3 - vbBoth, the rtf text gets aligned horizontally outside horizontal boundaries of RichTextBox and only Horizontal ScrollBar appears. So you've to traverse horizontally to read the text.

    I think the case should be opposite.
    The rtf text should align vertically and so a Vertical ScrollBar should appear first. Therefore, you should be able to traverse vertically to read rtf text.

  23. #2383
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    445

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    Quote Originally Posted by Mith View Post
    VBCCR16 v.1.6.45

    one user recieved this error message using my app under win10:

    Name:  Zwischenablage01.jpg
Views: 1344
Size:  8.8 KB

    Run-time-error -2147221164 (80040154) Class not registered

    I use VBCCR16.OCX side-by-side w/o registering the ocx.

    any ideas how to fix that?

    I cant reproduce this error message myself using a fresh installed win10.

    Thanks for any help!
    Another user has send me the same bugreport.

    He installed windows 10 v1903 and after he installed my app.
    When starting the app he got the error "VBVCCR16 Run-time error "-2147221164 (80040154)": Class not registered".
    I told him to manually register the file and now the app runs well.

    Why he have to manually registering a side-by-side OCX file? I dont get it...

  24. #2384
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    Quote Originally Posted by Mith View Post
    Why he have to manually registering a side-by-side OCX file? I dont get it...
    When I began using VBCCR, I also used the side-by-side approach.
    In here it turned out that it was not reliable.
    Of course I thought (and think) this was caused by my own errors.

    In order to avoid DLL hell, I made my 'own' VBCCR with a different name.
    It can't conflict with the original.
    While I was at that, I married VBCCR and VBFlexGrid, and added most of my own UCs.

    And because it is so simple, I register this 'All-in-one' OCX on setup.
    No single error up to now.

  25. #2385

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    I can't replicate any SxS error. It would be interesting to know if something is missing in the manifest or if this is just windows setting confusion stuff on certain users.

  26. #2386
    Junior Member
    Join Date
    Nov 2015
    Posts
    30

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    I can't replicate any SxS error. It would be interesting to know if something is missing in the manifest or if this is just windows setting confusion stuff on certain users.
    FWIW I've been running VBCCR1x in a SxS manifest for years and have never had a problem either.

  27. #2387
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,412

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    I can't replicate any SxS error. It would be interesting to know if something is missing in the manifest or if this is just windows setting confusion stuff on certain users.
    Maybe related to the manifest padding issue described here?

  28. #2388
    New Member
    Join Date
    Sep 2019
    Posts
    10

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    Just to say thanks for making this and making it available to all of us that are still using VB6

    And thanks for how fast you solved this...

  29. #2389
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    445

    Re: Windows 10 Run-time-error -2147221164 (80040154) Class not registered

    Quote Originally Posted by Karl77 View Post
    In order to avoid DLL hell, I made my 'own' VBCCR with a different name.
    It can't conflict with the original.
    The user did a fresh windows 10 installation and there was no other VBCCR16.OCX on that system installed...

    i guess there must be some windows 10 bug with the SxS functionality.
    It looks like that the Windows system cant automatically register the file VBCCR16.OCX when starting the app.
    But as i wrote before, i cant reproduce this problem at Windows 10 and 1000 other users dont have this problem too.
    Only 1-2 users expierend this problem and the workaround is to register the OCX for all users at the windows system.
    I used SxS to avoid registering the OCX files of my app for all windows users but now SxS not works correctly and only for the file VBCCR16.OCX.
    All the other OCX/DLLs of my app have no problem with SxS...strange

  30. #2390
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    445

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by jpbro View Post
    Thanks for the hint but the manifest works w/o any problems for me and the most users.
    i couldnt find any error at the manifest file.

    Juding by the error message of the 2 users it looks like there be some other reason the windows system cant automatically registering VBCCR16.OCX when the app starts...

  31. #2391

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mith View Post
    Thanks for the hint but the manifest works w/o any problems for me and the most users.
    i couldnt find any error at the manifest file.

    Juding by the error message of the 2 users it looks like there be some other reason the windows system cant automatically registering VBCCR16.OCX when the app starts...
    My bet is that they make a custom resource file with all kinds of manifests (xml nodes) included and that maybe in that heavy weight .res file there is a issue with the manifest.

    Would be interesting to know those users who have problem with SxS with VBCCR16.OCX still have it when using the "original" manifest which can be downloaded here.

  32. #2392
    Hyperactive Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    445

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    My bet is that they make a custom resource file with all kinds of manifests (xml nodes) included and that maybe in that heavy weight .res file there is a issue with the manifest.
    I already tested the app on all windows platforms from WinXP to Win10 and there are no SxS problems.
    And thousand other users using the app on different windows platforms and noone had a problem so far with SxS and VBCCR16.
    IMHO the problem not comes from a wrong manifest file. If so all users including me should expierend the same problem, or?

    Quote Originally Posted by Krool View Post
    Would be interesting to know those users who have problem with SxS with VBCCR16.OCX still have it when using the "original" manifest which can be downloaded here.
    Sorry, thats currently not possible. The users with the SxS problem already have registered the OCX file at their windows system...

    My bet is there is some kind of a windows bug that prevents the VBCCR16.OCX to register themself under specific circumstances when the app starts. Maybe it have something to do with the user rights?

  33. #2393
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mith View Post
    Sorry, thats currently not possible. The users with the SxS problem already have registered the OCX file at their windows system...
    If your user is patient and willing to help you (and all of us), he could unregister it and see what happens.

  34. #2394
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: CommonControls (Replacement of the MS common controls)

    > Sorry, thats currently not possible. The users with the SxS problem already have registered the OCX file at their windows system...

    Manifests overwrite registry COM entries.

    It's possible to get into a limbo though, a franken-registration where half the keys are from the manifest and some missing entries are gleaned from the registry.

    That would be very hard to debug, probably w/ RegMon from sysinternals on the broken machine.

    cheers,
    </wqw>

  35. #2395
    Lively Member
    Join Date
    Oct 2016
    Posts
    108

    Re: CommonControls (Replacement of the MS common controls)

    thanks krool for all your work...

    one suggestion, could you add an about box for each control, many a time I got confused what control I am using, MS Controls or VBCCRP.

    thanks

  36. #2396
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    FONTCOMBO QUESTION

    I'm in the middle of investigating the FontCombo control (struggling with the "@" fonts).

    Code:
    Private Function EnumFontFunction
    is called twice.
    I wonder if this is right or not?

  37. #2397

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    FONTCOMBO QUESTION

    I'm in the middle of investigating the FontCombo control (struggling with the "@" fonts).

    Code:
    Private Function EnumFontFunction
    is called twice.
    I wonder if this is right or not?
    Yes, that's correct. The enum is per charset and the additional enum is wanted for the SYMBOL_CHARSET.

  38. #2398
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    FONTCOMBO QUESTION2

    In the EnumFontFunction I need to exclude determined fonts from populating the list.
    I added a ExcludeList property to the control.
    Works fine if I set the ExcludeList at design time.

    But I need the functionality at runtime.
    That doesn't work because the list gets populated before I can set my ExcludeList.
    I tried with .Refresh after setting the ExcludeList, but that doesn't work either.

    What should I do?

  39. #2399

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    FONTCOMBO QUESTION2

    In the EnumFontFunction I need to exclude determined fonts from populating the list.
    I added a ExcludeList property to the control.
    Works fine if I set the ExcludeList at design time.

    But I need the functionality at runtime.
    That doesn't work because the list gets populated before I can set my ExcludeList.
    I tried with .Refresh after setting the ExcludeList, but that doesn't work either.

    What should I do?
    What does your custom ExcludeList property exactly?
    So I can check why it's only working at design time.
    Workaround could be that at run-time you loop thru all items and use CB_DELETESTRING.

  40. #2400
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    524

    Re: CommonControls (Replacement of the MS common controls)

    So I can check why it's only working at design time.
    That's now logical to me, because the list gets populated before the UC can read the property.
    And after I set the ExcludeList property there is not function to recreate the list.
    So no need to check on this.

    Workaround could be that at run-time you loop thru all items and use CB_DELETESTRING.
    That seems to be the only correct way to me, and not a workaround.
    Because the EnumFontFunction runs twice as you explained, it makes no sense to do the exclusion in that place.

    Could you make a very short example on how to CB_DELETESTRING from the Combobox?
    I fear to destroy the order when certain items get deleted.

    Thank you for that.

Page 60 of 94 FirstFirst ... 10505758596061626370 ... 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