I’m running into a problem trying to display a custom dialog when launching a task. To my understanding I have everything set up correctly for showing a user control but when the task is launched the dialogbox is showing up empty. It has the right size and everything but the controls themselves aren’t showing. See attached
I know that the TaskLaunch event is correctly started because when I implement a MessageBox it works correctly. Also, I have all the taskflags set (just to make sure I’m not missing anything).
To my understanding this task launch dialog is working the same as a custom task details page. I have successfully implemented the details page and that is also working as it should.
What am I missing?
Here is the code for the details page (which works) and the TaskLaunch method:
A very good possibility is that PDM does not resize your user control before you create it. Can you give it a width and height and try again? Do that before you call CreateControl
I would also subscribe to the load event and show a message box just to know the usercontrol got loaded.
I’m not sure what you mean with subscribing to the load event. The showing/loading of the usercontrol is internal to the API. I can add a MessageBox to the initialization of the control but that would not actually say anything about what happens after.
I added the MessageBox:
and it initializes correctly:
So it really looks like a bug in the API or the documentation for the API is missing information regarding the correct implementation of the launch dialog.