Page 41 of 105 FirstFirst ... 31383940414243445191 ... LastLast
Results 1,601 to 1,640 of 4199

Thread: CommonControls (Replacement of the MS common controls)

  1. #1601
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Due to the fact that the default FaceName in vb6.exe is limited to 13 chars there seems to be no way to define "Microsoft Sans Serif", right?
    So we could define "Segoi UI" but would need to life with FontSize of 8 instead of 9?
    To be consistent with newer versions of Windows, Segoe UI 9pt would be better.

    Quote Originally Posted by VBNetMatrix
    I did tutorial in a Vb6 project and I started a blog about all thing I want to share about Vb6...
    The blog is "under construction" but project is available...
    Does your VB6 'hack' change the font used in a VB6 app's menu ?

  2. #1602
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: CommonControls (Replacement of the MS common controls)

    Krool,

    In the Toolbar control you can change the font and this works fine. But the font used in the dropdown 'ButtonMenus' doesn't change. Is there any way to set this font ?

  3. #1603
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by VB6 Programming View Post
    To be consistent with newer versions of Windows, Segoe UI 9pt would be better
    Probably not a bad choice. That font appears to be available since Vista. If an app, using that font were shipped to XP (for sake of argument), the font would be changed to something else unless font is also shipped.

    I created a test app in Vista with a font I know wasn't installed on Win10. When opened in Win10, that font was changed to Arial. I don't know how VB (or system) selected Arial other than some system font-fallback algo. The plus side to this is that Arial is at least an Open/True type font which would scale better with DPI awareness.

    If hacking the vb6.exe, suggest considering how far back one wants to support backward compatibility with fonts. Other options for fonts that do not use hacking vb6.exe are:

    1) Whenever a form is added to your project, first thing to do is change the font on the form. Then, with most controls, the added control can inherit the form's font.

    2) Create a form with the desired font and save it to VB's \Template\Forms folder and name it something like "Default.frm". Now you can replace the base form VB gave you with that one (via the selection window) and can select that new default whenever you want to add additional forms to the project. Similar solution for MDI forms: \Template\MDIForms folder.

    In any case, font-fallback will be in play if the font you chose is not installed on the systems the app is run on. It's a shame VB didn't buffer the embedded font name within vb6.exe with full 32 characters.

    My only concern for hacking VB6.exe would be that it would fail to open if an uninstalled font was hacked into the exe. Maybe it would just default to Arial or something else? Maybe it will crash? Probably should verify that by hacking a completely bogus font name: BogusFont (suffixing null chars or spaces to fill it out to 13 chars)

    Edited & FYI: using NotePad to enter a bogus font in an existing .frm file did NOT prevent the form from loading. The font, however, was changed to Arial (Win10). Maybe Arial would be a more consistent choice instead of Segoe UI?

    One more edit... Hacked vb6.exe myself and provided a bogus font and VB defaulted to Arial. I then re-hacked it and provided a valid font and all went well. There are two locations in the exe where "MS Sans Serif" is listed, I replaced both instances, filling out the 13 characters with null chars as needed. I chose Arial over Segoe UI, but Segoe UI worked also. I personally prefer Arial as the default. Always hack a copy of the exe. And be pretty sure of the font you want. If you revisit this in a year, you may forget that the space allocated for the font is 13 characters. The font displayed in the exe won't show as 13 characters any longer if you selected a font with a shorter name.
    Last edited by LaVolpe; Aug 20th, 2017 at 01:35 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #1604
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by LaVolpe View Post
    Probably not a bad choice. That font appears to be available since Vista. If an app, using that font were shipped to XP (for sake of argument), the font would be changed to something else unless font is also shipped.
    Segoe UI has been the default Windows font since Vista, and has shipped with Office since Office2007 (so is often found on XP PCs too). The Microsoft logo uses the Segoe font.

    I personally prefer Arial as the default.
    I like Arial too. It was just that Microsoft chose Segoe for Windows that made me choose it.

    Create a form with the desired font and save it to VB's \Template\Forms folder and name it something like "Default.frm". Now you can replace the base form VB gave you with that one (via the selection window) and can select that new default whenever you want to add additional forms to the project. Similar solution for MDI forms: \Template\MDIForms folder.
    That's how I do it. And I also save a Project (and Form) into the \Template\Projects folder, so I don't need to replace the base form each time.
    But the Menu font remains as MS Sans Serif 8pt.

  5. #1605

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Hosam AL Dein View Post
    I have 2 issues here with listview

    1 - when setting the property "usecolumnchevron" to true and autosizing the last column to header , these bugs occur

    a - the header caption disappears
    b - the width of the column gets too wide and the arrows "chevron" appear
    a: If the column headers are wider than the client area and can't be displayed all together the chevron button is shown.
    It is normal behavior that that caption where the chevron button currently is will not be shown.
    b: I already explained, but again: When doing autosize to the last columnheader it is sized to right side of client edge.

    Quote Originally Posted by Hosam AL Dein View Post
    when you set a splitbutton to a column and you manually re-position it , it loses the property and it is set to the other column which replaces it
    Seems to be an MS bug as other column properties (e.g. CheckBox) is shifting properly. The splitbutton though will stick to current column order and thus shifts to another column.
    It seems worth to make some internal extra effort to address that bug. Bug is noted.

    Quote Originally Posted by Hosam AL Dein View Post
    also in linklabel , the font is not affected in design time . run the project once , now it will be drawn in both run time and design time
    Fixed. Thanks. It was not an bug per definition, but linklabel did not refresh after WM_SETFONT so a RedrawWindow was necessary afterwards.

    Quote Originally Posted by Hosam AL Dein View Post
    it is in linklabel , when set to transparent this bug happens
    Fixed. Thanks. It was not an bug per definition, but linklabel needed the dummy WM_PAINT after creation before the intial caching transparent brush.
    Info: On all controls the caching of the transparent brush can be renewed with '.Refresh'. So keep in mind whenever background changes and you want to update the transparency make an .Refresh.

    Quote Originally Posted by VB6 Programming View Post
    In the Toolbar control you can change the font and this works fine. But the font used in the dropdown 'ButtonMenus' doesn't change. Is there any way to set this font ?
    The dropdown 'ButtonMenus' uses the system font.
    Again, the .ButtonMenus property is meant for simple and rapidstart use. If you want to have custom font do as following:
    Don't set any ButtonMenu in .ButtonMenus, instead handle the event 'ButtonDropDown' and create your own menu there. (e.g. custom drawn PopupMenu)

    -

    Edit: OCX was also updated conerning LinkLabel.
    Last edited by Krool; Aug 20th, 2017 at 03:31 PM.

  6. #1606
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Due to the fact that the default FaceName in vb6.exe is limited to 13 chars there seems to be no way to define "Microsoft Sans Serif", right?
    So we could define "Segoi UI" but would need to life with FontSize of 8 instead of 9?

    Well... yes that's an issue for Microsoft Sans Serif... the other solution would be to rename a font to a smaller name, this can be achieve with a tools... problem is you'll need to distribute that font with your EXE because I doubt the destination computer would "recognized" it as the original font...

    However, on my machine, the program give me 126 other fonts to choose from, including SegoUI and Arial... wich are both "acceptable"

    as for the size, I didn't find a place in the vb6.exe where they store it. I assume, 8 is the minimal font size of ms sans serif and that might be why that size was selected. something like MinSizeOfFont("Ms Sans Serif") worth exploring since I noticed the font "Ms Sans Serif" was also stored at another adress in the exe, I'll make some test to validate that theory.

    Did you tried the Vb6.exe font changer from my blog yet ?

  7. #1607
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by VB6 Programming View Post
    To be consistent with newer versions of Windows, Segoe UI 9pt would be better.
    Agree but it doesn'T seem to be possible for the moment. I'm exploring something to allow it... I'll keep you informed.

    Quote Originally Posted by VB6 Programming View Post
    Does your VB6 'hack' change the font used in a VB6 app's menu ?
    No but I have achieved this by modifying ressource inside the program.

    This would be the topic of another program since it's really 2 differents things... When I'll get time I'll make the documentation on how to achieve that and post it on my blog.

  8. #1608
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: CommonControls (Replacement of the MS common controls)

    Thanks Lavolpe, you have pertinent observation.

    Quote Originally Posted by LaVolpe View Post
    Probably not a bad choice. That font appears to be available since Vista. If an app, using that font were shipped to XP (for sake of argument), the font would be changed to something else unless font is also shipped.
    SegoUI is the Microsoft Choice as "default" font for many thing including Visual Studio 2010 and up.

    Quote Originally Posted by LaVolpe View Post
    I created a test app in Vista with a font I know wasn't installed on Win10. When opened in Win10, that font was changed to Arial. I don't know how VB (or system) selected Arial other than some system font-fallback algo. The plus side to this is that Arial is at least an Open/True type font which would scale better with DPI awareness.
    You are right. It's a System behavior (herited from Win95). Microsoft made it a System behavior with the arrival of Web (WWW). Some web page made for MacOS user wasn't showed properly because of font difference. First, the family font is analyze, then the font attribute like "Serif", "StrikeThrough", etc... then the closest font available is selected. Arial will be selected more then 85% of the time but sometime Helvetica got elected.

    Quote Originally Posted by LaVolpe View Post
    It's a shame VB didn't buffer the embedded font name within vb6.exe with full 32 characters.
    Yeah, they simply did: OurVarDefaultFontName = "Ms Sans Serif" and the terminated Null

    Quote Originally Posted by LaVolpe View Post
    My only concern for hacking VB6.exe would be that it would fail to open if an uninstalled font was hacked into the exe. Maybe it would just default to Arial or something else? Maybe it will crash?
    Won't crash... I tested it first. I would not have offered this solution without knowing it was safe. However since this is only for the IDE and since nobody will "share" their vb6.exe because it contain your serial number encrypted (install Vb6 fresh on a machine, save the vb6.exe, uninstall and install back, you'll get a different vb6.exe binary each time)


    Quote Originally Posted by LaVolpe View Post
    Always hack a copy of the exe.
    pretty sure you meant BACK (up) instead of HACK

    Quote Originally Posted by LaVolpe View Post
    If you revisit this in a year, you may forget that the space allocated for the font is 13 characters. The font displayed in the exe won't show as 13 characters any longer if you selected a font with a shorter name.
    That's why it is safer with the program I made. I save the font as Left(strFontName & String(13,0)), 13)


  9. #1609
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: CommonControls (Replacement of the MS common controls)

    about: \Template\Forms folder

    Quote Originally Posted by VB6 Programming View Post
    That's how I do it. And I also save a Project (and Form) into the \Template\Projects folder, so I don't need to replace the base form each time.
    But the Menu font remains as MS Sans Serif 8pt.
    But you need to select "new project" and your template right?

    My Vb6 is set to open a new project everytime instead of the select menu
    Did you find a way to open your selected template by default ?

    I'm looking for a way achieve this. Sadly the design of the IDE in itself was poorly think. There is limited option of personalisation

  10. #1610
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by VbNetMatrix View Post
    That's why it is safer with the program I made. I save the font as Left(strFontName & String(13,0)), 13)
    I just overwrote the 13 bytes. Nothing fancy. Think you should warn user if a font name is > 13 characters. You don't want to truncate the font name. If you do, the hacked font won't be what they expected. Just a suggestion.

    Regarding my concerns about crashing, etc. If you noticed my edited comments in my reply, already confirmed that it won't crash and it will select another font if a the hacked font isn't installed. I added those comments after I hacked my copy of vb6.exe to test it.

    P.S. I tried searching the exe to see if I can find where the font size of 8 is set. Didn't spend a ton of time on it, but if there's a LOGFONT structure in there somewhere, I didn't see it. It is possible that there is no value set. LOGFONT.lfHeight can be set to 0, meaning: default height.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  11. #1611
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by LaVolpe View Post
    P.S. I tried searching the exe to see if I can find where the font size of 8 is set. Didn't spend a ton of time on it, but if there's a LOGFONT structure in there somewhere, I didn't see it. It is possible that there is no value set. LOGFONT.lfHeight can be set to 0, meaning: default height.
    Sorry I had missed your edited comment... I started to answer and I had to leave, when I came back, I just finished my answer and posted it.
    as for the font size... you're probably right...

    what we need is a NEW IDE !!!

    We need to learn how to "load an OCX at run time" to emulate the IDE behavior... and to run in memory for debugging like the IDE... The rest is simply an editor
    loool.

    p.s. did you found a new dizzy yet ?

  12. #1612
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by VbNetMatrix View Post
    p.s. did you found a new dizzy yet ?
    Yep, custom made for my engine specs. Will take about another 2 weeks to finish and get here. Can't wait, cold weather is not that far out and the Mustang is just sitting in the garage, collecting dust, while waiting for it. 50 year old cars are money pits, but its worth it to some of us.

    Krool, sorry. Won't hijack your thread talking about muscle cars.
    Last edited by LaVolpe; Aug 20th, 2017 at 11:38 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  13. #1613
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: CommonControls (Replacement of the MS common controls)

    @Krool, VbNetMatrix and others that may be hacking vb6.exe to replace the default font...

    Don't do it yet without more testing. See this post where I responded to a similar scenario that failed and it can be replicated. This font hack is not perfect as it is.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  14. #1614
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    The ideal solution is an IDE add-in that "intercept" add new form and at that point change the font name and size according to one's preference. Can even do more than this - add new control (or anything) and change bla bla bla.

    Here is link to MS documenatation that may help but I am not up to the standard. Maybe maybe one day I may try.
    https://msdn.microsoft.com/en-us/lib...60(VS.60).aspx

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

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    There may be a problem with FrameW font. I created all the FrameW and all controls in all the forms with Arial. Now, I manually go into them and change the font to Tahoma. With the FrameW, visually and in the properties it reflected the change. Save to make the changes permanent. Close and open the forms, the FrameW font physically revert back to Arial but the properties still show Tahoma.

    Update:
    I just replaced the FrameW.ctl and .ctx with that from 20170627 and without doing anything else, all FrameW now correctly show the Tahoma font.
    Last edited by chosk; Aug 22nd, 2017 at 10:10 AM.

  16. #1616

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    I would like to deploy the ActiveX Control version 1.5 "soon", though there are still some points open todo before that..
    However, please let me know if you have some other points to consider which I might not know yet.
    Thanks

  17. #1617
    Hyperactive Member
    Join Date
    Feb 2015
    Location
    Colorado USA
    Posts
    271

    Re: CommonControls (Replacement of the MS common controls)

    You set up the FlexGrid replacement control as a different project even though it shares a lot with this project. The thread traffic is relatively slow so I wonder if it is time to merge this project with that. It would make use a bit easier only having to mess with one set of files, whether as controls or an OCX.

  18. #1618
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by chosk View Post
    The ideal solution is an IDE add-in that "intercept" add new form and at that point change the font name and size according to one's preference. Can even do more than this - add new control (or anything) and change bla bla bla.

    Here is link to MS documenatation that may help but I am not up to the standard. Maybe maybe one day I may try.
    https://msdn.microsoft.com/en-us/lib...60(VS.60).aspx
    I had a project in past... I didn't finished it... it would do exactly like that... for me it was to calculate time I pass on programming on each project... maybe it's time to revive that project and add more functionality

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

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by chosk View Post
    Hi Krool,

    There may be a problem with FrameW font. I created all the FrameW and all controls in all the forms with Arial. Now, I manually go into them and change the font to Tahoma. With the FrameW, visually and in the properties it reflected the change. Save to make the changes permanent. Close and open the forms, the FrameW font physically revert back to Arial but the properties still show Tahoma.

    Update:
    I just replaced the FrameW.ctl and .ctx with that from 20170627 and without doing anything else, all FrameW now correctly show the Tahoma font.
    To correct my mistake. The FrameW was created with Arial font with earlier version of Std-exe controls and displayed correctly as Arial. But now when used with current version, it is actually showing MS San Serif and I did not realize it still thinking it is Arial because it is not Tahoma. The current version seems to ignore what font is set (although reflecting the chosen font in properties) but actually display MS San Serif.
    Last edited by chosk; Aug 22nd, 2017 at 09:18 PM.

  20. #1620

    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
    To correct my mistake. The FrameW was created with Arial font with earlier version of Std-exe controls and displayed correctly as Arial. But now when used with current version, it is actually showing MS San Serif and I did not realize it still thinking it is Arial because it is not Tahoma. The current version seems to ignore what font is set (although reflecting the chosen font in properties) but actually display MS San Serif.
    This is a side effect error when modified the FrameW on 03-Jul-2017 from MS control window to direct rendering. Fix will follow very soon.

    PS: OCX is not affected as it still uses the "old" FrameW.

  21. #1621
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    294

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    Thanks for the fix.

  22. #1622
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,653

    Re: CommonControls (Replacement of the MS common controls)

    The new Frame control doesn't support using an icon instead of text (I haven't updated in a while so I don't know what specific version this change was made in, I was using the one dated 11/18/2016)... it doesn't seem to be a real control, just drawn using theme API. For now I can drop the old version in as it's compatible with the newer subclassing/tlb, but would definitely like to see it continue to be supported in new versions.


    It was done by setting the imagelist via BCM_SETIMAGELIST (and its margins via BCM_GETIMAGELIST after its first set) with the .hWndGroupBox handle, which was the hWnd from the CreateWindowEx call, which the new control doesn't have, and sending it to the only hWnd I see, UserControl.hWnd, obviously doesn't work.

  23. #1623

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by fafalone View Post
    The new Frame control doesn't support using an icon instead of text (I haven't updated in a while so I don't know what specific version this change was made in, I was using the one dated 11/18/2016)... it doesn't seem to be a real control, just drawn using theme API. For now I can drop the old version in as it's compatible with the newer subclassing/tlb, but would definitely like to see it continue to be supported in new versions.


    It was done by setting the imagelist via BCM_SETIMAGELIST (and its margins via BCM_GETIMAGELIST after its first set) with the .hWndGroupBox handle, which was the hWnd from the CreateWindowEx call, which the new control doesn't have, and sending it to the only hWnd I see, UserControl.hWnd, obviously doesn't work.
    True. Only way is to simulate such thing..
    I could implement a 'Picture' property and render likewise. (Instead of ImageList; less overhead)
    Question: Display image along caption or both? A 'PictureAndCaption' bool property could control such question. (Just like in CommandButtonW, CheckBoxW, OptionButtonW etc.)

    EDIT: Question in the room: Is there a need for a property page for the LabelW control? This would allow to make multiple lines of text in the caption property in design time.
    Last edited by Krool; Aug 24th, 2017 at 01:21 PM.

  24. #1624
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,653

    Re: CommonControls (Replacement of the MS common controls)

    Image along caption would be wonderful actually, as that doesn't seem possible with the current frame control; you wouldn't need two properties, it would be picture-only when caption="", and text only when there's no picture; just adjust the start point of the text.

    But if I may ask... what advantage is offered by creating a control exclusively with theme API instead of CreateWindowEx? Because this probably won't be the only rare customization that doesn't work, especially if other controls do this too.
    Last edited by fafalone; Aug 25th, 2017 at 12:15 AM.

  25. #1625
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    760

    Re: CommonControls (Replacement of the MS common controls)

    It would be awesome if Toolbar ButtonMenus offered the ability to have images, change backcolor, set font so that Explorer style interfaces could be created, like this:

    Name:  Explorer delete button.jpg
