|
-
Aug 2nd, 2006, 02:55 AM
#1
Thread Starter
Junior Member
Cool Effect
hi guys,
how do i freeze all running application on my pc when my app run?
and how to add cool effect like when windows logout screen, all background turn grey...(like this site also...really cool...hehe )
-
Aug 2nd, 2006, 03:04 AM
#2
Re: Cool Effect
Why do you want to freeze all running programs?
Also to make your screen go dark, you can use
VB Code:
'
'Paste this code into a form of a new project
'You better don't close this via the
'stop-button of the ide but the x-button of
'the form.
Option Explicit
Private Ramp1(0 To 255, 0 To 2) As Integer
Private Ramp2(0 To 255, 0 To 2) As Integer
Private Declare Function GetDeviceGammaRamp Lib "gdi32" (ByVal hdc As Long, lpv As Any) As Long
Private Declare Function SetDeviceGammaRamp Lib "gdi32" (ByVal hdc As Long, lpv As Any) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Sub Form_Load()
'----------------------------------------------------------------
Dim iCtr As Integer
Dim lVal As Long
'----------------------------------------------------------------
GetDeviceGammaRamp Me.hdc, Ramp1(0, 0)
For iCtr = 0 To 255
lVal = Int2Lng(Ramp1(iCtr, 0))
Ramp2(iCtr, 0) = Lng2Int(Int2Lng(Ramp1(iCtr, 0)) / 2)
'Die folgenden Zeilen für ROT auskommentieren:
Ramp2(iCtr, 1) = Lng2Int(Int2Lng(Ramp1(iCtr, 1)) / 2)
Ramp2(iCtr, 2) = Lng2Int(Int2Lng(Ramp1(iCtr, 2)) / 2)
Next iCtr
SetDeviceGammaRamp Me.hdc, Ramp2(0, 0)
'----------------------------------------------------------------
End Sub
Private Sub Form_Unload(Cancel As Integer)
'----------------------------------------------------------------
SetDeviceGammaRamp Me.hdc, Ramp1(0, 0)
'----------------------------------------------------------------
End Sub
Public Function Int2Lng(IntVal As Integer) As Long
'----------------------------------------------------------------
CopyMemory Int2Lng, IntVal, 2
'----------------------------------------------------------------
End Function
Public Function Lng2Int(Value As Long) As Integer
'----------------------------------------------------------------
CopyMemory Lng2Int, Value, 2
'----------------------------------------------------------------
End Function
From ApiGuide
-
Aug 2nd, 2006, 03:31 AM
#3
Re: Cool Effect
Trying to "freeze" all the running apps can cause problems. Why do you need it to do that?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 3rd, 2006, 02:37 AM
#4
Thread Starter
Junior Member
Re: Cool Effect
just want to save cpu usage for my app...
is it necessary....just stupid idea..hehe
thanks anyway for the codes....
Last edited by hellilyntax; Aug 3rd, 2006 at 02:47 AM.
-
Aug 3rd, 2006, 03:24 AM
#5
Frenzied Member
Re: Cool Effect
There is no need to do that unless you're writing a virus.
-
Aug 3rd, 2006, 11:25 AM
#6
Thread Starter
Junior Member
Re: Cool Effect
hehe...ill work on this effect first...
-
Aug 3rd, 2006, 03:43 PM
#7
Re: Cool Effect
Please note that if we get the idea that you are writing a virus you will be banned from our forums.
-
Aug 3rd, 2006, 04:43 PM
#8
Re: Cool Effect
 Originally Posted by hellilyntax
how do i freeze all running application on my pc when my app run?
You don't!
If you would freeze all other running processes, you would freeze Windows! If you only want to run one process at the time may I suggest installing DOS 6.0
-
Aug 3rd, 2006, 06:23 PM
#9
Re: Cool Effect
Actually... when windows shows that grey screen...
It basically takes a print screen, then it makes a full screen window, with the picture taken before, and it fades that picture until it's grey.
You can test that by simply having a program that moves something in it's window, like text moving horizontally, when you are about to log off, you will see that the backgound freeses, and when you cancel the log off, you will see the text moved a lot (where it should be if you have not used the log off).
So, all programs continue working in the backgound...
-
Aug 3rd, 2006, 06:28 PM
#10
Re: Cool Effect
 Originally Posted by CVMichael
So, all programs continue working in the backgound...
During the logoff/shutdown screen yes, but not during the logon screen.
-
Aug 4th, 2006, 02:02 AM
#11
Thread Starter
Junior Member
-
Aug 6th, 2006, 01:37 AM
#12
Thread Starter
Junior Member
Re: Cool Effect
CV,
do you have codes that fades the images?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|