473,395 Members | 1,986 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Blank Screen after resume

Hi,

I do have the following issue.
I put the pc into standby mode (s3) and the windows xp taskscheduler wakes my computer up again.
But the monitor still stays blank as long as I don't move my mouse.
So I thought that I could get the screen back when I use this code:

Expand|Select|Wrap|Line Numbers
  1. Public Structure POINTAPI
  2. Dim x As Integer
  3. Dim y As Integer
  4. End Structure
  5. Private Declare Function GetCursorPos Lib "user32" (ByRef lpPoint As POINTAPI) As Integer
  6. Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
  7.  
  8. Dim Pt As New POINTAPI
  9. GetCursorPos(Pt)
  10. SetCursorPos(Pt.x, Pt.y)
This didn't work.
I also tried SendMessage/PostMessage. This didn't work either.

<System.Runtime.InteropServices.DllImport("user32. DLL")> _
Private Shared Function SendMessage( _
ByVal hWnd As Integer, ByVal wMsg As Integer, _
ByVal wParam As Integer, ByVal lParam As Integer _
) As Integer
End Function
<System.Runtime.InteropServices.DllImport("user32. dll")> _
Private Shared Function GetForegroundWindow() As System.IntPtr
End Function
<STAThread()> _
Private Sub MonitorOn()

Const MONITOR_ON As Integer = -1
Const MONITOR_OFF As Integer = 2
Const WM_SYSCOMMAND As Integer = 274
Const SC_MONITORPOWER As Integer = 61808
Const HWND_TOPMOST As Integer = -1
System.Threading.Thread.Sleep(5000)

SendMessage(GetForegroundWindow, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_ON)

End Sub

Does anybody know a solution?

Thanks!

--------------------------------
From: Stefan

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>RNkTY4YrHEuoaNFHC0zI6Q==</Id>
Jul 21 '05 #1
0 1011

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: charlie_M | last post by:
Is there a way to blank the screen in a FORM's onsubmit=... to blank the screen for the user?? I asked this before and got a way to blank a table by id with ...
5
by: Tom | last post by:
How can I find the first blank control on a form by looking at the controls in the order of their tab order? Thanks! Tom
0
by: Stefan via .NET 247 | last post by:
Hi, I do have the following issue. I put the pc into standby mode (s3) and the windows xp taskscheduler wakes my computer up again. But the monitor still stays blank as long as I don't move my...
2
by: Parasyke | last post by:
I have an email Sub set up that works fine except upon a successful send I get a blank message box with just an OK button. How can I change this to read something different? I have no event handler...
2
by: Eric | last post by:
We have a page that displays a datagrid with quite a bit of data in it. We have a few comb-boxes that we filter data on when we click the search button. I can change the combo-boxes and click the...
1
by: Raul Elms | last post by:
Hi, I'm running Apache2 together with the php and mysql modules on an opensuse 10.1 machine. Most scripts run well, I can connect and query databases without any problems. But some well known...
1
by: dr1ft3r | last post by:
I, like many others, hate IE simply because it doesn't go along with standard and bothers every site anybody attempted to make in the history of the web. I've checked this site in FF, NS, and Opera...
1
by: Rajtomar | last post by:
i have small gaem which pick a word randomly from a list of 100 four letterd words and asks user to guess it, when user inputs it, program compares the inputted word with the randomly picked word...
2
by: Lawrence Krubner | last post by:
Imagine a template system that works by getting a file, as a string, and then putting it through eval(), something like this: $formAsString = $controller->command("readFileAndReturnString",...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.