Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in win 8 64 bit and xp,attached video and gif pics #1

Closed
wwwbarnamehadotnet opened this issue Nov 12, 2022 · 23 comments
Closed

Comments

@wwwbarnamehadotnet
Copy link

wwwbarnamehadotnet commented Nov 12, 2022

hi
when i wana open property page in form its shown this error : ( win 8 64 bit)
this is animated gif ,u can play it

win 8 65 bit

image link :
https://i.postimg.cc/B6JhMq6m/win-8-65-bit.gif

and in win xp after registered succifully and then i wanted open property page with right click, this issue too :
i attached webm video record and screen shot here too
xp.webm

screen shot :

eeror

@EduardoVB
Copy link
Owner

EduardoVB commented Nov 13, 2022

I am not able to reproduce the errors, in Windows 11 or in Windows XP. All work fine in my testings.

It seems like you have some problem with the VB6 installation, but in both computers... ? 🤔
Do you have SP6 installed?
That CLSID that I can see in your video and image, is for property pages: 7EBDAAE1-8120-11CF-899F-00AA00688B10
from MSSTKPRP.DLL

@EduardoVB
Copy link
Owner

And what about other controls that show property pages?

@wwwbarnamehadotnet
Copy link
Author

wwwbarnamehadotnet commented Nov 13, 2022

And what about other controls that show property pages?

actually other controls has not problem for me,its jst show error for this control only.
i attached my visual studio version image too,whats ur guess? maybe need some dll? can attach some dlls if need ?
version

@EduardoVB
Copy link
Owner

You don't have SP6 (service pack 6) installed.
That, today is considered "bad practice" and maybe also "unsupported".
I'll see to uninstall VB6 and install it without SP6 to further study this issue (at some point, not that I like to do that...)
It also would help to know in what property page is the issue happening.
You can access the Themes property page (alone) by clicking in the Theme property, and the Tabs property page by clicking in the IconCharHex property.
I suspect from the Tabs property page, because I used subclassing on it.

@wwwbarnamehadotnet
Copy link
Author

wwwbarnamehadotnet commented Nov 13, 2022

i downloaded visual basic 6 sp6 and updated with
https://winworldpc.com/product/microsoft-visual-stu/60

for example i attached in xp about version and error :
123

when i want access to iconcharhex its show like as this error :
this happend for me too when i want access to theme its open correctly but when i want want click on apply button its show error like as

222

if you know any best version for vb6 sp6 or visual studio full version or etc to used for your works maybe can send me download link here ,i want just check?

in my that links i downloaded enterprise vb6 sp6 and maybe i need install prefessional version ?
when i extracted 3 iso about enterprise version in on folder size of full was been biger than 1.5 gig

or maybe i need some other dlls or component installed in ur refrences? can send here ?

@EduardoVB
Copy link
Owner

EduardoVB commented Nov 14, 2022

I uninstalled VB6 and installed it without the SP6 in Windows 11 but I don't experience the issue.
Anyway I see from your latest screenshot that it is happening to you with SP6 installed too.

May be possible for you to run the project in the source code and see what happens, I mean, where the error show up?

I'm asking to open the file: Test uncompiled.vbg

@EduardoVB
Copy link
Owner

You can try this:
Close the VB6 IDE if you have it open.
From a cmd.exe command prompt with admin rights, write this:
RegSvr32 MSSTKPRP.DLL [press ENTER]
Open the VB6 IDE again and check if the issue is fixed.

@wwwbarnamehadotnet
Copy link
Author

this time i installed vb6 sp6 and last updated of Microsoft on windowns 8 64 bit too like as i shown in xp too and i did RegSvr32 MSSTKPRP.DLL with succefull message registered and then i recorded this attached video about open Test uncompiled.vbg. and not solved problem yet,

why i have no any problem with other controls but this problem will be happen for this control?
actually i cant access too any propertiy page of this control seperate or in right click properties page
https://user-images.githubusercontent.com/12879605/201811642-64a3e47d-fd3b-4d8b-8ab7-77a82c91651c.mp4

@EduardoVB
Copy link
Owner

OK, I think from your last video, that it is the Tabs property page the problem, because the Themes one seems to be working fine. But as soon as you Apply the changes to the Themes property page, it loads all the other property pages (including the Tabs one), and that's why you also see the crash.

I would try removing the subclassing.
Please go to 'Private Sub Subclass()' in the pagNewTabTabs property page and add an 'Exit Sub' at the start of that procedure.
Please report back (I cannot test here, it works fine here).

@wwwbarnamehadotnet
Copy link
Author

wwwbarnamehadotnet commented Nov 16, 2022

hi,i downloaded ur updated control today and i added exit sub at first of sub Subclass in the pagNewTabTabs and still same error but i did try for comments all codes in pagNewTabTabs property page so property page opened without problem and ofc its temporary worked without that new tab part,so result i guess problem is from pagNewTabTabs codes but i dont wich codes make thar error

and i have skype and discord too maybe i can share screen better than send videos here? i can just create a skype join like without to u have skype app or skype account and jst join like as guest.

@EduardoVB
Copy link
Owner

