Closed MineEric64 closed 3 years ago
also, I tested one more thing.
Imports TestButton = unvell.D2DLib.WinForm.D2DControl
TestOnButton(1, False)
130ms elapsed
Imports TestButton = System.Windows.Forms.Button
TestOnButton(1, False)
1ms elapsed
I don't think it is a good idea to create many D2DControl instances and add them onto a Windows Form. The D2DControl is designed to individually hold a hardware associated handler (device), which is expensive. In this case, you might not able to get any performance benefit.
I am not sure what is your final goal, but if you can create a single D2DForm window and your own button components to handle the user's mouse event, such as click or hover, I think that would be a better implementation.
oh I got it. thanks for reply this issue :)
I fixed this issue using d2d form instead of winform.
thanks!!
Hi, I'm trying to add multiple (a hundred) d2dcontrols in my form.
but it's too slow. It took 4100ms for adding
D2DControl
and my custom controlD2DButton
. But it just took 100ms for addingButton
class. (in System.Windows.Forms)Why it is too slow? Also I used suspend & resume layout, but it didn't work for me.
I tested in this code (vb.net):
4100ms elapsed
100ms elapsed
thanks.