Procedure FrontWindow()

AmigaOS specific forum
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Roxxler.

Hi,
hier eine kleine Procedure welche es erlaubt, ein Fenster in den
Vorder- oder Hintergrund zu stellen.
Hi,
here a little procedure which allows to put a window to front or
back.

Procedure.b FrontWindow(fensterid.l,status.b)
;
; Das Unterprogramm bringt das angegebene Fenster in den Vordergrund oder
; in den Hintergrund (je nach status.b).
; Es wird die WindowID() übergeben, so ist mittels UseWindow() vorher bestimmbar
; welches Fenster in den Vorder- oder Hintergrund gebracht werden soll. Beispiel:
; UseWindow(2)
; FrontWindow(WindowID(),-1) ; bringt das angegebene Fenster 2 nach vorn
;
; This procedure puts the given window to the back or to the front.
; For that you must use PureBasic's WindowID(), so you can define with a
; UseWindow() what window is put to back or front. Example:
; UseWindow(2)
; FrontWindow(WindowID(),-1) ; puts the window 2 to front
;
; Parameter: fensterid.l = Die Adresse des Fensters (ermittelt von WindowID())
; The address of the window structure (given by WindowID())
;
; status.b = TRUE = -1 Das Fenster wird nach vorn gebracht
; The window is put to the front
; = FALSE = 0 Das Fenster wird nach hinten gelegt
; The window is put to the back
;
; Rückgabe : Die Funktion gibt immer TRUE = -1 zurück.
; Return : always TRUE = -1
;
; Voraussetzungen: Die Intuition.library muß geöffnet sein (OpenIntuitionLibrary_()).
; Wird von PureBasic am Programmende wieder geschlossen.
; Requirements : You have to open the Intuition.library (OpenIntuitionLibrary_(version)).
; PureBasic will close the library at program end.
;

If status=-1
WindowToFront_(fensterid)
EndIf
If status=0
WindowToBack_(fensterid)
EndIf
ProcedureReturn -1
EndProcedure


Recht ruhig hier im Amiga-Bereich ?!
It seems that there are not many Amiga user of PureBasic ?!

Greetings ..
Roxxler
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by plouf.

hi roxxler
i am one of the few :)
couldn't check your procedures yet as i am out of computer the last
two weeks :( ihope now probs are end)
however nice work i would say, i was thinking of it but not find a way :)
btw i see that you know rairly well the AmigaOs api :wink:)
i dont know it at all ;(
(maybe i ask a lot) but do you know any way to find the file that
doubled clicked ?
i wand to find the filename (address) even if the name has changed ?

christos



Edited by - plouf on 06 February 2002 21:31:38
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by redacid.

Hi,

I would like to use PB for Amiga-Apps, but
with V2.32 I didn´t get far. So atm I use
the Windows-compiler (and to be honest, even
with that I don´t get much further...).

So I really hope that the V2.90 for Amiga
will be out very soon.

regards,
Redacid
---
Only Amiga makes it possible!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Roxxler.
Hi,

I would like to use PB for Amiga-Apps, but
with V2.32 I didn´t get far. So atm I use
the Windows-compiler (and to be honest, even
with that I don´t get much further...).

So I really hope that the V2.90 for Amiga
will be out very soon.

regards,
Redacid
Yeah,

i am still waiting too :) I have tried a
little bit with the PC version, but differences
between both versions are too big and therefor
i use about 95 % the Amiga version. But anyway,
Fred does a great work on both versions !

Greetings ..
Roxxler
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Roxxler.
......
(maybe i ask a lot) but do you know any way to find the file that
doubled clicked ?
i wand to find the filename (address) even if the name has changed ?

christos
Hi,
what do you exactly mean ? You start your programm and you
want to find out the name of the started program ?

If so, i have already thought about this. If you start a
program from the workbench the workbench send a message
to the program and the program has to answer this, easy
said. The message includes a WBArg structure with the name
of the double clicked file, if i remember correct.The
work to reply the message the PureBasic command WBStartup()
will do. So it is difficult to catch the data. Maybe we
habe to write a own WBStartup(). I will check this (also
if the things i wrote are correct :))

In the docs of PureBasic you can read that a WBStartup()
followed by a InitToolType(info) will initialize the
"info 0" with the double clicked Icon. Maybe here is
a way, but i have to check.

Sorry for my poor english :)

Greetings..
Roxxler
Post Reply