🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #5200

Re: Een systeem modaal formulier in VB6. Hoe?

#5200
From: Billyke
Date: Sun, 18 May 2003 17:11
39 lines
2367 bytes
"sotto" <junk@sotto.be> wrote in message
news:pan.2003.05.18.16.48.41.132664@sotto.be...
> Voor zover ik weet is dit onmogelijk.
>
> Wat je wel kan proberen is om (mbv API-calls) je formulier te centreren op
> het scherm en het even groot als de resolutie te maken, en het "on top" te
> zetten. (ik dacht dat daarvoor een api bestond)
>
> mvg
>


Met deze code zou je iets moeten bereiken (is wel niet echt perfect), maar
zal waarschijnlijk wel voldoen.
Zet een timer op de form en zet het interval op 1.


Option Explicit

Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Private Declare Sub SetWindowPos Lib "User32" (ByVal hWnd As Long, ByVal
hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long,
ByVal cy As Long, ByVal wFlags As Long)


Private Sub Form_Load()
    Me.WindowState = vbMaximized
End Sub

Private Sub Timer1_Timer()
    SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or
SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
End Sub
Technical Details
Message-ID: <ba8eu1$lmb$1@reader11.wxs.nl>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!nntp1.fuse.net!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!news2.euro.net!transit.news.cuci.nl!cleanfeed.casema.net!newsfeed.wxs.nl!textnews.wxs.nl!not-for-mail
References: <ba83k1$7kc$1@news.worldonline.be> <pan.2003.05.18.16.48.41.132664@sotto.be>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fcea4,6ed1bcddb7b48a1c
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2003-05-18 10:10:58 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!nntp1.fuse.net!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!news2.euro.net!transit.news.cuci.nl!cleanfeed.casema.net!newsfeed.wxs.nl!textnews.wxs.nl!not-for-mail
From: "Billyke" <gert.verstappen@gmx.net>
Newsgroups: be.comp.programming
Subject: Re: Een systeem modaal formulier in VB6. Hoe?
Date: Sun, 18 May 2003 19:11:45 +0200
Organization: Planet Internet
Lines: 41
Message-ID: <ba8eu1$lmb$1@reader11.wxs.nl>
References: <ba83k1$7kc$1@news.worldonline.be> <pan.2003.05.18.16.48.41.132664@sotto.be>
NNTP-Posting-Host: 81.11.150.41
X-Trace: reader11.wxs.nl 1053277953 22219 81.11.150.41 (18 May 2003 17:12:33 GMT)
X-Complaints-To: abuse@planet.nl
NNTP-Posting-Date: 18 May 2003 17:12:33 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165