Results 1 to 6 of 6

Thread: [RESOLVED] [WindowsXP or Seven] - why my laplop screen don't turn off?

  1. #1
    PowerPoster joaquim's Avatar
    Join Date
    Apr 07
    Posts
    2,494

    Resolved [RESOLVED] [WindowsXP or Seven] - why my laplop screen don't turn off?

    i said windows xp or Seven, because is where i found the bug(on both windows).
    i change, on energy options, for my screen(on my laplop) turn off. from begin(after install windows.. maybe 1 month) the screen turned off, but now isn't
    can anyone explain to me how can i resolve these?
    VB6 2D Sprite control

    To live is difficult, but we do it.

  2. #2
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 01
    Location
    Adelaide, Australia
    Posts
    9,718

    Re: [WindowsXP or Seven] - why my laplop screen don't turn off?

    What brand of laptop is it?
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  3. #3
    PowerPoster joaquim's Avatar
    Join Date
    Apr 07
    Posts
    2,494

    Re: [WindowsXP or Seven] - why my laplop screen don't turn off?

    Quote Originally Posted by Nightwalker83 View Post
    What brand of laptop is it?
    sorry... what means 'brand'?
    i don't know why, but now works. i only build a program, on VB6, for turn off the screen. but by some reason resolve, i belive, the system bug.
    but why these bug happens?
    VB6 2D Sprite control

    To live is difficult, but we do it.

  4. #4
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 01
    Location
    Adelaide, Australia
    Posts
    9,718

    Re: [WindowsXP or Seven] - why my laplop screen don't turn off?

    Quote Originally Posted by joaquim View Post
    sorry... what means 'brand'?
    Who makes the laptop but other than that what model is it?
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  5. #5
    PowerPoster joaquim's Avatar
    Join Date
    Apr 07
    Posts
    2,494

    Re: [WindowsXP or Seven] - why my laplop screen don't turn off?

    HP Compaq Presario CQ60-155EP
    but was a system bug, now seems fixed.
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  6. #6
    PowerPoster joaquim's Avatar
    Join Date
    Apr 07
    Posts
    2,494

    Re: [WindowsXP or Seven] - why my laplop screen don't turn off?

    i don't have sure how i fix the bug, but seems that my program resulve it
    i wanted a program for turn off the screen after sometime. then i look for some code and i update it:
    Code:
    Option Explicit
    
    
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Any) As Long
    
    Const SC_MONITORPOWER = &HF170&
    Const MON_OFF = 2&
    Const WM_SYSCOMMAND = &H112
    
    
    Private Sub procTurnOff()
    
      SendMessage Me.hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, MON_OFF
    
    End Sub
    
    Private Sub Command1_Click()
        Timer1.Enabled = False
    End Sub
    
    Private Sub Command2_Click()
        Timer1.Enabled = True
    End Sub
    
    Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
        If KeyCode = vbKeyS And Shift = vbCtrlMask Then
            Timer1.Enabled = False
        End If
    End Sub
    
    Private Sub Timer1_Timer()
        Call procTurnOff
    End Sub
    after use 1 or 3 times, i notice that the bug was resolved.
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

Posting Permissions

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