// TODO: Add any constructor code after InitializeComponent call
//
end;
procedure TWinForm.Button1_Click(sender: System.Object; e: System.EventArgs);
begin
TextBox1.Text:=''''Hello World!'''';
end;
end.
3 VCLForms Application for Win32.
它的代码和1完全一样。
最后是用c#写的helloworld.它只有.net一种方式,因为它诞生在.net时代。
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace Project1
{
/// <summary>
/// Summary description for WinForm.
/// </summary>
public class WinForm : System.Windows.Forms.Form
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
public WinForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#re 上一页 [1] [2] [3] [4] [5] 下一页 没有相关教程
|