[fpc-pascal]How to set focus to graph window?

Bernhard Steffen bernhard.steffen at gmx.net
Thu Mar 13 16:12:48 CET 2003

Thanks, Florian and Matt, for your help.

I used Matt's approach to bring the window to the top (works), thus
avoiding the need to change the original sources. And, I can print some
additional information for the user before opening the graph window (I
have a wrapper function for InitGraph, anyway).


"Matt D. Emson" schrieb:
> > > Is there a way to set the focus to the freshly opened graph
> > > window from within my program? (eg: open a graph window and
> > > define this as the foremost window, in front even of the opening
> > > program)
> > >
> > > Any help appreciated, thanks in advance
> >
> > Hmmm, I wrote the graph unit for win32 and I don't know an
> > "official" way, so I guess you've to modify the graph unit
> > sources.
> I have no idea if this will help or not, but if the original poster
> can either get the windows handle or find the handle from the
> class/title of the window, they can use Win API calls to gain
> focus. [I'm assuming this is a regular WinAPI window.]

bernhard.steffen at gmx.net

More information about the fpc-pascal mailing list