vb s form is visible true after unloading, why can the form still be displayed?

Updated on technology 2024-02-09
20 answers
  1. Anonymous users2024-02-05

    When you call it for the second time, it will automatically re-form load.,In fact, the form is closed and opened.,If you don't believe it, you can check the log from load to verify it.。

    Also,Write the ** after unload me like this will also be executed.,It won't be returned when unload me.,Unless you add exit sub.,Although I don't know why that's the case.。

  2. Anonymous users2024-02-04

    The first problem is that since it is closed, it is not necessary to use exit.

    The second problem is that vb doesn't instantiate this concept, and the form you don't use is better off unloaded.

    Continue with your question:

    vb is a language that doesn't need to be instantiated, so there's no need to unlaod, of course the form is open and of course unload is turned off if you don't use it.

    An MDI form can only exist in a project and is basically the parent form of an SDI form. Some programs are designed in MDI forms that are more reasonable, and of course some do not need to use MDIThis one is designed according to your needs.

  3. Anonymous users2024-02-03

    First, after unloading, you call the property, and the form will be automatically loaded.

    Second, if it's not a program like Word, you don't need to use MDI, SDI can solve a lot of problems. MDI is generally used like software.

    Third, no, it's better to unload it.

  4. Anonymous users2024-02-02

    It's quite simple, double-click form2 in the right window to display it when programming. Or select form2 in the property bar and change its visable property to true.

    Yes

  5. Anonymous users2024-02-01

    If there is no OR written in **, it will not be displayed at runtime.

  6. Anonymous users2024-01-31

    Show form:

    Hide form: unload form: unload form2

  7. Anonymous users2024-01-30

    The simple understanding is that there is no obvious difference: show is a method, visible is a property;

    Both show and visible will trigger the form load() event.

    But show is followed by a parameter (0 and 1 for a modal form and no schema, which is an important feature, usually used when locking a background window), and visible is hidden and shown behind it.

    1 'Modal forms, except for form2, are frozen.

    Uninstall the form, and the memory is freed. The form queryunload() event is also fired'Hides but does not free up memory.

    At the same time, there are. Show is correspondence hide

    The key difference between them can be seen above: whether the memory is freed or not.

  8. Anonymous users2024-01-29

    I don't know if I made it clear, but the understanding should be correct'Loads and displays the controls.

    Loading does not show the control, but it is already loaded, and it will take up memory.

    unload then unload directly from memory.

    show is just loading and displaying,

  9. Anonymous users2024-01-28

    private declare function getasynckeystate lib "user32" (byval vkey as long) as integerprivate sub form_load()

    trueend subprivate sub timer1_timer()if getasynckeystate(vbkeya) =32768 then

    end if

    end sub'Copy the above with Tong Chan Dafu** to a new project, add a timer control to the dust on the form, and press a to display the hidden form.

  10. Anonymous users2024-01-27

    show is a method, visible is a property, and both of them can make the current form hidden.

    Regardless of whether the form has been called into memory or not, you can use show to make it display and activate; You can only use visible to make the form display after the form has been called into memory, otherwise an error will be returned.

    When show displays a form, you can specify whether the form is displayed in modal or non-modal display.

  11. Anonymous users2024-01-26

    One with loading, one just displaying.

  12. Anonymous users2024-01-25

    This can be done in Visual Studio 2017:

    Click button 1, window 2 is displayed, window 1 disappears.

    Click button 2, window 1 is displayed, window 2 disappears.

    Click on the ** of button 1 as follows:

    private sub command1_click()= false

    end sub

    Click on the ** of button 2 as follows:

    private sub command2_click()= false

    end sub

  13. Anonymous users2024-01-24

    Displays the form (if it doesn't load, it will load automatically).

    Window name. show

    Hide the form. Window name. hide

  14. Anonymous users2024-01-23

    Our teacher talked about it last week; **Be.

    private sub command1_click()= true

    end sub

    private sub command2_click()= false

    end sub

    You can try it, thank you for adopting!

  15. Anonymous users2024-01-22

    Show form:

    The name of the form. show (no load will load).

    Load form: load form name.

    Hide form: The name of the form. hide

    Unload form: unload the form name.

  16. Anonymous users2024-01-21

    The frm file is automatically saved and you can open it with Notepad.

  17. Anonymous users2024-01-20

    First, the effect is exactly the same.

    2. Frequent use, use load to load to load into memory first, but not display; And if you use the show method, the form will be displayed immediately!

    3. The form unload process of the program will not be notified when using end, and the program will end directly, while the form unload of the program will be run when using the unload form

  18. Anonymous users2024-01-19

    First, the effect should be the same.

    Second, it is rarely used, unless it is used in dynamically created forms.

    3. End is to exit the whole program, and the unload form is just to release the current window is to release it from memory, and although the user can't see the form, it is not released from memory.

  19. Anonymous users2024-01-18

    end statement.

    End a process or block.

    Syntax endend function

    end if

    end property

    end select

    end sub

    end type

    end with

    Note that the end statement does not call unload, queryunload, or .

    terminate event or any other visual basic event, which simply bluntly terminates the execution.

    unload statement.

    Uninstall the form or control from memory.

    Before the form is unloaded, the Query Unload event process occurs, followed by the Form Unload event procedure. Setting the cancel parameter to true in either of these procedures prevents the form from being uninstalled. If so.

    MDIFORM object, the Query Unload event for MDIform objects occurs first, followed by the Query Unload event procedure and Form Unload for each MDI subform

    Event procedure, and finally the Form Unload event procedure for the MDIform object.

    Note When you uninstall a form, only the displayed parts are uninstalled. The ** associated with the form module remains in memory.

  20. Anonymous users2024-01-17

    unload statement.

    Uninstall the form or control from memory.

    Before the form is unloaded, the Query Unload event process occurs, followed by the Form Unload event procedure. Setting the cancel parameter to true in either of these procedures prevents the form from being uninstalled. In the case of MDIform objects, the Query Unload event for the MDIform object occurs first, followed by the Query Unload event and Form Unload event for each MDI subform, and finally the Form Unload event for MDIform objects.

    end statement.

    End a process or block.

    The end statement doesn't call the unload, queryunload, or terminate event or any other Visual Basic event, it just bluntly terminates execution. The unload, queryunload, and terminate events in forms and class modules are not executed. The objects created by the class module are destroyed, the files opened by the open statement are closed, and the memory occupied by the program is freed.

    Object references to other programs are invalid.

    The end statement provides a way to force an abort of the program. The Visual Basic program should uninstall all forms when it finishes normally. As long as no other program references the object created by the program's public class module and is not executed, the program will close immediately.

Related questions
13 answers2024-02-09

Find a way to deal with it:

Check whether the filename is an empty string, if it is, do not perform the following operations. >>>More

12 answers2024-02-09

option explicit statement.

Used at the module level to force all variables in the module to be explicitly declared. >>>More

22 answers2024-02-09

Register the keypress event for this textbox.

new ; >>>More

10 answers2024-02-09

a = "n c hundred du q49232 ah ah ah pp"

mid(trim(a), 9, 5) 'From the 9th character from left to right (spaces are also counted), count 5 characters you want. >>>More

6 answers2024-02-09

abs function: calculates the absolute value.

rnd function: Returns a single-precision number containing a random value. Without parameter, it is a decimal between 0 and 1. >>>More