Search Tools Links Login

Exclusive Mode (Updated)


This function allows the application to enter and exit exclusive mode. In this mode any message boxes or prompts from Windows and other applications will not show up infront of the program. This is useful when you don't want anything to come up infront of your application window.

Original Author: Jan Nawara

Inputs

Reguires a True to turn exclusive mode on and False to turn it off.

Assumptions

Essentially this code makes Windows think that your application is a screen saver. The only type of application that Windows will not interupt with message boxes, etc.

Side Effects

This code may cause some problems with screen savers that do not use the normal Windows interface such as After Dark. Users should be made aware of this.

API Declarations

Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long

Code

Public Sub Exclusive_Mode(Use As Boolean)
'If True was passed makes app exclusive
'Else makes app not exclusive
Dim Scrap
Scrap = SystemParametersInfo(97, Use, "", 0)
End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 83 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.