00001 using System;
00002 using System.Windows.Forms;
00003
00007 public class aboutBox:System.Windows.Forms.Form
00008 {
00009
00010 #region " Windows Form Designer generated code "
00011
00015 public aboutBox()
00016 {
00017
00018 InitializeComponent();
00019 }
00020
00024 protected override void Dispose(bool disposing) {
00025
00026 if (disposing) {
00027 if (components != null) {
00028 components.Dispose();
00029 }
00030 }
00031
00032 base.Dispose(disposing);
00033
00034 }
00035
00036
00037 private System.ComponentModel.IContainer components = null;
00038
00039
00040
00041
00042
00043 private System.Windows.Forms.PictureBox pbIcon;
00044 private System.Windows.Forms.Label lblTitle;
00045 private System.Windows.Forms.Label lblVersion;
00046 private System.Windows.Forms.Label lblCopyright;
00047 private System.Windows.Forms.Button btnOK;
00048
00049 private void InitializeComponent()
00050 {
00051 this.pbIcon = new System.Windows.Forms.PictureBox();
00052 this.lblTitle = new System.Windows.Forms.Label();
00053 this.lblVersion = new System.Windows.Forms.Label();
00054 this.btnOK = new System.Windows.Forms.Button();
00055 this.lblCopyright = new System.Windows.Forms.Label();
00056 ((System.ComponentModel.ISupportInitialize)(this.pbIcon)).BeginInit();
00057 this.SuspendLayout();
00058
00059
00060
00061 this.pbIcon.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
00062 this.pbIcon.ImeMode = System.Windows.Forms.ImeMode.NoControl;
00063 this.pbIcon.Location = new System.Drawing.Point(16, 16);
00064 this.pbIcon.Name = "pbIcon";
00065 this.pbIcon.Size = new System.Drawing.Size(82, 82);
00066 this.pbIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
00067 this.pbIcon.TabIndex = 0;
00068 this.pbIcon.TabStop = false;
00069
00070
00071
00072 this.lblTitle.ImeMode = System.Windows.Forms.ImeMode.NoControl;
00073 this.lblTitle.Location = new System.Drawing.Point(126, 16);
00074 this.lblTitle.Name = "lblTitle";
00075 this.lblTitle.Size = new System.Drawing.Size(360, 23);
00076 this.lblTitle.TabIndex = 1;
00077 this.lblTitle.Text = "Application Title";
00078
00079
00080
00081 this.lblVersion.ImeMode = System.Windows.Forms.ImeMode.NoControl;
00082 this.lblVersion.Location = new System.Drawing.Point(126, 39);
00083 this.lblVersion.Name = "lblVersion";
00084 this.lblVersion.Size = new System.Drawing.Size(360, 17);
00085 this.lblVersion.TabIndex = 2;
00086 this.lblVersion.Text = "Application Version";
00087
00088
00089
00090 this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
00091 this.btnOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
00092 this.btnOK.Location = new System.Drawing.Point(256, 75);
00093 this.btnOK.Name = "btnOK";
00094 this.btnOK.Size = new System.Drawing.Size(75, 23);
00095 this.btnOK.TabIndex = 4;
00096 this.btnOK.Text = "OK";
00097
00098
00099
00100 this.lblCopyright.ImeMode = System.Windows.Forms.ImeMode.NoControl;
00101 this.lblCopyright.Location = new System.Drawing.Point(126, 56);
00102 this.lblCopyright.Name = "lblCopyright";
00103 this.lblCopyright.Size = new System.Drawing.Size(360, 23);
00104 this.lblCopyright.TabIndex = 5;
00105 this.lblCopyright.Text = "Application Copyright";
00106
00107
00108
00109 this.AcceptButton = this.btnOK;
00110 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
00111 this.CancelButton = this.btnOK;
00112 this.ClientSize = new System.Drawing.Size(343, 110);
00113 this.Controls.Add(this.lblCopyright);
00114 this.Controls.Add(this.btnOK);
00115 this.Controls.Add(this.lblVersion);
00116 this.Controls.Add(this.lblTitle);
00117 this.Controls.Add(this.pbIcon);
00118 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
00119 this.MaximizeBox = false;
00120 this.MinimizeBox = false;
00121 this.Name = "aboutBox";
00122 this.ShowInTaskbar = false;
00123 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
00124 this.Text = "About ...";
00125 this.Load += new System.EventHandler(this.aboutBox_Load);
00126 ((System.ComponentModel.ISupportInitialize)(this.pbIcon)).EndInit();
00127 this.ResumeLayout(false);
00128
00129 }
00130
00131 #endregion
00132
00133
00134
00135 private void aboutBox_Load(object sender, System.EventArgs e) {
00136
00137 try {
00138
00139
00140 this.Text = "About " + this.Owner.Text;
00141 this.Icon = this.Owner.Icon;
00142
00143
00144
00145
00146 this.pbIcon.Image = this.Owner.Icon.ToBitmap();
00147 this.lblTitle.Text = this.Text;
00148 this.lblVersion.Text = "1.0.0.0";
00149 this.lblCopyright.Text = "Copyright 2006 BOTDK - Sir Dragon.";
00150
00151 } catch(System.Exception ex) {
00152
00153
00154 MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Stop);
00155
00156 }
00157
00158 }
00159
00160 }