Page 3 of 3 FirstFirst 123
Results 81 to 87 of 87

Thread: "This computer's going to sleep after 3 minutes"

  1. #81
    New Member
    Join Date
    Jan 2008
    Location
    South East England, UK
    Posts
    4

    Re: "This computer's going to sleep after 3 minutes"

    You can hide your application from the 'Windows Task Manager'
    by naming it with the 'hard space' character.

    Eg.
    File > Make <project>.exe.
    Then in the title box delete the name then
    press and hold down the left Alt key and type on the number pad 0160
    This has named it as chr(160)
    Repeat this for the Product Name as well if you wish.

    It will then be displayed as an icon with no name when you press Ctrl_Alt+Delete

    You can still save it as the old exe file name,
    so don't need to edit it's name in the registry or what ever loads it to the new file.

  2. #82

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: "This computer's going to sleep after 3 minutes"

    Quote Originally Posted by Mark Agius
    You can hide your application from the 'Windows Task Manager'
    by naming it with the 'hard space' character.
    ...
    It's nice to learn a new little trick...

    But I may have missed your point, I mean, it is not completely hidden after all. Anyone who would stop the process by ctrl/alt/del-ing is as likely to spot it when it comes as ".exe" as when it is called some other weird name. In both cases he/she may know/not know what is to be stopped.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  3. #83
    Junior Member
    Join Date
    Jun 2007
    Posts
    20

    Re: "This computer's going to sleep after 3 minutes"

    the most convincing exe name would be something with random letters...
    IE.... 'csrss.exe' or 'lsass.exe' or 'lkads.exe'... those are the scariest to 'stop'. cause some of them cause the system to shutdown if stopped.

    ... *Light bulb* ... find out which system process will shutdown the computer if stopped... then name your app the same as that. or maybe something slightly different. that way if someone tries to stop your app, they will have to play roulette and if they guess wrong, the comp shuts down anyways.

  4. #84
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    Greater Manchester, UK
    Posts
    476

    Re: "This computer's going to sleep after 3 minutes"

    It's easy if you think about it. I use one to stop my dad stayin on my pc for longer than he said. Only took two mins to make.

    set timer at 1 second interval, and have two labels. In the label2 caption the time you want your daughter to stop using the pc.

    Code:
    Private Sub Timer1_Timer()
    Label1 = Time
    If Label1 = Label2 Then
    Form2.Show
    End If
    End Sub
    my form2 basically covers the screen, i get out of it by using ctrl+alt+del but you could change the code so on form load it shutsdown the pc after 3mins

    Code:
    Private Declare Function 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) As Long
    
    Const SWP_NOSIZE = &H1
    Const SWP_NOMOVE = &H2
    Const SWP_SHOWWINDOW = &H40
    Const HWND_NOTOPMOST = -2
    Const HWND_TOPMOST = -1
    
    
    Private Sub Form_Load()
    Label2 = Form1.Label2
    End Sub
    
    Private Sub Timer1_Timer()
    Label2 = Time
    SetAlwaysOnTopMode Form2
    End Sub
    
    Sub SetAlwaysOnTopMode(hWndOrForm As Variant, Optional ByVal OnTop As Boolean = _
        True)
        Dim hWnd As Long
        ' get the hWnd of the form to be move on top
        If VarType(hWndOrForm) = vbLong Then
            hWnd = hWndOrForm
        Else
            hWnd = hWndOrForm.hWnd
        End If
        SetWindowPos hWnd, IIf(OnTop, HWND_TOPMOST, HWND_NOTOPMOST), 0, 0, 0, 0, _
            SWP_NOMOVE Or SWP_NOSIZE Or SWP_SHOWWINDOW
    End Sub
    If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.

    If you fail, try and try again, its the only way to success.

  5. #85

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: "This computer's going to sleep after 3 minutes"

    Also I think I once read about a possibility to disable ctrl/alt/del by code. Is this familiar to you guys?
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  6. #86
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: "This computer's going to sleep after 3 minutes"

    I had read somewhere that if you compile your exe with the name "Services.exe", it can not be end tasked.

    Give it a try

    Pradeep
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  7. #87

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: "This computer's going to sleep after 3 minutes"

    Quote Originally Posted by Pradeep1210
    I had read somewhere that if you compile your exe with the name "Services.exe", it can not be end tasked.

    Give it a try

    Pradeep
    You're quite right!
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Page 3 of 3 FirstFirst 123

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