|
-
Jul 21st, 2016, 03:50 PM
#1
Member
Re: CommonControls (Replacement of the MS common controls)
Hello,
happy to have made the project forward.
Another little detail to "tease"
In the following code:
Code:
If ImageListHandle = 0 Or (PropImageWidth = 0 Or PropImageHeight = 0) Then
If PropImageWidth = 0 Then PropImageWidth = UserControl.ScaleX(Picture.Width, vbHimetric, vbPixels)
If PropImageHeight = 0 Then PropImageHeight = UserControl.ScaleY(Picture.Height, vbHimetric, vbPixels)
If ImageListHandle = 0 Then Call CreateImageList
End If
The first test is unnecessary.
By cons, it is important to leave last
If ImageListHandle = 0 Then Call CreateImageList
Last, I'd like able to benefit from your internal routines to implement the subclassing by the method of your choice (usercontrol, class or other)
To manage the mouse wheel by example.
Good luck and thank you for your work.
Last edited by lrd_VB6; Jul 21st, 2016 at 05:03 PM.
-
Jul 22nd, 2016, 02:05 PM
#2
Re: CommonControls (Replacement of the MS common controls)
 Originally Posted by lrd_VB6
Another little detail to "tease"
In the following code:
Code:
If ImageListHandle = 0 Or (PropImageWidth = 0 Or PropImageHeight = 0) Then
If PropImageWidth = 0 Then PropImageWidth = UserControl.ScaleX(Picture.Width, vbHimetric, vbPixels)
If PropImageHeight = 0 Then PropImageHeight = UserControl.ScaleY(Picture.Height, vbHimetric, vbPixels)
If ImageListHandle = 0 Then Call CreateImageList
End If
The first test is unnecessary.
By cons, it is important to leave last
If ImageListHandle = 0 Then Call CreateImageList
Done. Thanks.
I also did another "tease". In the .ImageWidth and .ImageHeight property I replaced
Code:
If ImageListHandle <> 0 Then
Call DestroyImageList
Call CreateImageList
End If
with this
Code:
If ImageListHandle <> 0 Then Call DestroyImageList
If ImageListHandle = 0 Then Call CreateImageList
This ensures that the .hImageList will be valid when setting both .ImageWidth and .ImageHeight > 0.
For the moment this was only the case when setting at design-time. Now it is the same at run-time.
This can be important when setting the ImageList to a .ImageList property of a control prior loading the images!
Anyhow, now it should be perfect and cover all cases.
 Originally Posted by lrd_VB6
Last, I'd like able to benefit from your internal routines to implement the subclassing by the method of your choice (usercontrol, class or other)
To manage the mouse wheel by example.
Please explain in more detail.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|