EduardoVB commented Nov 16, 2022

OK. Unfortunately, hunting this kind of errors is a work of patience.

It is necessary to do several changes, one by one, and see when the error goes away and when it doesn't. Until you can identify the exact line.
And I cannot do it here, because it is only happening there. It may be your locale (perhaps the right-to-left language or something) or your VB6 version.

I would start at the PropertyPage_SelectionChange event procedure.

But it is not too easy because if you remove some lines, you can produce errors but for other reasons, like an object not set or something like that.

Try by placing a Exit Sub, for example before the line:
CopyControlProperties iSC, NewTab1
and also before the line:
SelectInComboByItemData cboIconAlignment, iSC.IconAlignment
and maybe before:
iSC.StoreVisibleControlsInSelectedTab

And see what happens with each one of these tests.

Also, I would try just commenting out the line:
ShowTabData

PS: these would be just the first steps. To find the offending line(s) will take some more work. I hope you understand that this is not very easy.

@wwwbarnamehadotnet
Copy link
Author

wwwbarnamehadotnet commented Nov 16, 2022

i understand and i am doing comment and uncomment commands step by step and trace but for this time i uncommented all codes now and when i just uncomment this sub its show error

Private Sub ShowTabData()
tmrShowTabData.Enabled = False
tmrShowTabData.Enabled = True
End Sub

why enabled change to false and true in same time? and i guess problem is from timer name tmrshowtabdata,i am doing chk this timer commands

@EduardoVB
Copy link
Owner

why enabled change to false and true in same time?

Because when you set a timer to False it resets the time. I don't know if there it was important/necessary but it is something I frequently do to ensure the timers start waiting from that moment, to avoid timers that fire unnecessary more than once.

About commenting out all that Sub, of course it is not that sub or the timer what is causing the error, but the procedure that the timer is calling, what is:

Private Sub DoShowTabData()

We are getting closer.
Now it would be necessary to place several Exit Sub inside that procedure, and see where it starts erroring.

@EduardoVB
Copy link
Owner

As suspicious:

EnsureFontListLoaded
PrepareIconFontData
PrepareCharPics
GetGlyphSet
GlyphIsValid

@wwwbarnamehadotnet
Copy link
Author

wwwbarnamehadotnet commented Nov 16, 2022

actually i guess i found issue its about sub EnsureFontListLoaded because when i comment these lines so icon font not worked but no any error too but still i cant set icon font or used , i commented these lines :

EnsureFontListLoaded
If Not SelectInCombo(cboTabIconFont, mTabData(t).IconFont.Name) Then
cboTabIconFont.ListIndex = 0
End If

so i guess problem is about EnsureFontListLoaded i checked i installed "Segoe MDL2 Assets" before because its used in your published defualt project with that font icon but i think jst i should be fix this function or change this function ,i dont know how can change it maybe problem will be fix when this function change

Private Sub EnsureFontListLoaded()
    Const CB_ADDSTRING = &H143
    Dim c As Long
    
    If Not mFontListLoaded Then
        cboTabIconFont.Clear
        cboTabIconFont.AddItem ""
        For c = 0 To Screen.FontCount - 1
            SendMessage cboTabIconFont.hWnd, CB_ADDSTRING, 0, ByVal StrPtr(Screen.Fonts(c))
        Next
        mFontListLoaded = True
    End If
End Sub

@EduardoVB
Copy link
Owner

No, it is not about the "Segoe MDL2 Assets" font, whether you have it installed or not.

It is, apparently because of loading the ComboBox control in that way, by API.
I loaded the combo with API because it is much faster than the normal AddItem way, just because of that.

So, you can replace it with:

'SendMessage cboTabIconFont.hWnd, CB_ADDSTRING, 0, ByVal StrPtr(Screen.Fonts(c))
cboTabIconFont.AddItem Screen.Fonts(c)

But, you could also try instead:

Dim s As String
s = Screen.Fonts(c)
SendMessage cboTabIconFont.hWnd, CB_ADDSTRING, 0, ByVal StrPtr(s)

If both work, then the second one (with API) would be faster.

@wwwbarnamehadotnet
Copy link
Author

wwwbarnamehadotnet commented Nov 16, 2022

i uncommented this part :

EnsureFontListLoaded
If Not SelectInCombo(cboTabIconFont, mTabData(t).IconFont.Name) Then
cboTabIconFont.ListIndex = 0
End If

and then i did try for use this :

Dim s As String
s = Screen.Fonts(c)
SendMessage cboTabIconFont.hWnd, CB_ADDSTRING, 0, ByVal StrPtr(s)

in sub EnsureFontListLoaded but same error but when i just used :
cboTabIconFont.AddItem Screen.Fonts(c)
so ofc the font tab will be load too slow for each open property page or apply clicked (i wish to can load font fast too maybe with another way ), but another problem happened here,i attached a shot video too about it

when i wanted change font size of both font icon part and font part in font property page or used bold and some styles then apply button clicked again fonticon properties will be restored with 11.25 size and style not change on control too and etc

but i guess codes used for this font tab (content font icon and font) is different with tabs font changes" becuse i can set font style and size icon in that tab part without problem, but here in this font tab its not saved

