نمایش نتایج 1 تا 2 از 2

نام تاپیک: ایجاد فرم

  1. #1

    ایجاد فرم

    چطور میشه توی دلفی پرسیم یه فرم به برنامه اضافه کرد
    من از منوی project و بعد add new Item یه windows Form اضافه کردم ولی وقتی به یکی از دکم هام دستور نمایش اون رو میدم ایراد می گیره
    میشه توضیح بدید که چیکارش باید کرد؟

  2. #2

    نقل قول: ایجاد فرم

    در کد زیر نحوه انجام کار رو نشان داده ام که می توانید از آن استفاده کنید:
    namespace WindowsApplication1;
    interface
    uses
    System.Drawing,
    System.Collections,
    System.Collections.Generic,
    System.Linq,
    System.Windows.Forms,
    System.ComponentModel;
    type
    MainForm = partial class(System.Windows.Forms.Form)
    private
    method button1_Click(sender: System.Object; e: System.EventArgs);
    protected
    method Dispose(disposing: Boolean); override;
    public
    constructor;
    // Look at This
    frm : Form2;
    ///////////////
    end;
    implementation
    constructor MainForm;
    begin
    InitializeComponent();
    end;
    method MainForm.Dispose(disposing: Boolean);
    begin
    if disposing then begin
    if assigned(components) then
    components.Dispose();
    end;
    inherited Dispose(disposing);
    end;

    method MainForm.button1_Click(sender: System.Object; e: System.EventArgs);
    begin
    // Look at This
    frm:= new Form2();
    frm.Show(); // or frm.ShowDialog();
    /////////////////
    end;
    end.

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •