🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: nl.comp.programmeren
Article #762

Re: Venstertje steeds "On Top" in VB3.0 ?

#762
From: Ludo Joris
Date: Wed, 04 Jun 1997 00:00
53 lines
2001 bytes
roger.volckaert@skynet.be (Roger Volckaert) wrote:

>Hallo,
>
>Ik schreef een eenvoudig programmaatje in Visual Basic 3.0 (Win 3.11)
>om de telefoonkosten te visualiseren tijdens het surfen.
>
>Een klein rechthoekig venstertje (2 cm x 5 cm) in de
>rechterbenedenhoek van het scherm toont de kostenteller.
>
>Kan iemand me vertellen hoe ik er moet voor zorgen dat dit schermpje
>steeds zichtbaar blijft ???
>
>Wanneer momenteel een ander programma full-screen wordt gebruikt,
>verdwijnt m'n tellertje onverbiddelijk naar de achtergrond.
>
>Reeds hartelijk dank bij voorbaat,
>
>Roger Volckaert
>
>roger.volckaert@skynet.be

Roger,

Ik gebruik de volgende code (ergens van het net geplukt):

In de declarations van een module:

'Use the declaration and constants along with the code
'in Form_Load to make a window remain on top.

Declare Function SetWindowPos Lib "User" (ByVal h%, ByVal hb%, ByVal X%, ByVal
Y%, ByVal cx%, ByVal cy%, ByVal f%) As Integer
Global Const SWP_NOMOVE = 2
Global Const SWP_NOSIZE = 1
Global Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Global Const HWND_TOPMOST = -1
Global Const HWND_NOTOPMOST = -2

Form_Load ( )
  'Form always on top.
  'Change the zero's to position the window.
  Dim R as Integer
  R = SetWindowPos(frmMyForm.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
  ...
End Sub

HTH
--
Ludo Joris
RUCA - University of Antwerp, Belgium
lujo@ruca.ua.ac.be
Technical Details
Message-ID: <339515c2.614281@news.ruca.ua.ac.be>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <339475cb.1463256@news.skynet.be>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: 107324,9792dab2f937c7fa,start
X-Google-Attributes: gid107324,public
X-Google-Thread: 111c4c,9792dab2f937c7fa,start
X-Google-Attributes: gid111c4c,public
From: lujo@ruca.ua.ac.be (Ludo Joris)
Subject: Re: Venstertje steeds "On Top" in VB3.0 ?
Date: 1997/06/04
Message-ID: <339515c2.614281@news.ruca.ua.ac.be>
X-Deja-AN: 246002117
References: <339475cb.1463256@news.skynet.be>
Organization: RUCA - University of Antwerp, Belgium
Reply-To: lujo@ruca.ua.ac.be
Newsgroups: nl.comp.programmeren,be.comp