Thread View: be.comp.programming
3 messages
3 total messages
Started by Robert Lambrechts
Sun, 18 May 2003 14:00
Een systeem modaal formulier in VB6. Hoe?
Author: Robert Lambrechts
Date: Sun, 18 May 2003 14:00
Date: Sun, 18 May 2003 14:00
7 lines
1265 bytes
1265 bytes
Iemand? Hoe kan ik de gebruiker beletten tijdens het runnen van een vb6 programma onder Windows 2000 dat hij kan overschakelen (via de taakbalk of Start Uitvoeren of alt tab etc.) naar een andere toepassing? Robert
Re: Een systeem modaal formulier in VB6. Hoe?
Author: sotto
Date: Sun, 18 May 2003 16:48
Date: Sun, 18 May 2003 16:48
17 lines
1650 bytes
1650 bytes
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 On Sun, 18 May 2003 16:00:41 +0200, Robert Lambrechts wrote: > Iemand? > > Hoe kan ik de gebruiker beletten tijdens het runnen van een vb6 programma > onder Windows 2000 dat hij kan overschakelen (via de taakbalk of Start > Uitvoeren of alt tab etc.) naar een andere toepassing? > > Robert
Re: Een systeem modaal formulier in VB6. Hoe?
Author: Billyke
Date: Sun, 18 May 2003 17:11
Date: Sun, 18 May 2003 17:11
39 lines
2367 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads