General discussion

  • Creator
    Topic
  • #2080197

    SetSystemModal

    Locked

    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?

All Comments

  • Author
    Replies
    • #3900760

      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

      • #3793882

        SetSystemModal

        by andy watson ·

        In reply to SetSystemModal

        The question was auto-closed by TechRepublic

    • #3902459

      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.

      • #3793883

        SetSystemModal

        by andy watson ·

        In reply to SetSystemModal

        The question was auto-closed by TechRepublic

    • #3902018

      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.

      • #3793884

        SetSystemModal

        by andy watson ·

        In reply to SetSystemModal

        The question was auto-closed by TechRepublic

    • #3793881

      SetSystemModal

      by andy watson ·

      In reply to SetSystemModal

      This question was auto closed due to inactivity

Viewing 3 reply threads