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

2003-03-13 Thread Florian Klaempfl
Bernhard Steffen wrote:
I'm using the graph unit to provide graphing capabilities for my program
(Win 32 platform). The graph window opens as a separate window, which is
ok for me - except one point: The graph window gets opened with the
least important position in Z-order (ie: all other windows are in front
of this window).
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.

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2003-03-13 Thread Matt D. Emson


> > 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.] 

Something like:

var
  h: Thandle;
begin
  h := FindWindow( nil, 'Graph Window Title' ); //replace with your
window title
  
  if ( h <> 0 ) then begin

//bring the window to the front
if not(SetForegroundWindow( h )) then
  writeln( 'Failed to bring window to front.' );

//give the window focus (i.e. remove focus from any controls)
if not(  SendMessage( h, WM_SETFOCUS, 0, 0 ) = 0  ) then
  writeln( 'Failed to set focus to window.' );

  end
  else
writeln('Window was not found.');
end;

You can substitute the 'WM_SETFOCUS' part to use the handle of the
actual control you wish to have focus, or leave it out and the default
windows functionality will happen.

Matt

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal]FPC for a middleware application

2003-03-13 Thread Jilani Khaldi
Hi All,
I am looking for some code in FP to develope a client/server (3-tier) application (I 
need only the middleware 
part), could someone point me?
Thanks!

jk



___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2003-03-13 Thread Marco van de Voort
> > > 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.] 
> 
> Something like:
> 

Or is he searching for a way to do 

http://www.freepascal.org/faq.html#win-graph 

?
___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal]FPC for a middleware application

2003-03-13 Thread Matt Emson
If the indy components compile under FPC, they could be used. Take a
look at : http://www.indyproject.org/Articles.html

I have a 3 tier system I'm writing in Delphi currently. Client Tier
connects to Server Tier with the data stored in an interbase server. All
3 items can be distributed onto separate servers/desktops. It's been
fairly painless with Indy so far. Hardest part was the transport
protocol between the client and server. Then again this *is* all in
Delphi, so your milage may vary.

If you want something more exotic, you could easily add more logical
layers using a similar model.

Matt

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Jilani Khaldi
> Sent: 13 March 2003 15:31
> To: FreePascal
> Subject: [fpc-pascal]FPC for a middleware application
> 
> 
> Hi All,
> I am looking for some code in FP to develope a client/server 
> (3-tier) application (I need only the middleware 
> part), could someone point me?
> Thanks!
> 
> jk
> 
> 
> 
> ___
> fpc-pascal maillist  -  [EMAIL PROTECTED] 
> http://lists.freepascal.org/mailman/listinfo/f> pc-pascal
> 


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]FPC for a middleware application

2003-03-13 Thread Michael . VanCanneyt


On Thu, 13 Mar 2003, Jilani Khaldi wrote:

> Hi All,
> I am looking for some code in FP to develope a client/server (3-tier) application (I 
> need only the middleware
> part), could someone point me?

Sebastian Guenther is working on fpXML-RPC: This is functional, and can be
used for 3 tier programming. In fact he uses it for exactly that.
(mail [EMAIL PROTECTED])

Michael.

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2003-03-13 Thread Bernhard Steffen
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).

Bernhard

"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.]
[...]

-- 
[EMAIL PROTECTED]
http://www.bernhard-steffen.de/


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2003-03-13 Thread Thomas Schatzl
Hi,

  although others have already pointed out a few solutions, here're my two
cents...

> I'm using the graph unit to provide graphing capabilities for my program
> (Win 32 platform). The graph window opens as a separate window, which is
> ok for me - except one point: The graph window gets opened with the
> least important position in Z-order (ie: all other windows are in front
> of this window).
>
> 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)

Graph (Win32 version) publishes the variable "mainwindow" in its interface
section. So why not use it?

E.g.

uses
  windows;

SetForegroundWindow(mainwindow); // bring window into foreground
SetFocus(mainwindow); // set focus

