• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 138
  • Last Modified:

VB5 Screen Saver Password and Settings Access

How do you access or write a settings dialog box for a screensaver written in VB5. Is there an api function for this and if not how do I write the code to make the dialog box appear when the 'Settings' button is pressed in the Desktop 'Properties' dialog box.
1 Solution
Put this in the main form of your screen saver:

Private Sub Form_Load()

  Dim Provider As String
  Select Case UCase(Left(Command, 2))
        Case "/A"
                 Provider = "SCRSAVE" & Chr(0)
                 Call PwdChangePassword(Provider, Main_Form.hWnd, 0)
        Case "/P"
                 Unload Me
                 Exit Sub
        Case "/C"
                         frmSetup.Show 1
                         Exit Sub
        Case "/S"
  End Select
  InCleanExit = False
End Sub

the /C passed means the user hit the setup button so you need to display your setup form.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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