VB How to remove the X on the Form, i.e. the close button!

Updated on technology 2024-02-28
17 answers
  1. Anonymous users2024-02-06

    form's controlbox property is set to false (note: the form's icon is also removed.) )

  2. Anonymous users2024-02-05

    Set the controlbox property to false in the form properties window.

    controlbox property, which returns or sets a value that indicates whether to control whether the menu box is displayed in the form at runtime. Read-only at runtime.

    Set the borderstyle property to 0 in the Form Properties window so that the form has no borders or border-related elements.

    Use the cancel = -1 statement in the form's unload event to invalidate the close button.

    private sub form_unload(cancel as integer)

    cancel = -1 'or cancel = true

    end sub

  3. Anonymous users2024-02-04

    In the Properties window, switch to the form's property settings and select in the borderstyle option.

    0-none can delete that nasty little button, but the entire title bar is gone!

  4. Anonymous users2024-02-03

    You can't remove the button in VB, if you remove it, how do you turn it off!

  5. Anonymous users2024-02-02

    You can make him unable to turn it off.

    private sub form_unload(cancel as integer)

    cancel = 1

    end sub

    It is also possible to let him hide,

  6. Anonymous users2024-02-01

    Write the following **if msgbox( in the event form unload"Are you sure you want to quit? ",vbyesno)=vbyes then

    endelse

    cancel=1

    endif

  7. Anonymous users2024-01-31

    private sub form_unload(cancel as integer)

    Add here the ** that needs to be performed when closing the window.

    end sub

  8. Anonymous users2024-01-30

    is the unload event, for example:

    private sub form_unload(cancel as integer)

    if msgbox("Are you sure you want to quit? ", vbyesno) = vbno then cancel = 1

    end sub

  9. Anonymous users2024-01-29

    The form control option is set to false, which is to get rid of the properties of the maximum and minimized button forms, borderstyle is set to 1, 3, 4, 5, you can also disable the largest button to false, maxbutton to false, disable the smallest button minbutton

  10. Anonymous users2024-01-28

    maximizabox = false.Remove the maximum.

    controlbox = false.Remove all control buttons.

    You probably have to borrow an API function for this.

  11. Anonymous users2024-01-27

    The border is set to none, and then the self-draw minimizes button.

  12. Anonymous users2024-01-26

    1. Do you want to put a button on the form to close the form?

    To do this, double-click on the form button to go to the page.

    Type **:unload me

  13. Anonymous users2024-01-25

    1. First of all, open the VB software and add a ** box on the form, as shown in the figure below.

    2. In the properties window, set the properties and name of the ** box, and click the "picture" attribute to insert it arbitrarily.

    3. Add two command buttons above the form, as shown in the following figure.

    4. Set the properties of the command button.

    <>6. Double-click the "Reset" command button, and assume that the value of its original position is 360.

    7. Run the program, and the display button appears.

  14. Anonymous users2024-01-24

    1. Click Form (to make the form selected).

    2. In the "Properties" column on the right, set:

    1) controlbox = true (true means show the close button, false means hide).

    Extension: 2), maxbutton = false (false for hidden maximization, true for display).

    3) minbutton = false (flase stands for hidden minimization, true stands for display).

    4) borderstyle = 1 - fixed (means that the size of the form cannot be changed by pulling).

  15. Anonymous users2024-01-23

    I had a very clumsy but practical development experience for this aspect of design.

    With two time controls, the first time control, the closing button is triggered, and the closing button is no longer available.

    The second time control is forward to disabling the first time control. However, the initial value of the second time control is not available, and you have to write the available commands for the second time control on one of the button events, so that the button becomes the switch that disables the turn off button on your switch.

    I realized this idea and used it a lot in my later VB development.

  16. Anonymous users2024-01-22

    Can't you change it in the form properties?

  17. Anonymous users2024-01-21

    Don't forget to give points! I don't have any points!

    Don't forget to give points!

    private sub form_unload(cancel as integer)

    cancel = true

    end sub

Related questions
12 answers2024-02-28

It is easier to regain the shine of the coin by pre-applying a little toothpaste to the surface of the coin and washing it in warm water. >>>More

9 answers2024-02-28

1.Soak in boiling water.

Usually, if you want to remove the skin of the walnut kernels and get the white flesh inside, the best way is to soak the walnut kernels in boiling water. When soaking, you can release the amount of salt. The soaking time should be between 1 and 2 hours. >>>More

16 answers2024-02-28

Drink stains on black clothes, removed with the following methods: >>>More

7 answers2024-02-28

1) Soak the clothes in rice washing water overnight, and then scrub them as usual to remove the mildew. (2) Brush with a soft brush first, and then wipe with alcohol to remove mildew. (3) Brush repeatedly with thick soapy water to remove mildew. >>>More

8 answers2024-02-28

Carpet cleaning If the carpet is stained with blue ink or ink, rub it immediately with rice grains, and then wash it with a neutral detergent, such as a laundry detergent solution. >>>More