Hola para el efecto de vista si podrias usar SetLayeredWindowAttributes pero para el de apagado del xp te paso un metodo convirtiendo la pantalla a escala de grices.
Agrega a un formulario: Timer1, Picture1, Command1
Option Explicit
'*-------------------------------------*
'Autor: Leandro Ascierto
'web: www.leandroascierto.com.ar
'Date: 13/01/2009
'Referncia ApiGuide
'Requimientos Timer1, Picture1, Command1
'*-------------------------------------*
Private Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function CreateDIBSection Lib "gdi32" (ByVal hdc As Long, pBitmapInfo As BITMAPINFO, ByVal un As Long, ByVal lplpVoid As Long, ByVal handle As Long, ByVal dw As Long) As Long
Private Declare Function GetDIBits Lib "gdi32" (ByVal aHDC As Long, ByVal hBitmap As Long, ByVal nStartScan As Long, ByVal nNumScans As Long, lpBits As Any, lpBI As BITMAPINFO, ByVal wUsage As Long) As Long
Private Declare Function SetDIBitsToDevice Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, ByVal dx As Long, ByVal dy As Long, ByVal SrcX As Long, ByVal SrcY As Long, ByVal Scan As Long, ByVal NumScans As Long, Bits As Any, BitsInfo As BITMAPINFO, ByVal wUsage As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Declare Function GetDC Lib "User32" (ByVal hWnd As Long) As Long
Private Declare Sub SetWindowPos Lib "User32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
Private Type BITMAPINFOHEADER
biSize As Long
biWidth As Long
biHeight As Long
biPlanes As Integer
biBitCount As Integer
biCompression As Long
biSizeImage As Long
biXPelsPerMeter As Long
biYPelsPerMeter As Long
biClrUsed As Long
biClrImportant As Long
End Type
Private Type RGBQUAD
rgbBlue As Byte
rgbGreen As Byte
rgbRed As Byte
rgbReserved As Byte
End Type
Private Type BITMAPINFO
bmiHeader As BITMAPINFOHEADER
bmiColors As RGBQUAD
End Type
Private Const BI_RGB = 0&
Private Const DIB_RGB_COLORS = 0
Private Const HWND_TOPMOST As Long = -1
Private Const SWP_NOACTIVATE As Long = &H10
Private Const SWP_SHOWWINDOW As Long = &H40
Private bi24BitInfo As BITMAPINFO
Private hBitmap As Long
Private lHdc As Long
Private bBytes() As Byte
Dim lCunter As Long
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim TempDC As Long
Me.BorderStyle = 0
Me.Caption = ""
Me.WindowState = vbMaximized
Me.AutoRedraw = True
Command1.Caption = "Cancelar"
TempDC = GetDC(0)
With bi24BitInfo.bmiHeader
.biBitCount = 24
.biCompression = BI_RGB
.biPlanes = 1
.biSize = Len(bi24BitInfo.bmiHeader)
.biWidth = Screen.Width / Screen.TwipsPerPixelX
.biHeight = Screen.Height / Screen.TwipsPerPixelY
End With
ReDim bBytes(1 To bi24BitInfo.bmiHeader.biWidth * bi24BitInfo.bmiHeader.biHeight * 3) As Byte
lHdc = CreateCompatibleDC(0)
hBitmap = CreateDIBSection(lHdc, bi24BitInfo, DIB_RGB_COLORS, ByVal 0&, ByVal 0&, ByVal 0&)
SelectObject lHdc, hBitmap
BitBlt lHdc, 0, 0, bi24BitInfo.bmiHeader.biWidth, bi24BitInfo.bmiHeader.biHeight, GetDC(0), 0, 0, vbSrcCopy
GetDIBits lHdc, hBitmap, 0, bi24BitInfo.bmiHeader.biHeight, bBytes(1), bi24BitInfo, DIB_RGB_COLORS
BitBlt Me.hdc, 0, 0, bi24BitInfo.bmiHeader.biWidth, bi24BitInfo.bmiHeader.biHeight, TempDC, 0, 0, vbSrcCopy
SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, bi24BitInfo.bmiHeader.biWidth, bi24BitInfo.bmiHeader.biHeight, SWP_NOACTIVATE Or SWP_SHOWWINDOW
Picture1.Move (Me.ScaleWidth / 2) - (Picture1.ScaleWidth / 2), (Me.ScaleHeight / 2) - (Picture1.ScaleHeight / 2)
lCunter = 0
Timer1.Interval = 150
DeleteDC TempDC
End Sub
Private Sub Form_Unload(Cancel As Integer)
DeleteDC lHdc
DeleteObject hBitmap
End Sub
Private Sub Timer1_Timer()
Dim Cnt As Long, lGray As Long
Dim lR As Long, lG As Long, lB As Long
lCunter = lCunter + 1
If lCunter > 60 < 65 Then
For Cnt = LBound(bBytes) To UBound(bBytes) - 3 Step 3
lB = bBytes(Cnt)
lG = bBytes(Cnt + 1)
lR = bBytes(Cnt + 2)
lGray = (222 * lR + 707 * lG + 71 * lB) / 1000
bBytes(Cnt) = (lB * 4 + lGray) / 5
bBytes(Cnt + 1) = (lG * 4 + lGray) / 5
bBytes(Cnt + 2) = (lR * 4 + lGray) / 5
Next Cnt
SetDIBitsToDevice Me.hdc, 0, 0, bi24BitInfo.bmiHeader.biWidth, bi24BitInfo.bmiHeader.biHeight, 0, 0, 0, _
bi24BitInfo.bmiHeader.biHeight, bBytes(1), bi24BitInfo, DIB_RGB_COLORS
Me.Refresh
End If
If lCunter = 71 Then Timer1.Interval = 0
End Sub
Saludos.