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:
I am also having trouble with getting the form to show. There aren't any issues with setup pages or details pages. However, with these launch pages it just remains blank. Control.CreateControl() doesn't seem to solve the issue (at least for me)
When I pass the control handle into the mlParentWnd as it requires, the launch window size changes to match that of my user control. However, is just doesn't show up.
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.
This is my thought as well. I’ve tried just about everything I can think of to get this to work too and it really seems like a bug.
I have simplified the task even more to only include the absolute minimum content. It can only be run from the tasklist. You can find it here: https://github.com/Disgustus/TaskLaunchTest
I am also having trouble with getting the form to show. There aren't any issues with setup pages or details pages. However, with these launch pages it just remains blank. Control.CreateControl() doesn't seem to solve the issue (at least for me)
– BigCrazyAlIs that the case with PDMSDK?
– AmenJliliI haven't tried the Launch page with SDK yet but I don't believe it's working
– BigCrazyAlWhen I pass the control handle into the mlParentWnd as it requires, the launch window size changes to match that of my user control. However, is just doesn't show up.
– BigCrazyAl