-
Re: bug with calendar
Quote:
Originally Posted by
DEXWERX
ah no problem. I think you now know that Krool's controls simply wrap the existing controls found in comctl32.dll.
so we have 4 different controls we can use in VB6.
* comctl32.dll <-- use the API manually
* ComCtrls v5 OCX <-- wraps the controls in comctl32.dll in user controls
* ComCtrls v6 OCX <-- based on the source of comctl32.dll (windows XP version), but is independent.
* Krools Controls <--- wraps the controls in comctl32.dll in user controls
If you want to learn about the Windows Common Controls, MSDN has a huge reference to the APIs.
https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
Regardless, does the same bug show up in .NET's DTPicker control?
Thanks for the link. I didn't had all theses information... I knew about v5 and v6... v6 (xp) being the fixed version and v5 being the theme able version. and I knew Krool is somewhat similar to v5 but was missing the whole picture ;)
as for your question, I'm not sure about .net version, not using it but the v6 version is drawed properly.
-
Re: bug with calendar
Quote:
Originally Posted by
LaVolpe
Not sure your statement is correct. If you look at the datepicker.ctl, you will not see anywhere within it where Krool paints/draws the control. At least I didn't see any such statements. Krool creates an instance of the SysDateTimePick32 class (CreateDTPicker() routine) and exposes it via his usercontrol. So, from a cursory look at his code, doesn't look like he's redesigned anything significant, but mostly added support for unicode. However, what you are showing in your screen capture may indicate the font property should be changed (by you & preferably true-type) or some method called (by Krool) that would force the datepicker to adjust size based on font. Just a guess though.
very pertinent comment. 100% agree. as for my font, I used the default Vb6 one, "MS Sans Serif". I tried with the 'new' (.NET) default SegoUI and it work properly
-
2 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Attachment 150671
I set Location to Canada, Region and Language to French(Canada) but don't get "Aujourd'hui" which is the cause of the problem because it screwed the alignment. To get the 'original' sizing/scaling, perhaps making "Aujourd'hui" back to Today. I know I know Today is not French.
I tried Location as France and Region and Language as French(France), I get the "Aujourd'hui" but is is aligned properly.
Attachment 150673
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
MS San Serif different font size. Trying to help but cannot replicate.
Attachment 150675
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by VbNetMatrix
very pertinent comment. 100% agree. as for my font, I used the default Vb6 one, "MS Sans Serif". I tried with the 'new' (.NET) default SegoUI and it work properly
I don't know if DPI was in play or not. If it was, say screen at 120-150% DPI, non-truetype fonts don't scale as well and the poor results would not be unexpected.
-
Re: CommonControls (Replacement of the MS common controls)
@VbNetMatrix: what version of Windows are you on? Maybe this is a longshot, but the DateTimePicker got a large overhaul between XP and Vista (and minor updates since), and maybe a precise Windows version is required to reproduce your bug. I have seen weird spacing issues before, but I thought these were mostly rectified as of Windows 8...
-
Re: bug with calendar
Quote:
Originally Posted by
VbNetMatrix
found a visual bug with calendar, and dropdown calendar (DTPicker1)
on a french computer (Canada French) the word Today is "Aujourd'hui" wich is large. The date at end is truncated, check the number 13 in the picture.
Attachment 150611
also, DTPicker1 doesn't have a min size and can be resized in a way where it's not possible to select it anymore in IDE with the mouse
For me it looks like you have a manifest to v6 of comctl32.dll but you use classic style windows theme? Can you confirm?
If yes, then I have no influence about the size of the drop-down calendar. If it would be v5.8x we could have tweaked it. So this could be really an MS bug.
-
Re: CommonControls (Replacement of the MS common controls)
Update released. Quite important internal improvements on some controls.
Some controls adjust their size according to some settings and windows preferences, e.g. the MonthView control.
Therefore after creating the API control it is necessary to resize the UserControl boundaries to fit in.
The dimensions (Width, Height) of an control are saved trough the UserControl.Extender object into the property bag.
Problem is that these dimensions will be applied to the UserControl after UserControl_ReadProperties is finished.
So any attempt to resize a control at ReadProperties will be overwritten afterwards...
UserControl_InitProperties is not affected since there are no saved dimensions yet in the property bag.
Solution was resolved by just applying the dimensions within UserControl_Resize to the Extender object, even if DPICorrectionFactor() equals 1.
There was also some bugfixing done, e.g. ComboBoxW. If applicable, only the Extender.Height is applied and not the Width also via Extender.Move. This allows preservation of previous Width setting stored in the property bag. That change is crucial when migration for instance from ComboBox to this ComboBoxW.
-
Re: CommonControls (Replacement of the MS common controls)
Krool, the updated files did not get attached to post #1...
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
chosk
MS San Serif different font size. Trying to help but cannot replicate.
Attachment 150675
Hi,
one thing different I noticed, in your example, the today's date is in a circle while mine is in a rectangle.
This seem to be causing the difference in alignment. What cause my side to have the rectangle instead of the circle ?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
LaVolpe
I don't know if DPI was in play or not. If it was, say screen at 120-150% DPI, non-truetype fonts don't scale as well and the poor results would not be unexpected.
very good comment, somethime we miss this simple solution... not in my case though, I hate DPI change in Windows, about 4 program out of 5 doesn't run well with DPI change.
Mine is set at normal 100% (running Win7 PRO x64)
(btw, I believe MS Sans Serif is a TTF isn't ?)
-
Re: bug with calendar
Quote:
Originally Posted by
Krool
For me it looks like you have a manifest to v6 of comctl32.dll but you use classic style windows theme? Can you confirm?
If yes, then I have no influence about the size of the drop-down calendar. If it would be v5.8x we could have tweaked it. So this could be really an MS bug.
damn... you pin it... my IDE doesn't use manifest. I compiled and got a different result. compiled I got the circle instead of rectangle for "today"
I still got a problem though, the circle is lilttle bit too low and got cut.
can u give me a link where I can get the manifest for vb6.exe ?
or link where you explain how to "completely" use and install your component ? maybe I missed a few step...
I installed OLEGuids.tlb, but didn'T find information about installing a manifest.
-
2 Attachment(s)
ImageList: New bug found
hi krool,
i can reproduce the run-time error message 50003 using windows 8.1 and OCX v1.4.37:
Attachment 150707
the vb-project contains only the imagelist control with 2 icons and no source code is used.
Sample project: Attachment 150709
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
VbNetMatrix
Mine is set at normal 100% (running Win7 PRO x64)
(btw, I believe MS Sans Serif is a TTF isn't ?)
'MS Sans Serif' is NOT a TrueType font.
A similar named font 'Microsoft Sans Serif' is TrueType.
'Segoe UI' is probably a better (TrueType) font to use nowadays.
-
Re: ImageList: New bug found
Again small update related to yesterday bugfix, especially on the ComboBoxW control.
For instance on ComboBoxW control the height could be screwed up when the hidden VBControlExtender properties _ExtentX/_ExtentY were 0 or not set.
Typical scenario is on migration from VB.Combo to ComboBoxW that _ExtentX/_ExtentY are not set.
But I carefully tested now again every component and I hope all different scenarios are now resolved.
Quote:
Originally Posted by
Mith
i can reproduce the run-time error message 50003 using windows 8.1 and OCX v1.4.37:
Attachment 150707
the vb-project contains only the imagelist control with 2 icons and no source code is used.
Sample project:
Attachment 150709
I can run that sample project without any error...
-
Re: CommonControls (Replacement of the MS common controls)
hi krool ,
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
while resetting the property "usecolumnchevron" to false , fixes the problem . this happens only in the last column when use chevron is true
2- autosizing a column to the header caption works fine if the column caption is wider than the items , but if the items text is wider than the column header caption , autosizing for the header is still related to the items text which is wider than the caption although autosizing is set to the header not the items . this happens for any column with chevron is true or false
this is my code . try different captions in various widthes greater or less than items widthes . also comment and uncomment the chevron line to check for the first issue but with the last column . column 3
Code:
Dim i As Long
lvmain.View = lvwReport
lvmain.ListItems.clear
'lvmain.UseColumnChevron = True
lvmain.ColumnHeaders.Add , , "column_a"
lvmain.ColumnHeaders.Add , , "column_b"
lvmain.ColumnHeaders.Add , , "column_c"
For i = 1 To 6
lvmain.ListItems.Add , , "row_a"
lvmain.ListItems(i).ListSubItems.Add , , "row_bbbbbbbbbbbbbbbbbbb"
lvmain.ListItems(i).ListSubItems.Add , , "row_c"
Next i
lvmain.ColumnHeaders(2).AutoSize LvwColumnHeaderAutoSizeToHeader
lvmain.Refresh
lvmain.Redraw = True
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
VB6 Programming
'MS Sans Serif' is NOT a TrueType font.
A similar named font 'Microsoft Sans Serif' is TrueType.
'Segoe UI' is probably a better (TrueType) font to use nowadays.
thanks for the information... I never realized there were a "MS" Sans Serif and a "Microsoft" Sans Serif. I thought they were the same and I knew the microsoft one was TTF.
I just changed my "default" Font in Vb6.exe to SegoUI (yup, I had to hack the .exe)
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
VbNetMatrix
thanks for the information... I never realized there were a "MS" Sans Serif and a "Microsoft" Sans Serif. I thought they were the same and I knew the microsoft one was TTF.
I just changed my "default" Font in Vb6.exe to SegoUI (yup, I had to hack the .exe)
Maybe you can create a tutorial thread of how to achieve this? It could be a common demand to change the default font in the IDE to a truetype font.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Quote:
Originally Posted by
VbNetMatrix
thanks for the information... I never realized there were a "MS" Sans Serif and a "Microsoft" Sans Serif. I thought they were the same and I knew the microsoft one was TTF.
I just changed my "default" Font in Vb6.exe to SegoUI (yup, I had to hack the .exe)
Maybe you can create a tutorial thread of how to achieve this? It could be a common demand to change the default font in the IDE to a truetype font.
Yes, it would be very handy, since MS Sans Serif is outdated...
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Cube8
Yes, it would be very handy, since MS Sans Serif is outdated...
some binary IDE hacks would be nice, things like changing the code editing colors, and default fonts. great ideas.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
VbNetMatrix
thanks for the information... I never realized there were a "MS" Sans Serif and a "Microsoft" Sans Serif. I thought they were the same and I knew the microsoft one was TTF.
I just changed my "default" Font in Vb6.exe to SegoUI (yup, I had to hack the .exe)
Also consider the font size
MS Sans Serif 8 point was the default for older Windows and for VB6.
In newer Windows Segoe UI 9 point is normal.
When updating VB6 apps from MS Sans Serif (and you should do this to support DPI-aware controls) you need to choose a TrueType or OpenType font.
Segoe UI is an obvious one (because it is used by Windows), but it can appear smaller than MS Sans Serif - if you only change the fontname, and not the fontsize - so it may look better to increase the font size too (from e.g. 8pt to 9pt).
Another alternative is to use Microsoft Sans Serif. This is the TrueType/OpenType version of MS Sans Serif and is very similar in size. This means you don't need to change the fontsize.
If you are updating an existing app, using Microsoft Sans Serif is a little easier, but (imo) Segoe UI looks better.
Remember, changing the font on an existing application may give problems if it doesn't quite fit. For example a button may be only just wide-enough to fit the caption (text) using the existing font, changing the font may no longer fit.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Maybe you can create a tutorial thread of how to achieve this? It could be a common demand to change the default font in the IDE to a truetype font.
a tutorial on how to "hack" the Vb6.exe ? I think I'll get flamed by the Forum Administator.
not sure it will be accepted ... but maybe as a "Learning Technique" ? a "how to"
I could provide source code of how to make the vb6 "Patcher" we'll see if it is accepted :)
I'll get right on it. Thanks for the suggestion.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
I used a lot of method to Hack my Vb6.exe... for example, you can edit the "ressource" of vb6.exe and change all Windows Size
look at my Vb6/Reference Windows for example... very handy I was tired of scrolling on my 27inch monitor... :) No more scrolling bar :)Attachment 150807
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
VB6 Programming
Also consider the font size
MS Sans Serif 8 point was the default for older Windows and for VB6.
In newer Windows Segoe UI 9 point is normal.
When updating VB6 apps from MS Sans Serif (and you should do this to support DPI-aware controls) you need to choose a TrueType or OpenType font.
Segoe UI is an obvious one (because it is used by Windows), but it can appear smaller than MS Sans Serif - if you only change the fontname, and not the fontsize - so it may look better to increase the font size too (from e.g. 8pt to 9pt).
Another alternative is to use Microsoft Sans Serif. This is the TrueType/OpenType version of MS Sans Serif and is very similar in size. This means you don't need to change the fontsize.
If you are updating an existing app, using Microsoft Sans Serif is a little easier, but (imo) Segoe UI looks better.
Remember, changing the font on an existing application may give problems if it doesn't quite fit. For example a button may be only just wide-enough to fit the caption (text) using the existing font, changing the font may no longer fit.
2 things...
1. unfortunately, Vb6.exe (for some reason) doesn't seem to include "fontSize" for the "default" font object (at least I didn't find it in the binary).
You can only change the "default" Font
2. Changing the "default" font only affect "new" object you drop on a form. it will not mess with your existing project.
but you're right, "Microsoft Sans Serif" might be a better alternative for the size reason...
I didn't know this thing would attract so many attention... glad to hear some people still love Vb6 :) so I'll go work right on it, I should finish the patcher code in an hour, I'll post it in a thread and let you know
-
Re: CommonControls (Replacement of the MS common controls)
hi krool ,
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
while resetting the property "usecolumnchevron" to false , fixes the problem . this happens only in the last column when use chevron is true
2- autosizing a column to the header caption works fine if the column caption is wider than the items , but if the items text is wider than the column header caption , autosizing for the header is still related to the items text which is wider than the caption although autosizing is set to the header not the items . this happens for any column with chevron is true or false
this is my code . try different captions in various widthes greater or less than items widthes . also comment and uncomment the chevron line to check for the first issue but with the last column . column 3
Code:
Dim i As Long
lvmain.View = lvwReport
lvmain.ListItems.clear
'lvmain.UseColumnChevron = True
lvmain.ColumnHeaders.Add , , "column_a"
lvmain.ColumnHeaders.Add , , "column_b"
lvmain.ColumnHeaders.Add , , "column_c"
For i = 1 To 6
lvmain.ListItems.Add , , "row_a"
lvmain.ListItems(i).ListSubItems.Add , , "row_bbbbbbbbbbbbbbbbbbb"
lvmain.ListItems(i).ListSubItems.Add , , "row_c"
Next i
lvmain.ColumnHeaders(2).AutoSize LvwColumnHeaderAutoSizeToHeader
lvmain.Refresh
lvmain.Redraw = True
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Maybe you can create a tutorial thread of how to achieve this? It could be a common demand to change the default font in the IDE to a truetype font.
Because you're the Thread Administrator, I answer here ;)
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...
http://vbx64.wordpress.com/vb6-default-font-fixer/
To ALL: if you want to talk about this, let's do it on the Blog to avoid floading Krool Thread :)
-
Re: CommonControls (Replacement of the MS common controls)
hey all , I posted a question here twice and seemed to be ignored . is there something wrong ? are they visible mainly ?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Hosam AL Dein
hey all , I posted a question here twice and seemed to be ignored . is there something wrong ? are they visible mainly ?
No question have been ignored to my knowledge, can you give us the Post # so we can validate ?
-
Re: CommonControls (Replacement of the MS common controls)
-
Re: ImageList: New bug found
Quote:
Originally Posted by
Krool
I can run that sample project without any error...
Did you run the compiled exe or the project via the IDE?
What windows version did you use for your test?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Hosam AL Dein
1585 and 1576
can you give us a snapshot picture of what you mean ?
-
Re: CommonControls (Replacement of the MS common controls)
video demonstration for what I mean for both 2 issues
https://www.youtube.com/watch?v=R9ocSUOAxOM
-
Re: CommonControls (Replacement of the MS common controls)
another bug in listview not related to the previous issues
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
and here is a video demonstration
https://www.youtube.com/watch?v=l-lo...ature=youtu.be
-
Re: CommonControls (Replacement of the MS common controls)
check this one too
it is in linklabel , when set to transparent this bug happens
https://www.youtube.com/watch?v=HtVQ...ature=youtu.be
-
Re: CommonControls (Replacement of the MS common controls)
the previous bug does not happen if it is placed on a user control as the net video shows
https://www.youtube.com/watch?v=cRkM...ature=youtu.be
-
Re: CommonControls (Replacement of the MS common controls)
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
https://www.youtube.com/watch?v=6vX7...ature=youtu.be
-
Re: CommonControls (Replacement of the MS common controls)
still in linklabel , as said above , the transparency works fine only in usercontrols. but , it is not real transparency to my knowledge . It gets its backcolor from its parent as you will see in the next video when we put a label behind it . Is this intended to be like this or it is a bug ?
https://www.youtube.com/watch?v=_sLK...ature=youtu.be
and how to change the forecolor because it has never changed with any trial to change other properties might be preventing it to be changed .
-
Re: CommonControls (Replacement of the MS common controls)
Hosam AL Dein, you don't have any patience?
I do not forget your issues.. there will be noted.
Sometimes I posted an update for an issue raised 1 month before or so..
-
Re: CommonControls (Replacement of the MS common controls)
sorry krool , I am new to any forum and I doubted that my posts were not properly published because I used to see the message that tells the post will be published after admin revision and I no longer see it so I thought there was something wrong .
and about the posts I publish in a sequence , I always find it hard to make my point clear due to my " bad english " so I assign a time to record them in a video and publish them all in one time .
I really appreciate what you are doing and keep it up . sorry again
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
VbNetMatrix
2 things...
1. unfortunately, Vb6.exe (for some reason) doesn't seem to include "fontSize" for the "default" font object (at least I didn't find it in the binary).
You can only change the "default" Font
2. Changing the "default" font only affect "new" object you drop on a form. it will not mess with your existing project.
but you're right, "Microsoft Sans Serif" might be a better alternative for the size reason...
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?
Quote:
Originally Posted by
Mith
Did you run the compiled exe or the project via the IDE?
What windows version did you use for your test?
Win XP SP3 (VM) and Win 7 SP1. (both 32bit)
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
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 ?
-
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 ?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
VB6 Programming
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
LaVolpe
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.
Quote:
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.
Quote:
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Hosam AL Dein
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
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
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
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
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
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 ?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
VB6 Programming
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
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.
-
Re: CommonControls (Replacement of the MS common controls)
Thanks Lavolpe, you have pertinent observation.
Quote:
Originally Posted by
LaVolpe
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
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
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
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
Always hack a copy of the exe.
pretty sure you meant BACK (up) instead of HACK
Quote:
Originally Posted by
LaVolpe
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)
:)
-
Re: CommonControls (Replacement of the MS common controls)
about: \Template\Forms folder
Quote:
Originally Posted by
VB6 Programming
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
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
VbNetMatrix
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
LaVolpe
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 ?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
VbNetMatrix
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.
-
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.
-
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
-
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.
-
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
-
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
chosk
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 :)
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
chosk
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
chosk
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.