Questions on your download example:

Add-in Express™ Support Service
That's what is more important than anything else

Questions on your download example:
How to re-size an Excel task pane in VB.NET 
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
Hi,

I am studying this example:
How to re-size an Excel task pane in VB.NET
https://www.add-in-express.com/support/vb-net-excel.php


What it does:

There is a Task Pane with a Track Bar on it.
By moving the cursor along the Track Bar, the user can change the size of the Task Pane.

The example provides 2 ways of moving the Track Bar:
(1) Dragging the cursor with the mouse.
(2) Using the mouse wheel.


No.1 works fine. The width of the Task Pane changes with the cursor position.

With No.2, there is a small problem:

If we play with the mouse wheel, the cursor moves accordingly.
But the width of the Task Pane does not move!
We must click on the Track Bar to make the Task Pane get its new size.
I understand this may be an incomplete example.

But I am curious to know red to make the below code really functional:

Private Sub tbCurrentSize_MouseUp(sender As System.Object, _ 
     e As System.Windows.Forms.MouseEventArgs) Handles tbCurrentSize.MouseUp

        ChangeFormSize(tbCurrentSize.Value)

    End Sub


Thanks
Leon
Posted 08 Feb, 2019 08:48:25 Top
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
:)
Posted 11 Feb, 2019 06:26:45 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Leon,

Leon Lai Kan writes:
(2) Using the mouse wheel.


Using the mouse wheel isn't mentioned in the description of that add-in on that page.


Andrei Smolin
Add-in Express Team Leader
Posted 11 Feb, 2019 06:42:37 Top
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
Hi, Andrei

You are right.

I thought the MouseUp Event referred to rotation of the mouse wheel (because when I rotate the wheel, the cursor moves.So I was expecting the task pane to move)

Actually it means releasing the mouse button.

So, there is no problem with the sample code. It's I who misunderstood :(

Thanks
Leon


Added:
However, the MouseWheel event does what I had in mind :)
Posted 11 Feb, 2019 06:48:44 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
No problem.


Andrei Smolin
Add-in Express Team Leader
Posted 11 Feb, 2019 07:06:47 Top