HOW DELPHI DYNAMICALLY CREATES A FORM TO OPEN FILE 20

Updated on technology 2024-04-09
15 answers
  1. Anonymous users2024-02-07

    In form1, write the following **:

    Can.

  2. Anonymous users2024-02-06

    You can set the keypress of the form's keypress

    For example, press Ctrl+S to trigger;

  3. Anonymous users2024-02-05

    1. All the added controls can be used the same as the controls added during the design, and the VB can use the control array, which is convenient to do, load on the line, as long as the new one is added and then addhandle.

  4. Anonymous users2024-02-04

    It should be ok.

    Does the form name refer to the class name of the form class, or the name of the object generated by the form class?

    If the former is the case, you need to dynamically create the object of the form class under the button event.

    If it's the latter, simply hide the form before and then show it under the button event.

    I don't know why you have such a need ...

  5. Anonymous users2024-02-03

    Let's say your form1 dynamically creates a button on form2, and you first add a button event to form2.

    procedure buttonclick(sender: tobject);

    beginend and then create a button to assign a value to onclickbutton1:= ;

    buttonclick;

  6. Anonymous users2024-02-02

    You can create it dynamically, e.g. in the form1 form

    varbutton:tbutton;

    beginbutton:=;

    :=form1;

    end;

  7. Anonymous users2024-02-01

    First declare a form2:=tform;

    Then add form2:=;

    And then form2 is generated, and you can do what you want to do in it, such as or left, and you need to do it yourself, oh yes, depending on it.

    Dynamic creation should be like this, don't be a little rusty for a long time, it's about right, you can try it, and you'll understand.

  8. Anonymous users2024-01-31

    There must be an instance of form2 first;

    When the key is pressed, form2:=; That's it.

  9. Anonymous users2024-01-30

    In the case of delphi7, opening a project is to open that dpr file.

    After opening the project, the main form in the menu project--options--forms is the main form, which can be modified by yourself.

    In fact, some programs are not set up this way.

    If the program exists there are 2 forms, A and B

    In that case, both A and B can be the main form, depending on how you write the program, so the main form you are looking at above must be completely correct.

    For example, open a delphi7 dpr file.

    if condition then

    form1);

    endelse ;

    form2);

    In that case, depending on the situation, open a different form as the main form.

  10. Anonymous users2024-01-29

    There is something wrong with the train of thought.

    formcreate just does some initialization work when creating, and it's best not to include ** that displays the information.

    If you want to do some work before the display is created and the form is displayed, you can consider including ** in the onshow event.

  11. Anonymous users2024-01-28

    In the object inspector of the main form, select oncreate under event, and then make sure to run the oncreate process when oncreate.

  12. Anonymous users2024-01-27

    vari :integer = 1;

    f :textfile;

    path :string;

    procedure : tobject);

    varb :tbutton;

    e :tedit;

    begine :=;Dynamically create tedit controls.

    self;Specifies that the parent class of the edit control is the form.

    i,40,50,20);

    inttostr(i);The text property of the initial control.

    e' +inttostr(i);Rename the control.

    i;Sleek control's identification information.

    path :=';

    b :=;=self;

    buttononclick;

    'b' +inttostr(i);

    i;inc(i);

    end;procedure : tobject);

    var j:integer;

    begintry

    assignfile(f,path);

    if not fileexists(path) then begin to determine whether a file exists.

    rewrite(f);If it doesn't exist, create an empty file.

    for j :=0 to -1 do traverse all controls of the form meniscus.

    if ( is tedit) and ( = tbutton(sender).tag) then begin

    writeln(f,tedit(;Condition 1: Whether it is a tedit control. Condition 2: Whether it corresponds to the button.

    break;Once you find one, you jump out. Because it's just a click of a button.

    end;finally

    closefile(f);Close the file.

    end;end;

    Do you understand enough? .In delghi7 has already tested it for you. The above ** is written by an individual.

  13. Anonymous users2024-01-26

    "For example, the main form is form1, and several forms are dynamically created after clicking the button: form1,.."

    This is a simple question, but the additional actions need to be noted! But you didn't describe it clearly!

    So I'll start with your main one right now"Change the timer property of form3 to enabled to true

    to answer. = true;

    I'm guessing your question isn't that simple, but I need you to add an explanation!

    If I'm not wrong, your requirements may need to be done with an interface!

    You can add an explanation, I'll follow up if I come up tomorrow and see it!

  14. Anonymous users2024-01-25

    These forms can be managed with a tlist, and then traversed through the tlist to find the form. It makes more sense to develop a new tiredness, such as tmyformlist, that provides a way to find the form object directly. It's very stupid to use the window title to find it, because to use system call, both the encapsulation and future compatibility are not good, assuming that you modify the window title in the future, then you have to change a lot of **, a lot!

  15. Anonymous users2024-01-24

    From the point of view, there is one missing sentence to specify the container (the handle of the form or panel) to be displayed to the webbrowser

    procedure : tobject);

    var wb:twebbrowser;

    beginwb:=;

    handle;New.

    d:\123');

    end;Screenshot of running the test:

Related questions
23 answers2024-04-09

Please modify it yourself as needed.

procedure addlink; >>>More

11 answers2024-04-09

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

4 answers2024-04-09

How do motion comics design anime? The role of anime is to convey information through the senses of sight, hearing, and text, performance, emotion, etc. Animation is a kind of three-dimensional design art carried out in the two-dimensional plane space, which is more three-dimensional and dynamic, with a sense of three-dimensional collapse. >>>More

12 answers2024-04-09

There's a function. There is a sqrt function below, for example, if you want to open a square of 4, you can use it; >>>More

5 answers2024-04-09

procedure : tobject);

vararr:array of array of string; >>>More