General discussion

Locked

SetSystemModal

By Andy Watson ·
Under WIN32S the API call for SetSystemModal is no longer available. I need to set a window in VB5 to System Modal. The SetWinPos call can be used to force and keep the window on top but not system modal. Any ideas?

I also have a sneaky suspiscion that Microsoft have not fixed the bug in VB where keyboard events do not trap the Win95 key. Anyone know a fix for this?

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

SetSystemModal

by Sakis Samaras In reply to SetSystemModal

Hi,
I 'm an average VB programmer and mostly i use VB6 for development
In VB6 the only thing you have to include into your code is:
load form
form.show 1 (stands for modal)
thet's all
PS
you can't display a non model from called by a model one.
As for the Win95 key is to be treated as a key combination of control+escape ... ( I think...) so if you trap this combination it should work fine .. :-)
Hope helps

Collapse -

SetSystemModal

by Andy Watson In reply to SetSystemModal

The question was auto-closed by TechRepublic

Collapse -

SetSystemModal

by Thomas Seeger In reply to SetSystemModal

Hello,
I found an answer from Microsoft to your problem. It is a description to block a taskswitch on WIN95, but should als work with Win98
Look for the article

HOWTO: Block CTRL+ALT+DEL and ALT+TAB in Windows 95.
Search at the microsoft DeveloperNetwork Online for Q161133.

Collapse -

SetSystemModal

by Andy Watson In reply to SetSystemModal

The question was auto-closed by TechRepublic

Collapse -

SetSystemModal

by NiceMouse In reply to SetSystemModal

Hide the taskbar, disable ALT+TAB and CTRL+ALT+DEL, maximize your window, make your window always on top. You'll get a System modal window.

You can disable ALT+TAB by
using SystemParametersInfo(SPI_FASTTASKSWITCH, False)

and disable CTRL+ALT+DEL with
SystemParametersInfo(SPI_SCREENSAVERUNNING, True)

I can't recall the above API function correctly. Should be something like SystemPArametersInfo or SystemsParameterInfo. Search at Win32 Programmers REference.

You can get the handle toWindows Taskbar with FindWindow('Shell_TrayWnd',''). and issuing HideWindow(TrayWndHandle, SW_HIDE) will hide it.

Be sure to set your window to TOPMOST and maximized it.

This will create illusion that your application is System Modal.

Collapse -

SetSystemModal

by Andy Watson In reply to SetSystemModal

The question was auto-closed by TechRepublic

Collapse -

SetSystemModal

by Andy Watson In reply to SetSystemModal

This question was auto closed due to inactivity

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Software Forums