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.
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
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.
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.
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
SetSystemModal
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?