Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 149
  • Last Modified:

Screen Saver Setting Option

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
raguram
Asked:
raguram
1 Solution
 
FoyalCommented:
did you try calling the settings form as vbModal? (I don't even know if it can be... just a thought)
0
 
raguramAuthor Commented:
I tried that also but didn't work
0
 
FantymCommented:
Are you trying to prevent the user from testing the screen saver while the settings are open?

0
 
MicheltCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now