using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; namespace Laj.SWEgenskaper { // Last modified: 2002-10-19 // Version: 0.42 ID:LAJGAIS44 // Compiles with Microsoft Visual C# .NET 7.0.9466 on Windows 95. // The source code is free. It is not under any kind of license. // If this code works, it was written by Lars Johansson, Göteborg. // If not, I don't know who wrote it. public class DlgHelp : System.Windows.Forms.Form { private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Button buttonOK; private System.Windows.Forms.Label labelHelp; /// /// Required designer variable. /// private System.ComponentModel.Container components = null; public DlgHelp() { InitializeComponent(); labelHelp.Text = labelHelp.Text + Application.ProductName; Bitmap Logo = new Bitmap(pictureBox1.Image); Logo.MakeTransparent(Logo.GetPixel(1, 1)); pictureBox1.Image = (Image) Logo; } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(DlgHelp)); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.labelHelp = new System.Windows.Forms.Label(); this.buttonOK = new System.Windows.Forms.Button(); this.SuspendLayout(); // // pictureBox1 // this.pictureBox1.Image = ((System.Drawing.Bitmap)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Location = new System.Drawing.Point(8, 8); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(84, 122); this.pictureBox1.TabIndex = 17; this.pictureBox1.TabStop = false; // // labelHelp // this.labelHelp.Location = new System.Drawing.Point(104, 8); this.labelHelp.Name = "labelHelp"; this.labelHelp.Size = new System.Drawing.Size(144, 88); this.labelHelp.TabIndex = 18; this.labelHelp.Text = "Sorry, but this command is now considered obsolete. It will have to be eliminated" + " in future versions of "; // // buttonOK // this.buttonOK.Location = new System.Drawing.Point(176, 104); this.buttonOK.Name = "buttonOK"; this.buttonOK.TabIndex = 19; this.buttonOK.Text = "OK"; this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); this.buttonOK.MouseMove += new System.Windows.Forms.MouseEventHandler(this.buttonOK_MouseMove); // // DlgHelp // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(256, 133); this.ControlBox = false; this.Controls.AddRange(new System.Windows.Forms.Control[] { this.buttonOK, this.labelHelp, this.pictureBox1}); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "DlgHelp"; this.Text = "Help"; this.ResumeLayout(false); } #endregion private void buttonOK_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { Random r = new Random(); int x = (int)(this.ClientRectangle.Right*r.NextDouble() ) -30; int y = (int)(this.ClientRectangle.Bottom*r.NextDouble() )-10; buttonOK.Location = new Point(x, y); } private void buttonOK_Click(object sender, System.EventArgs e) { this.Close(); } } }