Results 1 to 2 of 2

Thread: Start button and screen saver help needed...

  1. #1

    Thread Starter
    Hyperactive Member zer0_flaw's Avatar
    Join Date
    Apr 2001
    Posts
    448

    Question Start button and screen saver help needed...

    Alright, I have 2 questions for you all:

    1) I want to make it so when my program loads the window's start button is unuseable. I mean I want it so the user can't click it... How can I go about doing that?

    2) I want it so the screen saver will not go on while my program is on. How can I do that?

    Thanks for help in advance. Later,

    -zer0 flaw

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    VB Code:
    1. Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    2. Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
    3. Public Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long
    4.  
    5.  
    6. Private Sub Form_Load()
    7. Dim h As Long
    8. h = FindWindowEx(FindWindow("SHell_TRAYWND", vbNullString), ByVal 0&, "BUtton", vbNullString)
    9. EnableWindow h, 0
    10. End Sub
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width