When picturebox1 sets picturebox2 as the parent container, the position of picture1 becomes the posi

Updated on technology 2024-04-14
18 answers
  1. Anonymous users2024-02-07

    After the parent container is set, the position of the child controls is calculated according to the coordinate system of the parent container, right? That's why the location is different from what you might expect.

    Does moving in a straight line mean that the control runs directly to the target position or does it have the process of making the control move?

    If it's the former, directly.

    90-40);Past.

    If the offset method doesn't return a value (I didn't turn on vs, I forgot what the definition of this method is) use a temporary struct variable to do the intermediate processing:

    point p = ;

    p;If it's the latter (with time changes). Then you need a timer to do that. Use a formtimer (definition seems to be in.

    The properties to be set are: internal (time interval, generally set to 50, that is, 20 times per second, which is equal to 20 frames).

    enabled=true, enable timer

    tick+= handles events.

    In the processing time, the above direct jump method is used to change the position of the control frame by frame, such as adding 1 to the XY coordinate every time. You can design the specific changes according to your needs.

    If you follow the linear motion you said, you can calculate the position of the widget in the tick event by adding the current coordinates to: (target coordinates - original coordinates) the number of frames that moved before reaching the target.

  2. Anonymous users2024-02-06

    Switch to form1 of the form application, press Ctrl+Alt+X to open the toolbox, enter pic in the search box, find the picturebox control and drag two of them to the form.

    Also double-click picturebox1 to generate picturebox1 click event handling, otherwise an error will occur.

  3. Anonymous users2024-02-05

    Do you have a picturebox control on your interface?

  4. Anonymous users2024-02-04

    Solution:

    2.General method: set the transparent color attribute of the form to your png transparent color, = ;

    Make sure that all color changes on the form are transparent.

    3.You try, maybe you can: the opaque one is set to the backgroundimage of the picturebox, and the transparent one is set to his image

  5. Anonymous users2024-02-03

    Use the gid to reconstruct a new ** to achieve the effect of overlay.

  6. Anonymous users2024-02-02

    If this doesn't work, set backgroungimage to the background ** and image to png

  7. Anonymous users2024-02-01

    If you just want to select it, select it above the properties box on the right side of the software window.

  8. Anonymous users2024-01-31

    1.Best Practice: Use.

    gid reconstructs a new ** to achieve the effect of overlay, and the disadvantage is that it can only be displayed with a picturebox.

    2.General method: set the transparent color attribute of the form to your png transparent color, = ;

    Make sure that all color changes on the form are transparent.

    3.You try, maybe you can: the opaque one is set to the backgroundimage of the picturebox, and the transparent one is set to his.

  9. Anonymous users2024-01-30

    Needs to be implemented in **:

  10. Anonymous users2024-01-29

    This is a bit cumbersome and can be done with quadratic linear interpolation, but it's best to do it with an external program such as PS or ACDSEE!

  11. Anonymous users2024-01-28

    What you mean is that the child window passes a value to the parent window, for example, for example, your form1 must have an event that makes from2 show up.

    private void button1_click(object sender, eventargs e)

    You create a global variable in from2, such as public string urll;

    Then write a property to from2, I guess you haven't learned it yet, it's similar to building a function, but there are no () parentheses, let's understand it this way;

    public string geturl

    The OK button in your from2 assigns a value to urll, which is the value you want to pass as follows.

    private void button1_click(object sender, eventargs e)

    Then go back to the ** above, and when you create from2, you have a geturl attribute, and the value is the value you passed. After you click OK in form2, you will go to the place where form1 creates a new form2 object, and you can try it if you don't believe it. See if you can be inspired.

  12. Anonymous users2024-01-27

    It's easy to pass form1 as a parameter to the new form2.

    That is to say: when creating a new form F2, when it is not modified, it is F2=New Form2(), now it is changed to, F2 =New Form2(this).

    Define a form1 variable in the form2 class, and you're good to go.

  13. Anonymous users2024-01-26

    Method 1: Set pictruebox1 in form1 to public

    Method 2: Use form1 as a property member of form2 and assign form1 to form2 before the show after creating form2

  14. Anonymous users2024-01-25

    Determines the click event () for the button

  15. Anonymous users2024-01-24

    Professional program problems are recommended that you go to the programmer forum to ask faster, and many people on CSDN solve them quickly.

  16. Anonymous users2024-01-23

    However, only if form1 is not destroyed.

  17. Anonymous users2024-01-22

    Define a public class, put the attribute of ** in it, and the number in it, the class is static and can be accessed by all forms, one form changes the value, and several changes to the value in it, which can play the effect you said.

  18. Anonymous users2024-01-21

    Add a dynamic picturebox and call the dynamic picturebox in form1 and form2 respectively

Related questions
8 answers2024-04-14

Some of the software that comes with the mobile phone does not support repeated reminders and interval reminders. >>>More

25 answers2024-04-14

Replace the value you want with the value you want, right-click in the field in word, and update the field is OK.

8 answers2024-04-14

Go to [Settings] - [More Settings] - [Factory Reset], and you can perform [Reset All Settings] or [Clear All Data] operations as needed. Restore: Tap [Reset All Settings] - [Restore] to restore all settings, this operation will not delete the data in the phone. >>>More

5 answers2024-04-14

Method: 1. Bring up the run menu. Right-click the start key and select Run, or press Win+R on the keyboard at the same time to open the run box, and type regedit enter to go to the registry. >>>More

5 answers2024-04-14

In Dungeon Warriors, you can press ESC to bring up the game menu, select Game Settings, and select Full Screen Mode or other mode in the Display Settings. If it is still not a full-screen window after confirming that it is saved, change the resolution of your computer. Right-click on the blank space of the desktop, select the screen resolution to lower the computer resolution, the general resolution is 1280*720, it will be displayed as a full screen, according to the since.