I have written an exe that does batch processing. It doesnt have a form, it just does the job and then reports the results in a msgbox.
I had a look at the Popup Control and thought it would make a nice replacement for the standard msgbox I was using.
My first request to the development team is Can you make this control creatable so that I can late bind it. eg dim PC as new PopupControl
Since you cant create it like this at the moment I had to add a form so that I could use this object.
This is what I did.
Private Sub ShowReport() Dim PC As XtremeSuiteControls.PopupControl Dim Item As PopupControlItem Load formAbout Set PC = formAbout.PopupControl PC.RemoveAllItems PC.Animation = xtpPopupAnimationSlide PC.AnimateDelay = 256 PC.ShowDelay = 2000 PC.Transparency = 255 PC.VisualTheme = xtpPopupThemeOffice2003 Set Item = PC.AddItem(50, 27, 200, 45, "TEST") Item.Bold = True PC.SetSize 270, 100 PC.Show End Sub
That worked fine except obviously formAbout is still loaded.
I cant unload the form in that Sub because unloading it also closes the PopupControl.
So I put this code in formAbout thinking it would unload the form when the popup control closed.
Private Sub PopupControl_StateChanged() If PopupControl.State = xtpPopupStateClosed Then Unload Me End If End Sub
What actually happens is that my application crashes.
Any thoughts on how I could best achieve my goal? or why the IDE crashes when I unload the form?
|