Always on top Window

francisco cobos

Member
Licensed User
Hello,

Is it possible from a basic4 appicattion to make a window (in desktop) in other aplication to stay "always on top"?
I can guess that could be possible usig the "Door library", but I don't now how.

Thanks in advance if you can help me.
 

agraham

Expert
Licensed User
For desktop applications you should explore my FormExDesktop library whose forms are better suited, in a lot of cases, to desktop only apps than the native Basic4ppc form though there are a few pitfalls you might experience. FormEx forms have a TopMost property.

With the Door library on a normal Basic4ppc Form you might think you could do this, Obj1 is a Door library Object.
B4X:
Obj1.New1(false)
  ... 
Obj1.FromControl("Form1")
Obj1.SetProperty("TopMost", True)
However it won't work as you might expect as a Basic4ppc Form only allows one Form to be displayed at a time on the desktop so showing a Form hides the currently displayed Form automatically. I assume that this is done to emulate what the user sees on the device. See the FormEx demo for multiple FormExs on the desktop.

EDIT:- I've just noticed you said "other application" in which case the Door library might work. I say might as I think that TopMost may only work within an application and not on the desktop as a whole but I am not sure!
 
Last edited:

francisco cobos

Member
Licensed User
Hello Agrahan and Cableguy,

What I'm triyng to do, is to manage an external applicattion, not a form in my own application. I have tried the Dimitris library in this way:

dxf="ProductView - ["& FileDirname(fichero_LI) &"\"& TABLE1.Cell("ASSY",0) & ".dxf"&"]"
dz.BringWindowToFront(dxf)

This works fine, but I would like to left this window "always on top" instead.

Thanks, moito obrigado.

Francisco Cobos
Spain
 
Top