Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

THBResize doesn\t work on a VB UserControl?

0
Posted

THBResize doesn\t work on a VB UserControl?

0

Indeed the resizer doesn\’t work on a user control. What you can do is to place a Frame or PictureBox control on the UserControl. Instead of placing your controls on the UserControl place them on the Frame. Then place the resizer on the Frame control. In this way the resizer is hosted by the Frame control and this works fine. To resize the Frame simply use the Resize event of the UserControl and resize the Frame manually: Private Sub UserControl_Initialize() THBResize1.hWnd = Frame1.hWnd End Sub Private Sub UserControl_Resize() Frame1.Left = 0 Frame1.Top = 0 Frame1.Width = UserControl.Width Frame1.Height = UserControl.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123