Detect mimic size change from VBA

5 Posts
3 Users
0 Likes
33 Views
f.cubattoli
(@f-cubattoliarcinfo-com)
Posts: 167
Reputable Member
Topic starter
 

Hello!

Do you know what can be a fast and easy way to trigger a VBA event when a mimic change its size due of manual user resize?

Best for me is to rise an event when a mimic is resized (on MouseLeave for example) having back the new size (height and widht).

(Goal for me is to resize the TrendViewer object according with mimic size, this part is easy to accomplish using Trend1.Height = xxx and Trend1.Widht = yyy- but I must know xxx and yyy).

Any idea?

Thanks a lot!!

 
Posted : 15/11/2017 3:19 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Hi Filippo,

Why not using 'Scale mimic to fit window' option in mimic properties?
Then no code...

Nico

 
Posted : 16/11/2017 9:13 am
f.cubattoli
(@f-cubattoliarcinfo-com)
Posts: 167
Reputable Member
Topic starter
 

Ciao Nico!
Unfortunately this customer wants to resize the mimic without opening/closing it... :dry:
Do you think there's a way to scale the mimic automatically in this scenario?

The purpose is to have many popup mimics open at the same time. Each one with a Trend Viewer.
And this customer wants to be free to move & resize each popup window on the screen in runtime mode.
I easily found the property for resizing the Trend Viewer control dynamically via VBA, but not a way to detect and read the mimic size change... 🙁

 
Posted : 23/11/2017 9:14 pm
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Hmmm ok.

So, as we dont have the event, the only solution I would do is to propose to your customer:
1. He resize the mimic
2. He makes a specific Key sequence, or click a button to apply the resizing. Here you trigger your code...

OR

You request to the development team to add this event.

Nico

 
Posted : 24/11/2017 8:49 am
(@admin_doc72)
Posts: 493
Member Admin
 

2. He makes a specific Key sequence, or click a button to apply the resizing. Here you trigger your code...

AiTimer with a short interval could help as well if you want to go without a button.

 
Posted : 24/11/2017 1:39 pm