I have sorted out the standby problems, but whenever I put my computer into standby, the TV automatically goes into a standby mode (orange light as opposed to the red light when manually switched off), but the screen doesn't come back on when I resume from standby and I have to switch it on manually.
Is there anyway to get around this?
No, provided you are using an MCE Remote (as it has 2 plugin cables to blast signals to 2 external devices).Do I need to setup one of those IR blasters or something or do I need no extra hardware?
I tried that tool, but when waking up from standby using the remote, the same remote doesn't work anymore. [I'm using X10 model]Hi Cheetah05,
1) Simply put, your system has to be 'enabled' to allow your USB remote to wake up the system. The simplest way to do this is with this freeware tool:
http://www.xs4all.nl/~hveijk/mst/indexe.htm
Very cool It fixes some of XP's quirks with Standby functionality to!
Yes you do. You only need to put the end of the wire over the reciever on the TV so with some tape or something you may be able to hide most of the wire behind the TV(?)So I have to plug one of those and point it at the TV?
I will use that as a last resort, because I don't want the ugly wire sticking out to be honest.
I don't think so. It's probably just a 'feature' of the X10 driver. Mayber you could kill the remote on suspend and restart it on resume?Am I doing something wrong?
#Region "Imports"
Imports Microsoft.Win32
#End Region
Public Class mainForm
#Region "Change Resolution Function"
Const CCDEVICENAME As Short = 32
Const CCFORMNAME As Short = 32
Const DM_BITSPERPEL As Integer = &H40000
Const DM_PELSWIDTH As Integer = &H80000
Const DM_PELSHEIGHT As Integer = &H100000
Const CDS_UPDATEREGISTRY As Short = &H1S
Const CDS_TEST As Short = &H4S
Const DISP_CHANGE_SUCCESSFUL As Short = 0
Const DISP_CHANGE_RESTART As Short = 1
Const BITSPIXEL As Short = 12
Private Structure DEVMODE
<VBFixedString(CCDEVICENAME), System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=CCDEVICENAME)> Public dmDeviceName As String
Dim dmSpecVersion As Short
Dim dmDriverVersion As Short
Dim dmSize As Short
Dim dmDriverExtra As Short
Dim dmFields As Integer
Dim dmOrientation As Short
Dim dmPaperSize As Short
Dim dmPaperLength As Short
Dim dmPaperWidth As Short
Dim dmScale As Short
Dim dmCopies As Short
Dim dmDefaultSource As Short
Dim dmPrintQuality As Short
Dim dmColor As Short
Dim dmDuplex As Short
Dim dmYResolution As Short
Dim dmTTOption As Short
Dim dmCollate As Short
<VBFixedString(CCFORMNAME), System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=CCFORMNAME)> Public dmFormName As String
Dim dmUnusedPadding As Short
Dim dmBitsPerPel As Short
Dim dmPelsWidth As Integer
Dim dmPelsHeight As Integer
Dim dmDisplayFlags As Integer
Dim dmDisplayFrequency As Integer
End Structure
Private Declare Function EnumDisplaySettings Lib "user32" Alias "EnumDisplaySettingsA" (ByVal lpszDeviceName As Integer, ByVal iModeNum As Integer, ByRef lpDevMode As DEVMODE) As Boolean
Private Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" (ByRef lpDevMode As DEVMODE, ByVal dwFlags As Integer) As Integer
Private Sub ChangeRes(ByRef X As Integer, ByRef Y As Integer, ByRef Bits As Integer)
Dim DevM As DEVMODE = Nothing
Dim erg As Integer
'Get the info into DevM
erg = EnumDisplaySettings(0, 0, DevM)
'This is what we're going to change
DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT Or DM_BITSPERPEL
DevM.dmPelsWidth = X 'ScreenWidth
DevM.dmPelsHeight = Y 'ScreenHeight
DevM.dmBitsPerPel = Bits '(can be 8, 16, 24, 32 or even 4)
'Now change the display and check if possible
erg = ChangeDisplaySettings(DevM, CDS_TEST)
End Sub
#End Region
#Region "Declarations"
Dim WithEvents systemEvent As SystemEvents
#End Region
Private Sub On_Standby_Resume(ByVal sender As Object, ByVal e As Microsoft.Win32.PowerModeChangedEventArgs) Handles systemEvent.PowerModeChanged
If e.Mode = PowerModes.Resume Then
ChangeRes(1280, 768, 32)
ChangeRes(1360, 768, 32)
End If
End Sub
End Class