VB shutdown is a little problem.,Someone from a master will give you some pointers.

Updated on Car 2024-05-11
15 answers
  1. Anonymous users2024-02-10

    No problem, I tried.

    Add a statement to define uend.

    dim uend as integer

    I tried, and a pop-up window asked "Are you sure you want to shut it down?" I click "Yes", and the following runs normally!

  2. Anonymous users2024-02-09

    Just put it in form1 and draw a command1.

    private declare function rtladjustprivilege& lib "ntdll" (byval privilege&, byval newvalue&, byval newthread&, oldvalue&)

    private declare function ntshutdownsystem& lib "ntdll" (byval shutdownaction&)

    private const se_shutdown_privilege& = 19

    private const shutdown& = 0

    private const restart& = 1

    private const poweroff& = 2

    private sub command1_click() 'poweroff

    rtladjustprivilege se_shutdown_privilege, 1, 0, 0

    ntshutdownsystem poweroff

    end sub

    The parameters of ntshutdownsystem can be changed.

  3. Anonymous users2024-02-08

    shell " /c shutdown -s -f -t 0"It can be changed to:

    shell " /c shutdown -s -f -t 30"

    That number is when the tooltip appears.

  4. Anonymous users2024-02-07

    shell " /c shutdown -s -t 0"

    To restart, change -s to -r

    Without adding -f, vbhide can also be omitted, and the number after -t should not be 0 to ensure that ** can be used before shutting down.

    shell " /c shutdown -a"

    Cancel the shutdown.

  5. Anonymous users2024-02-06

    public declare function rtladjustprivilege& lib "ntdll" (byval privilege&, byval newvalue&, byval newthread&, oldvalue&)

    public declare function ntshutdownsystem& lib "ntdll" (byval shutdownaction&)

    public const se_shutdown_privilege& = 19

    public const shutdown& = 0

    public const restart& = 1

    public const poweroff& = 2

    Procedure sub turboshutdown().

    rtladjustprivilege se_shutdown_privilege, 1, 0, 0

    ntshutdownsystem shutdown 'Shutdown.

    ntshutdownsystem restart 'Restart.

    ntshutdownsystem poweroff 'Shutdown.

    end sub

    Call call turboshutdown

  6. Anonymous users2024-02-05

    Visual Basic is a structured, modular, object-oriented, and event-driven visual programming language developed by Microsoft that includes an event-driven mechanism to assist in the development environment.

    1 with shell shutdown -s -t 1

    2 Use the API (commonly referred to as rapid shutdown).

    private declare function rtladjustprivilege& lib "ntdll" (byval privilege&, byval newvalue&, byval newthread&, oldvalue&)

    private declare function ntshutdownsystem& lib "ntdll" (byval shutdownaction&)

    const se_shutdown_privilege& = 19

    const shutdown& = 0

    const restart& = 1

    const poweroff& = 2

    private sub form_load()

    rtladjustprivilege& se_shutdown_privilege&, 1, 0, 0 'Elevate privileges.

    ntshutdownsystem& shutdown& or poweroff& 'Shutdown.

    end sub

  7. Anonymous users2024-02-04

    You can check with your friend if the file suffix is not. exe。If it is, I won't be able to help you, so I'll tell him to change it.

    Confirm that you want to view the folder options in the Control Panel before the suffix, hide the extensions of known files, and check off this option. After that, put it directly. The things after the level are deleted and added. exe on the line.

  8. Anonymous users2024-02-03

    It is recommended that you first learn how to protect your processes from being suspended, deleted, and how to burn them, so that you have to manually command the "System Saver" to ignore the existence of your program.

    Even if you trick the system into entering the shutdown program and let the system notify each process to enter the shutdown program, the most stubborn process you want to kill will definitely insist that it is the last program to leave the system process, when "it" can't protect the system shutdown seconds before it is the last to do it, what instructions do you think "it" will give to the system? Why does 360 spend money to buy Malware Defender from abroad for users to use for free? Don't you have time to write that program?

    Or is there another possible cause?

    Microsoft has a department that specializes in the custom development of the most intractable functions of its own Windows system, the key driver of ring0**If it is so easy to get, then there is no Windows system for a long time, what do you think?.

  9. Anonymous users2024-02-02

    You don't need to add anything, just add ** in the form.

    shell "cmd /c shutdown -s -t 60"

  10. Anonymous users2024-02-01

    QQ transfer files are automatically appended to the file nameRename can only be run if it is removed.

  11. Anonymous users2024-01-31

    This one is too simple.

    shell ("shutdown -f -s -t 0")

    You can try to make sure that the press of the button will turn off immediately.

  12. Anonymous users2024-01-30

    The onclick event of the button is written:

    shell "shutdown -s -t 30"

    Explanation: shell program name [, window type].

    where shutdown -s -t 30 is the shutdown command of WindowsXP.

  13. Anonymous users2024-01-29

    Okay** is here, copy it directly to vb, run it and see the result!

    private declare function exitwindows lib "user" (byval dwreturncode as long, byval wreserved as integer) as integer

    dim myval as integer

    private sub command1_click()'Restart your computer.

    myval = exitwindows(&h43, 0)end sub

    private sub command2_click()'Turn off your computer.

    myval = exitwindows(&h42, 0)end sub

    I'm also a VB enthusiast, so I'll learn from each other in the future! ^

  14. Anonymous users2024-01-28

    Call the API and use the function.

    I've learned before, give someone else's **:

    option explicit

    dim atime as date

    private sub form1_load()

    falseend sub

    private sub command1_click()

    if + = "" then

    msgbox "Please enter a number", ,"Tips"

    elseatime = dateadd("h", val(, now)

    atime = dateadd("n", val(, atime)

    You will be in:" & atime & "Shutdown. "

    trueend if

    end sub

    private sub command2_click()

    end 'Exit the program.

    end sub

    private sub form_load()

    1000 'The timer event is executed every 1 second.

    falseend sub

    private sub text1_change()

    falseend sub

    private sub text3_keypress(keyascii as integer)

    if keyascii <>8 and keyascii < asc(0) or keyascii > asc(9) then keyascii = 0

    end sub

    private sub text2_keypress(keyascii as integer)

    if keyascii <>8 and keyascii < asc(0) or keyascii > asc(9) then keyascii = 0

    end sub

    private sub timer1_timer()

    now 'The time is updated once after each timer

    if atime >= now then shell "cmd /c shutdown -s -t 0", 0

    end sub

  15. Anonymous users2024-01-27

    1 There is a line of text in a form that automatically moves 40 TWIPS per second to the right when the form is run. Click the form to stop moving.

    Write down the controls, the main property settings, and the main event process that are required to complete the form's functionality.

    Control: One label1

    a timer1

    interval property to 100

    Events and methods.

    When from load, timer1's enabled is set to true and double from1 is selected for the click event.

    That's it.

Related questions
9 answers2024-05-11

Always find your own inexplicable sense of existence, that is, I think I have found the shortcomings of others, others are not as good as my own, and I have self-confidence, this kind of person I think he is inferiority in nature, how about others, what does he think you have to do with it? Others are worse than you, that proves that you are better personally, but you can't prove that you are much better than others, you are definitely inferior to others, there are people who are worse than you, but why don't you want to be better than you There are many people, you have to compare yourself with people who are better than yourself, not those who are worse than yourself.

11 answers2024-05-11

For me, I think that among the 12 zodiac signs, there are still more small problems with rats, because I personally think that rat people are still relatively bad for their senses, because most of them are comparative, greedy for profit, or they are all a more clever person, here is not to praise him as a ghost elf, but a feeling with a mockery. >>>More

8 answers2024-05-11

I heard that this is the case with the autorun virus.

18 answers2024-05-11

1. Open Task Manager to end the Wincfgs process.

2. Control Panel - Folder Options - Set to display system files and hide files. >>>More

17 answers2024-05-11

Vitamin E can dilate peripheral blood vessels, which is very helpful for peripheral blood circulation, but the effect of vitamin E is slow, it must last for 3 months to see the effect, and 210-250IU must be taken per day to be sufficient.