Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Screen Saver Setting Option

Posted on 1999-01-24
4
Medium Priority
?
147 Views
Last Modified: 2010-05-03
I have created my own screen saver in VB 5.0 for NT 4.0 and win '95.  

From the Display properties i could set my Screen Saver. When the user presses the settings... it calls the screen saver .SCR file with /c option which calls the settings form. When the settings form is open i don't want the user to click on the display properties window.  I tried to open the setting form as settingfrm.show vbModal.  But this doesn't work.  Can anyone help me solve this problem.  I have also tried the setWindowsPos  API which makes this window TOPMOST, but still i am able to close the Display Properties window.
0
Comment
Question by:raguram
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Expert Comment

by:Foyal
ID: 1470464
did you try calling the settings form as vbModal? (I don't even know if it can be... just a thought)
0
 

Author Comment

by:raguram
ID: 1470465
I tried that also but didn't work
0
 

Expert Comment

by:Fantym
ID: 1470466
Are you trying to prevent the user from testing the screen saver while the settings are open?

0
 
LVL 3

Accepted Solution

by:
Michelt earned 100 total points
ID: 1470467
This is what I use in My Screen Saver. It works great. (the only difference is I got a Custom Properties form.

Sub Main()
    Dim StartType$
    xPixel = Screen.TwipsPerPixelX
    yPixel = Screen.TwipsPerPixelY
   
    StartType = UCase(Left$(Command, 2))
    If StartType = "" Then
        StartType = "/C"
    End If
    Select Case StartType
        Case "/C" ' Configuration
            Configuration.Show
        Case "/S" ' Regular Startup
            If CheckUnique("Screen Saver Main Form") = False Then
                Exit Sub
            End If
            MainForm.Show
        Case "/P" ' Properties (Treated as Configuration)
            Configuration.Show
    End Select
End Sub
Function CheckUnique%(FormCaption$) ' Because prev.instance sometimes doesn't work
    Dim HandleWin&
    HandleWin = FindWindow(vbNullString, FormCaption)
    If HandleWin = 0 Then
        CheckUnique = True
    Else
        CheckUnique = False
    End If
End Function
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question