how can apply change iconfont or font part too
https://user-images.githubusercontent.com/12879605/202088104-cef952be-5b19-4e2c-8d55-1fab4ed617e3.mp4

@EduardoVB
Copy link
Owner

No, but IconFont does not change the Icon Font for all tabs but only for the current tab.
I followed the same logic of SSTab's Caption, Picture, etc.
It is possible to access tabs properties by accessing a property that works with the currently selected tab.

For example, the Caption property assigns the TabCaption for the current tab, Picture assigns the TabPicture for the current tab. I did the same for other properties, for example, IconCharHex assigns the icon character for the current tab (the indexed property is TabIconCharHex).
I followed the same logic with the icon font, since each tab can have a different font.
There is a TabIconFont property and also the corresponding IconFont, that only assigns the font to the current tab.

To assign the font to different tabs, you can do it from the property page:

imagen

But I think it would be a better idea to remove the IconFont property, it can cause confusions.
I think I'll make that property hidden in the next release.

@EduardoVB
Copy link
Owner

EduardoVB commented Nov 16, 2022

About the method for loading the fonts fast, there are some things to try.
The first one is to use CB_INSERTSTRING instead of CB_ADDSTRING.

Const CB_INSERTSTRING As Long = &H14A&

SendMessage cboTabIconFont.hWnd, CB_INSERTSTRING, c, StrPtr(Screen.Fonts(c))

If that also crash the IDE, then:

Private Sub EnsureFontListLoaded()
    Const WM_SETREDRAW = &HB
    Dim c As Long
    
    SendMessage cboTabIconFont.hWnd, WM_SETREDRAW, 0, 0
    If Not mFontListLoaded Then
        cboTabIconFont.Clear
        cboTabIconFont.AddItem ""
        For c = 0 To Screen.FontCount - 1
            cboTabIconFont.AddItem Screen.Fonts(c)
        Next
        mFontListLoaded = True
    End If
    SendMessage cboTabIconFont.hWnd, WM_SETREDRAW, -1, 0
End Sub

That won't be as fast, but still faster than the normal code.

@wwwbarnamehadotnet
Copy link
Author

wwwbarnamehadotnet commented Nov 16, 2022

No, but IconFont does not change the Icon Font for all tabs but only for the current tab. I followed the same logic of SSTab's Caption, Picture, etc. It is possible to access tabs properties by accessing a property that works with the currently selected tab.

For example, the Caption property assigns the TabCaption for the current tab, Picture assigns the TabPicture for the current tab. I did the same for other properties, for example, IconCharHex assigns the icon character for the current tab (the indexed property is TabIconCharHex). I followed the same logic with the icon font, since each tab can have a different font. There is a TabIconFont property and also the corresponding IconFont, that only assigns the font to the current tab.

To assign the font to different tabs, you can do it from the property page:

imagen

But I think it would be a better idea to remove the IconFont property, it can cause confusions. I think I'll make that property hidden in the next release.

ok thanks for help till now and my meant in the last video was been about the font tab, where both the font and icon font must be set at the same time, and of course, I meant that this section does not work because the changes are not saved by pressing the apply button.

So, if the presence of the "font tab" is not mandatory, then it should be completely removed too.
i attached for better my means because my language is not english.

1111

thanks for that last code too , speed was been like as normal load maybe a bit better (The speed could not be seen) like as u said but i still dont know why that api not worked good and make that error and i will be wait for next release and if u could jst check this forum too bcs i am did try at this two month and i ust made some like as i sent in that thread,maybe you have been some samples about it.

pls answer in that thread if u can help about that rotate 2d or 3d canvas layered and maybe that slide effect with dark preview bg.
https://www.vbforums.com/showthread.php?898306-any-body-can-help-about-design-this-3d-rotate-contents-and-then-this-slide-effect

@EduardoVB
Copy link
Owner

Could you test CB_INSERTSTRING? Did it work or also crashed?

Const CB_INSERTSTRING As Long = &H14A&

SendMessage cboTabIconFont.hWnd, CB_INSERTSTRING, c, StrPtr(Screen.Fonts(c))

@EduardoVB
Copy link
Owner

Done. I removed the IconFont property (actually hided it), since it was source of confusion (as I tried to explain, but it seems not very successfully).
It is to note that it was not a bug, but it was working as it was expected.

On the other side, the Font property is working fine, since it is not by tab, but instead it sets one single font for all the tab captions. So it is left as it was (I don't know why you thought that it was not working -I mean the Font property-, because it is).

@wwwbarnamehadotnet
Copy link
Author

wwwbarnamehadotnet commented Nov 23, 2022

because in that time i wrote about apply not effected like as i sent video and images before,font part its worked in updated next versions thanks.

about this :
`Const CB_INSERTSTRING As Long = &H14A&

Sendessage cboTabIconFont.hWnd, CB_INSERTSTRING, c, StrPtr(Screen.Fonts(c))`

i not checked yet because i am using last version downloaded today and still working with low speed loaded fonts and etc but its ok and important for me was been that crash problem to solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants