Results 1 to 12 of 12

Thread: Cool Effect

  1. #1

    Thread Starter
    Junior Member hellilyntax's Avatar
    Join Date
    Jun 2006
    Location
    Kedah, Malaysia
    Posts
    28

    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 )

  2. #2
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Cool Effect

    Why do you want to freeze all running programs?


    Also to make your screen go dark, you can use

    VB Code:
    1. 'Example by Florian Brucker ([email protected])
    2. '
    3. 'Paste this code into a form of a new project
    4. 'You better don't close this via the
    5. 'stop-button of the ide but the x-button of
    6. 'the form.
    7. Option Explicit
    8. Private Ramp1(0 To 255, 0 To 2) As Integer
    9. Private Ramp2(0 To 255, 0 To 2) As Integer
    10. Private Declare Function GetDeviceGammaRamp Lib "gdi32" (ByVal hdc As Long, lpv As Any) As Long
    11. Private Declare Function SetDeviceGammaRamp Lib "gdi32" (ByVal hdc As Long, lpv As Any) As Long
    12. Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
    13. Private Sub Form_Load()
    14.    '----------------------------------------------------------------
    15.    Dim iCtr       As Integer
    16.    Dim lVal       As Long
    17.    '----------------------------------------------------------------
    18.    GetDeviceGammaRamp Me.hdc, Ramp1(0, 0)
    19.       For iCtr = 0 To 255
    20.          lVal = Int2Lng(Ramp1(iCtr, 0))
    21.          Ramp2(iCtr, 0) = Lng2Int(Int2Lng(Ramp1(iCtr, 0)) / 2)
    22.          'Die folgenden Zeilen für ROT auskommentieren:
    23.          Ramp2(iCtr, 1) = Lng2Int(Int2Lng(Ramp1(iCtr, 1)) / 2)
    24.          Ramp2(iCtr, 2) = Lng2Int(Int2Lng(Ramp1(iCtr, 2)) / 2)
    25.       Next iCtr
    26.    SetDeviceGammaRamp Me.hdc, Ramp2(0, 0)
    27.    '----------------------------------------------------------------
    28. End Sub
    29. Private Sub Form_Unload(Cancel As Integer)
    30.    '----------------------------------------------------------------
    31.    SetDeviceGammaRamp Me.hdc, Ramp1(0, 0)
    32.    '----------------------------------------------------------------
    33. End Sub
    34. Public Function Int2Lng(IntVal As Integer) As Long
    35.    '----------------------------------------------------------------
    36.    CopyMemory Int2Lng, IntVal, 2
    37.    '----------------------------------------------------------------
    38. End Function
    39. Public Function Lng2Int(Value As Long) As Integer
    40.    '----------------------------------------------------------------
    41.    CopyMemory Lng2Int, Value, 2
    42.    '----------------------------------------------------------------
    43. End Function
    From ApiGuide

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  4. #4

    Thread Starter
    Junior Member hellilyntax's Avatar
    Join Date
    Jun 2006
    Location
    Kedah, Malaysia
    Posts
    28

    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.

  5. #5
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Re: Cool Effect

    There is no need to do that unless you're writing a virus.

  6. #6

    Thread Starter
    Junior Member hellilyntax's Avatar
    Join Date
    Jun 2006
    Location
    Kedah, Malaysia
    Posts
    28

    Re: Cool Effect

    hehe...ill work on this effect first...

  7. #7

  8. #8
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Cool Effect

    Quote 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

  9. #9
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    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...

  10. #10
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Cool Effect

    Quote Originally Posted by CVMichael
    So, all programs continue working in the backgound...
    During the logoff/shutdown screen yes, but not during the logon screen.

  11. #11

    Thread Starter
    Junior Member hellilyntax's Avatar
    Join Date
    Jun 2006
    Location
    Kedah, Malaysia
    Posts
    28

    Re: Cool Effect

    mr admin,
    im innocent...

  12. #12

    Thread Starter
    Junior Member hellilyntax's Avatar
    Join Date
    Jun 2006
    Location
    Kedah, Malaysia
    Posts
    28

    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
  •  



Click Here to Expand Forum to Full Width