Calling a method on another form in C#

前端 未结 3 1990
清歌不尽
清歌不尽 2021-01-23 14:15

I am building a basic Image editor. In my app, if the user wants to resize the image a new form pops up and asks the user to input an new width and height for the image.

<
3条回答
  •  难免孤独
    2021-01-23 14:49

    Setup properties in your "resize" class for the values you want to retrieve. For example, if you add a width property:

    public int Width { get; set; }
    

    you will be able to get the width from your Form1 class.

提交回复
热议问题