January 21, 2021
Hot Topics:

Quickstart Guide to Screensavers

  • By Karl Moore
  • Send Email »
  • More Articles »

Your screensaver needs to handle passwords. This section will deal with allowing the user to change their password. We will later look at prompting the user for a password, plus verifying its authenticity.

Changing the Password

  • Add the following code to a module in your screensaver application:
Declare Function PwdChangePassword& Lib "mpr" _    Alias "PwdChangePasswordA" (ByVal lpcRegkeyname$, _    ByVal hwnd&, ByVal uiReserved1&, ByVal uiReserved2&)        Public Sub ChangePassword()    Dim dispHWND As Long    ' Get handle of the Display Properties window    dispHWND = CLng(Right(Command, Len(Command) - 3))        ' Call the change password screen    Call PwdChangePassword("SCRSAVE", dispHWND, 0, 0)End Sub
  • When a password change is requested (see Determining the Mode), run the ChangePassword method

Page 5 of 8

This article was originally published on November 20, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date