C, a method that calls two form classes A and B, how to make A end and then call B urgent!! )

Updated on technology 2024-02-08
19 answers
  1. Anonymous users2024-02-05

    Write in the click of button1; Then write using system in the main function;

    using ;

    using ;

    using ;

    namespace xx

    static class program

    The main entry point to the application.

    stathread]

    static void main();

    aform aform = new aform();

    if ( openfiledialog ()

  2. Anonymous users2024-02-04

    new openfiledialog() put it in aform, you can handle the event after **, don't put it in click...

  3. Anonymous users2024-02-03

    It's a bit of a mess.

    If you open B after Aform is closed, you can open B in the closing event function of Aform.

  4. Anonymous users2024-02-02

    Add a dialogresult=;

    Then the click event is changed to the following;

    if ( ==dialogresult .ok )new openfiledialog();

  5. Anonymous users2024-02-01

    There's a way to try.

    Define this method as public

    Define a private member for form four, which is a form one object: form1 frm1;

    Add a parameter to the constructor of form four, which is an example of form one.

    public form4(from1 frm1);

    If form four is born from the form, then the initialization of form four is auspicious.

    form4 frm4=new form4(this) so that you can call the method of form 1 in form 4 via frm1.

    Concise neutral single?

  6. Anonymous users2024-01-31

    Take an instance of form one as a parameter to the constructor of form four.

    The first floor is correct.

  7. Anonymous users2024-01-30

    Define a public static window1 w1 in window1;

    add w1=this to the constructor;

    Access methods in other classes:

  8. Anonymous users2024-01-29

    For example, if you click the A1, A2, and A3 buttons in Form A, you can click on the three buttons to invoke different methods in Form B.

    Then you can solve this problem by passing the parameters, if you click a1, pass a parameter value as a1, in the b form, if the parameter value is a1, then I will call the method corresponding to a1.

  9. Anonymous users2024-01-28

    There are two methods, one is to delegate, which passes the functions of form A to form B.

    When form B is instantiated, form A is passed as a parameter.

  10. Anonymous users2024-01-27

    I still don't understand it, but if you just want to transfer the data from form A to form B, you can try delegation.

  11. Anonymous users2024-01-26

    With a commission? Declare the delegate in A, assign a value (assign a method) to the delegate in B, and call it back in A.

  12. Anonymous users2024-01-25

    By instantiating B in A, you can call a member of B.

  13. Anonymous users2024-01-24

    You need to add a reference to the DLL file of this class to this startup item, and then when you pass the value to B, you can easily pass this ID to the field in E, and you will receive it.

  14. Anonymous users2024-01-23

    It still depends on what the permission of this method is.,If it's private, it's not okay.,Public.。

  15. Anonymous users2024-01-22

    Just call it and you're good to go.

    c c = new c();

    This method() is a method inside a.

  16. Anonymous users2024-01-21

    Want. The control executed in form B is eventually added to B.

  17. Anonymous users2024-01-20

    If you want to be more convenient, it's best to write a public class, and write the methods that AB needs to use in it, so that the call can be displayed.

  18. Anonymous users2024-01-19

    First form A must be an object, then form B creates a declaration that the control of form A must display on form A, and if it defaults, it will be created on form B

  19. Anonymous users2024-01-18

    For example, sqldataset, sqldatatable, etc., I have detailed instructions and specific usage cases here, as well as their related performance instructions, hi me, I send it to you!

Related questions
4 answers2024-02-08

for(i=3;i<=ihuffsize[n-1];i++)uint_8s[0]=0;

uint_8s[1]=uint_8[p]; >>>More

6 answers2024-02-08

This little poem is concise and full of meaning, and the writing style is very distinctive. The poet skillfully handles the relationship between narrative and lyricism. The first three sentences of the narrative describe the environment, using layers of in-depth and repeated rendering techniques to create an atmosphere, pave the way for the fourth lyricism, highlight the status of the lyrical sentence, and make the lyrical sentence appear particularly vigilant and powerful. >>>More

43 answers2024-02-08

It's too simple, to tell you the truth, there are many women who like me, and there are a few that I like, and the best way to deal with it is not to chase which one leans over, divide the energy into it, and focus on the one closest to you. >>>More

11 answers2024-02-08

1. Change Workgroup, My Computer, Right-click Properties, 2nd Item Computer Name Change User Workgroup, Make 2 Computer Workgroups Consistent. >>>More

3 answers2024-02-08

3. All include

using namespace std; >>>More