Probably worth trying... after a quick look at the sources I think that this
variable holds the handle to the graph window, doesn't it? Florian?

[Not tested]

Regards,
  Thomas

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: RE: [fpc-pascal]FPC for a middleware application

2003-03-13 Thread Jilani Khaldi
>If the indy components compile under FPC, they could be used. Take a
>look at : http://www.indyproject.org/Articles.html
>
>I have a 3 tier system I'm writing in Delphi currently. Client Tier
>connects to Server Tier with the data stored in an interbase server. All
>3 items can be distributed onto separate servers/desktops. It's been
>fairly painless with Indy so far. Hardest part was the transport
>protocol between the client and server. Then again this *is* all in
>Delphi, so your milage may vary.
Thank you for this information, but on server side I prefer to stay with FPC and 
Linux/FreeBSD.

jk




___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: RE: [fpc-pascal]FPC for a middleware application

2003-03-13 Thread Anton Tichawa
On Thursday 13 March 2003 21:20, you wrote:
> >If the indy components compile under FPC, they could be used. Take a
> >look at : http://www.indyproject.org/Articles.html
> >
> >I have a 3 tier system I'm writing in Delphi currently. Client Tier
> >connects to Server Tier with the data stored in an interbase server. All
> >3 items can be distributed onto separate servers/desktops. It's been
> >fairly painless with Indy so far. Hardest part was the transport
> >protocol between the client and server. Then again this *is* all in
> >Delphi, so your milage may vary.
>
> Thank you for this information, but on server side I prefer to stay with
> FPC and Linux/FreeBSD.
>
> jk

are there any signs from microsoft's side to heavily support interconnection 
to free systems? i have programmed and installed a peer-to-peer solution 
between two PC's using windows me. On my office computer, I have both windows 
98 with FPC and linux with FPC .. I spend much time changing OS .. I dare 
suggest real-time switching between the two OSs, as long as we still use 
one-processor-systems .. But that would require Microsoft to join the band.

anton.

--

"Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte 
Berechnungen einzuweben."

Doris Langley Moore: Ada, Countess of Lovelace (London 1977).

--

Anton Tichawa
Volkertstrasse 19 / 20
A-1020 Wien
mobil: +43 664 52 07 907
email: [EMAIL PROTECTED]

--
___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: RE: [fpc-pascal]FPC for a middleware application

2003-03-13 Thread Marco van de Voort
> > >connects to Server Tier with the data stored in an interbase server. All
> > >3 items can be distributed onto separate servers/desktops. It's been
> > >fairly painless with Indy so far. Hardest part was the transport
> > >protocol between the client and server. Then again this *is* all in
> > >Delphi, so your milage may vary.
> >
> > Thank you for this information, but on server side I prefer to stay with
> > FPC and Linux/FreeBSD.
> >
> > jk
> 
> are there any signs from microsoft's side to heavily support interconnection 
> to free systems?

No, they are even digging in deeper. They say they'll be open (and e.g. base
the new word format on XML), but then they pervert XML so that only
Microsoft and partners can process the word documents.

> i have programmed and installed a peer-to-peer solution between two PC's
> using windows me. On my office computer, I have both windows 98 with FPC
> and linux with FPC .. I spend much time changing OS .. I dare suggest
> real-time switching between the two OSs, as long as we still use
> one-processor-systems .. But that would require Microsoft to join the
> band.

VmWare?
___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2003-03-13 Thread Bernhard Steffen
Thanks for the link, but that's not the case for me. My program is
partly text-based and partly graph-based, so it's no "dummy" dos window
for me... But I found a solution that works for me, thanks anyone for
your input.

Bernhard

Marco van de Voort schrieb:
> Or is he searching for a way to do
> 
> http://www.freepascal.org/faq.html#win-graph
> 
> ?


-- 
[EMAIL PROTECTED]
http://www.bernhard-steffen.de/
___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal