Usercontrol with DisplayWaveFormAnalyzer

Started by QNT, April 15, 2020, 10:30:29 AM

Previous topic - Next topic

QNT

Hello,

I'm trying to create a usercontrol with a DisplayWaveformAnalyzer on it. This way, I can use the usercontrol on different forms without having to do the design again and again.
I succeed in creating the usercontrol and the DisplayWaveformAnalyzer gets displayed OK on the usercontrol. But when I use the usercontrol on a form, the DisplayWaveformAnalyzer only shows partly: it get's cut off. Is there a way to have the DisplayWaveformAnalyzer resize automatically to the usercontrol's size on the form?
I tried to attach a screenshot but I'm not able to add an attachment...  :-\
Regards,

QNT

Administrator

Hello,

the waveform analyzer doesn't have an auto-size feature but can be resized programmatically through the WaveformAnalyzer.Move method: have you already tried with it?

Kind Regards

Severino Delaurenti
MultiMedia Soft

QNT

Hello,

I'm not sure how to use the MOVE method.
Can you advise please?

Regards,

QNT

Administrator

Hello,

that should be quite simple: this method allows defining coordinates and size, both expressed in pixels. If for example your usercontrol should have a size of 600 pixels width and 200 pixels height and you should need to cover the whole usercontrol surface, you could specify 0 and 0 for the nLeft and nTop parameters and 600 and 200 for the nWidth and nHeight parameters. In case the usercontrol should be resized at runtime, you could invoke this method within the OnSizeChanged handler (or, depending upon your environment, whatever is called the handler of the WM_SIZE message) of the usercontrol itself.

Hope this helps to clarify.

Kind Regards

Severino Delaurenti
MultiMedia Soft

QNT