Re: Auto aligning controls
very good job, works pretty well
Re: Auto aligning controls
Hello AnyCoder!
Thank you very much for your contribution.
It works very well in "Me.ScaleMode=Twip", but in the "Me.ScaleMode = Pixel" is not working properly.
In design development, the "ScaleMode = Pixel" pattern is often used.
Please help to optimize the functionality to be compatible with both "ScaleMode=Twip" and "ScaleMode=Pixel".
Thank you very much!
1 Attachment(s)
Re: Auto aligning controls
yokesee, smileyoufu
Thanks for your reaction and encouragement.
Quote:
It works very well in "Me.ScaleMode=Twip", but in the "Me.ScaleMode = Pixel" is not working properly.
Initially the code was developed under VBA which works in point ScaleMode, some features were removed like automatic scrollbars which not supported in vb6 for Forms and Frames.
Try this version adapted for pixel scale mode
3 Attachment(s)
Re: Auto aligning controls
Hello AnyCoder!
Thank you very much for your contribution.
Thanks for the quick help, the sample works fine in pixel mode, which is a very useful feature.
There is a very strange problem, using "https://www.oaltd.co.uk/indenter/", https://www.oaltd.co.uk/DLCount/DLCo...ndenterVB6.exe,
After indenting the module code format in "VBCItem.cls", the bottom control is laid out out out of order (there is no problem with the indentation of the code in other modules).
I've compared the code and haven't found the cause of the problem, but once I run it, the bottom control is problematic.
My solution now is to make "VBCItem.cls" read-only to avoid any more problems.
If possible, please help analyze the cause of the error, thank you!
Thank you very much!
Attachment 194569
Attachment 194567
Attachment 194568
Re: Auto aligning controls
After comparing the physical files CtrlAlign.cls, I found that DispID attributes were added to some members to bind them to the base properties with the corresponding name.,.just delete them.
Code:
Attribute SplitterEvent.VB_VarUserMemId = 1073938445
Attribute SplitterEvent.VB_VarHelpID = -1
Public OrgLeft As Single, OrgTop As Single
Attribute OrgTop.VB_VarUserMemId = 1073938439
Public OrgWidth As Single, OrgHeight As Single
Attribute OrgWidth.VB_VarUserMemId = 1073938441
Attribute OrgHeight.VB_VarUserMemId = 1073938441
Public Owner As CAlignCls
Attribute Owner.VB_VarUserMemId = 1073938443
Public Parent As VBCItem
Attribute Parent.VB_VarUserMemId = 1073938444
Re: Auto aligning controls
Hello! AnyCoder?
Thank you so much for your quick and helpful help, your reply was quick, effective and accurate to resolve the issue.
Thank you so much for helping me.