Views: 4881
Size:  15.4 KB

    I know that this can be done by creating my own menu (or form) and showing it in the ButtonMenu click event but it would be wonderful if these enhancements were added to the ButtonMenus.

  26. #1626

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by AAraya View Post
    It would be awesome if Toolbar ButtonMenus offered the ability to have images, change backcolor, set font so that Explorer style interfaces could be created, like this:

    Name:  Explorer delete button.jpg
Views: 4881
Size:  15.4 KB

    I know that this can be done by creating my own menu (or form) and showing it in the ButtonMenu click event but it would be wonderful if these enhancements were added to the ButtonMenus.
    Use the 'ButtonDropDown' instead for showing your own menu. If there is so much demand for a better rapidstart menu I will consider making the ButtonMenus OwnerDrawn.

    Quote Originally Posted by fafalone View Post
    Image along caption would be wonderful actually, as that doesn't seem possible with the current frame control; you wouldn't need two properties, it would be picture-only when caption="", and text only when there's no picture; just adjust the start point of the text.

    But if I may ask... what advantage is offered by creating a control exclusively with theme API instead of CreateWindowEx? Because this probably won't be the only rare customization that doesn't work, especially if other controls do this too.
    FrameW is the only control which is done without CreateWindowEx. Reasons are more compact and understandable code. Also it allows to have a themed text color (ForeColor) via DrawThemeTextEx.

  27. #1627

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by fafalone View Post
    Image along caption would be wonderful actually, as that doesn't seem possible with the current frame control; you wouldn't need two properties, it would be picture-only when caption="", and text only when there's no picture; just adjust the start point of the text.
    Update released.
    Included Picture property in FrameW control.

    Not only the start point, but also the height needed to be adjusted in case the picture height is larger than the font height.
    Name:  FramePicture.png
Views: 4863
Size:  2.5 KB
    Last edited by Krool; Aug 25th, 2017 at 05:42 PM.

  28. #1628
    Fanatic Member DrUnicode's Avatar
    Join Date
    Mar 2008
    Location
    Natal, Brazil
    Posts
    631

    Re: CommonControls (Replacement of the MS common controls)

    In FrameW the image is not rendering correctly for 32bpp images.
    I use DrawIconEx here and have external Manifest for Vb6.exe so I can see correct 32bpp in IDE.

    Vb6.exe External Manifest works for me in Windows 10 if you add this Registry item:

    Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide
    Value: PreferExternalManifest
    Data: 1 = prefer, 0 = don't prefer

    Also noticed similar issue with ImageList not rendering Alpha channel for 32bpp in the PropertyPage.
    Even though the images don't display correctly, the ImageList does in fact have the correct 32bpp images and work correctly when attached to your controls.
    Using ImageList_Draw with ILD_TRANSPARENT fixes this.

    Name:  Framew32Bpp.PNG
Views: 4845
Size:  4.1 KB

    Name:  ImageListNotRendering32Bpp.PNG
Views: 4688
Size:  9.7 KB

  29. #1629

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by DrUnicode View Post
    In FrameW the image is not rendering correctly for 32bpp images.
    Thanks, and not only the FrameW. Also the StatusBar for the Panel.Picture was affected.
    And of course the Images Property Page in the ImageList control. (cosmetic issue at design-time)

    OCX got also updated for StatusBar and ImageList.

  30. #1630

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Further tweak for the Picture property in the FrameW control. The new included PictureAlignment property controls now if the picture is displayed left or right of the caption.
    This might be useful especially when using right-to-left reading.

  31. #1631
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,802

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    If there is so much demand for a better rapidstart menu I will consider making the ButtonMenus OwnerDrawn.
    That would be really useful.
    Last edited by VB6 Programming; Aug 28th, 2017 at 02:37 AM.

  32. #1632
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    536

    Re: CommonControls (Replacement of the MS common controls)

    Hello Krool,

    Code:
    Private Sub ToolBar1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Debug.Print "Button", Button
    End Sub
    Button is always 1.

    In MouseMove it is always 0.

    What can be wrong?
    Last edited by Karl77; Aug 29th, 2017 at 06:29 AM.

  33. #1633

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    Code:
    Private Sub ToolBar1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Debug.Print "Button", Button
    End Sub
    Button is always 1.

    In MouseMove it is always 0.

    What can be wrong?
    I cannot replicate that issue. MouseMove is of course 0 when no mouse button is hold down.
    MouseDown is working correctly.. it gives me 1, 2 and 4 etc..

  34. #1634
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    536

    Re: CommonControls (Replacement of the MS common controls)

    MouseDown is working correctly.. it gives me 1, 2 and 4 etc..
    Not for me.
    Regardless of the orientation of the toolbar.
    (Had it vertical in the beginning).

    Here's a form to play with.
    Attached Files Attached Files

  35. #1635

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Karl77 View Post
    Not for me.
    Regardless of the orientation of the toolbar.
    (Had it vertical in the beginning).

    Here's a form to play with.
    I tested your Form with VBCCR14.OCX and get again 1, 2 and 4..

  36. #1636
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    536

    Re: CommonControls (Replacement of the MS common controls)

    I tested your Form with VBCCR14.OCX and get again 1, 2 and 4..
    Hmm, now I'm out of ideas.

    ---

    I must confess I'm too stupid for programming.
    I mixed the MOUSE button with the TOOLBAR button.

    Shame on me.
    Forget the below...


    ---

    I tried:
    Quit all VB IDE's.
    Reload project.
    Compile to exe, with MsgBox on MouseDown.
    Reboot of the PC.
    Same procedure.

    And I never get other Button values than 1.

    Info:
    VB6 has SP6B.
    VB6.EXE has edited resources in order to show styles and DPI effects. *
    Windows is 10/64, up to date.
    Current DPI setting is 100%.
    VBCCR14 is 1.4.044.
    Side-by-side manifest is used in the project.

    *I tried all the above with the original VB6.EXE as well.

    What can I do/try/test/prepare/whatever?
    Last edited by Karl77; Aug 29th, 2017 at 04:03 PM. Reason: To stupid

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

    Re: CommonControls (Replacement of the MS common controls)

    I was slow.
    Last edited by chosk; Aug 29th, 2017 at 09:13 PM.

  38. #1638
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,653

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Update released.
    Included Picture property in FrameW control.

    Not only the start point, but also the height needed to be adjusted in case the picture height is larger than the font height.
    Name:  FramePicture.png
Views: 4863
Size:  2.5 KB
    Wonderful. Works great-- thank you.

  39. #1639
    Lively Member
    Join Date
    Oct 2016
    Posts
    115

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by MountainMan View Post
    You set up the FlexGrid replacement control as a different project even though it shares a lot with this project. The thread traffic is relatively slow so I wonder if it is time to merge this project with that. It would make use a bit easier only having to mess with one set of files, whether as controls or an OCX.
    I agree with the above, this is a busy thread with active members, so the grid would have a proper discussion here

  40. #1640
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Question ListView function "FindItem" dont work

    Version: 1.4.46
    Control: ListView

    The search function "FindItem" doesnt work here.
    I tried different combination of the parameters but i never get back any ListItem.

    Can anybody check this please?

    BTW: Why does the function "FindItem" doesnt support the value-parameter (lvwText,lvwSubitem,lvwTag) ?
    See FindItem Method (ListView Control)

Page 41 of 105 FirstFirst ... 31383940414243445191 ... 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