Delphi makes the window move back and forth

Updated on technology 2024-04-11
9 answers
  1. Anonymous users2024-02-07

    procedure movewindow();

    constleftmax = 20;

    leftmin = 1000;

    beginwhile ( leftmax) do:= - 10;

    while ( leftmin) do:= + 10;

    end;procedure : tobject);

    begin deletes the timer and stops execution.

    killtimer(handle, 1);

    end;procedure : tobject);

    The begin timer id is 1,1000 milliseconds.

    settimer(handle, 1, 1000, @movewindow);

    end;

  2. Anonymous users2024-02-06

    Create a new project, add a timer control to the form, and set its properties as follows:

    interval=100 (you can take 1000 between 100, the higher the number, the slower the movement).

    tag=2 (1 100 is recommended, the larger the number, the faster it moves) and then double-click the timer control, enter the following in **:

    procedure : tobject);

    beginleft:=left+;

    if (left<=0) or (left>= then:=;

    end;Just run it.

  3. Anonymous users2024-02-05

    Use the api function movewindow

    e.g. movewindow(,100,100,,;

    This will move the window to 100,100 coordinates relative to the parent window, with the same height and width.

  4. Anonymous users2024-02-04

    Define a Boolean global variable, when you start to enter data, set its value to false, save the data, set it to true, detect this value when closing the window, if it is false, throw a dialog box to remind the user if you need to save the data, if yes, save the data to close the window, if no, close the window directly. Isn't it possible?

  5. Anonymous users2024-02-03

    Simple, which is your form2?

    The position property of form1 is set to podefaultOtherwise, the initial ab is wrong.

    To center it, you have to get the screen width height when you create it yourself.

    You can set ab to 0 first, and move form1 to see if it will move with it.

    The event to close the button is not seen in **.

  6. Anonymous users2024-02-02

    Endless loops in programs It is recommended to use threads. It's a little better.

    Of course you can.

    But a good ** suggestion is to use threads to do it.

  7. Anonymous users2024-02-01

    If each step in the loop is short, it can be used in the loop, and if the loop time is long, it is better to use multithreading.

  8. Anonymous users2024-01-31

    Add a sentence before the loop; That's it, for example:

    varl: integer

    beginfor i:=0 to 100000 do:= inttostr(i);

    end;end;

    Like the ** above, run to the loop here, and the program will fake death! The card owner doesn't move, and it won't move until the cycle is over!

    If you add a sentence in front; There won't be a problem of getting stuck!

    As follows: var

    l: integer

    beginfor i:=0 to 100000 do;

    inttostr(i);

    end;end;

  9. Anonymous users2024-01-30

    Set the top and left attributes of the panel.

    The height of the form.

    The width of the form.

Related questions
11 answers2024-04-11

Bay windows are called "bay windows" because they are usually rectangular or trapezoidal and bulge outward. Unlike traditional flat windows, which have only one side of glass, a bay window is glass on three sides. The height of the window sill is also relatively low, and the low window sill allows people to have a wider field of vision and feel closer to nature. >>>More

12 answers2024-04-11

Executed in one data control.

alter table name alter column id counter (1, 1). >>>More

8 answers2024-04-11

To provide a little bit of my learning experience is as follows: >>>More

11 answers2024-04-11

I don't know what event you put it in, mine is in the paste click of the floating menu.

12 answers2024-04-11

1. First of all, the easier way is to use the bay window to raise some flowers and plants, there are friends who like to raise flowers at home, the use of the bay window is a good choice, the flowers and plants can receive sunlight on the bay window, the growth is better, and it can also make some room for the interior, which is a good choice. >>>More