PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Initial form doesn't have focus

PointOfLight · 15 Sep 2004, 22:39 UTC
Just wanted to remind you when you get a chance to add the line of code that sets the program's main window to the foreground. I know it's easy to add by hand, but it would just be nice if the project builder did it for me.
I thought it was there. I added it a couple of builds ago. I will double-check that tomorrow.
PointOfLight,

Do you still have an issue with this one? I forgot about it last build.
PointOfLight · 18 Sep 2004, 13:58 UTC
Just tried a brand new project with the latest build, and I still have to Activate my program by hand to see the main form.
Ok, will look into it.
I found out why you are having this problem.

Make sure your project form isn't a Library form. If it is, PPL doesn't show it by default and doesn't do a SetForegroundWindow() either.

You have to do it yourself.

Code:
MyForm_Create;
ShowWindow(MyForm$);
SetForegroundWindow(MyForm$);


If you create a form that is not a library form, the form generator will add this code automatically.