I'm working on an app which has a secondary form with a wmp object on it to act as a preview.
My problem is that when the app is run and the form is viewed everything works fine, but when you close the form (or hide) and come back to it the wmp object has resized itself to 300x300.
I've tried everything including monitoring sizechange and resetting it, setting size on form open, etc. It appears that a number of the objects settings are getting reset but i seem to be able to set all of them back except the size property.
I don't understand why this is happening, I'm not destroying the control at any point, just hiding the form it is on.
This is reproducible by doing the following ...
1. on the main form put a button which opens a 2nd form with .show or .showdialog
2. create a second form, put an exit button on it with a me.close or similar event attached.
3. drag a wmp object to it and size it to something like 200x200 or whatever.
4. on the loadevent for the form assign a picture to the wmp control. eg wmp.url="C:\abc.jpg"
now when you run it and click the button to show the form it will be ok, but when you then 'exit' the 2nd form and open it again the wmp control will have resized to 300x300
can somebody please let me know how to stop this happening.
My problem is that when the app is run and the form is viewed everything works fine, but when you close the form (or hide) and come back to it the wmp object has resized itself to 300x300.
I've tried everything including monitoring sizechange and resetting it, setting size on form open, etc. It appears that a number of the objects settings are getting reset but i seem to be able to set all of them back except the size property.
I don't understand why this is happening, I'm not destroying the control at any point, just hiding the form it is on.
This is reproducible by doing the following ...
1. on the main form put a button which opens a 2nd form with .show or .showdialog
2. create a second form, put an exit button on it with a me.close or similar event attached.
3. drag a wmp object to it and size it to something like 200x200 or whatever.
4. on the loadevent for the form assign a picture to the wmp control. eg wmp.url="C:\abc.jpg"
now when you run it and click the button to show the form it will be ok, but when you then 'exit' the 2nd form and open it again the wmp control will have resized to 300x300
can somebody please let me know how to stop this happening.
Last edited: