Topic: Steve: Lesson 32^3 (A simple winform)  (Read 1547 times)

0 Members and 1 Guest are viewing this topic.

Offline toasty0

  • Application.Quit();
  • Captain
  • *
  • Posts: 8045
  • Gender: Male
Steve: Lesson 32^3 (A simple winform)
« on: June 07, 2005, 05:45:52 pm »
Here is the code:


using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace Steven
{
   /// <summary>
   /// Summary description for Form1.
   /// </summary>
   public class Form1 : System.Windows.Forms.Form
   {
      private System.Windows.Forms.Label lblStory;
      private System.Windows.Forms.Button btnStory;
      /// <summary>
      /// Required designer variable.
      /// </summary>
      private System.ComponentModel.Container components = null;

      public Form1()
      {
         //
         // 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 );
      }

      #region Windows Form Designer generated code
      /// <summary>
      /// Required method for Designer support - do not modify
      /// the contents of this method with the code editor.
      /// </summary>
      private void InitializeComponent()
      {
         this.lblStory = new System.Windows.Forms.Label();
         this.btnStory = new System.Windows.Forms.Button();
         this.SuspendLayout();
         //
         // lblStory
         //
         this.lblStory.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(255)), ((System.Byte)(192)));
         this.lblStory.Location = new System.Drawing.Point(0, 0);
         this.lblStory.Name = "lblStory";
         this.lblStory.Size = new System.Drawing.Size(376, 312);
         this.lblStory.TabIndex = 0;
         this.lblStory.Visible = false;
         //
         // btnStory
         //
         this.btnStory.BackColor = System.Drawing.Color.LightBlue;
         this.btnStory.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
         this.btnStory.Location = new System.Drawing.Point(376, 0);
         this.btnStory.Name = "btnStory";
         this.btnStory.Size = new System.Drawing.Size(128, 23);
         this.btnStory.TabIndex = 1;
         this.btnStory.Text = "Tell Me A Story";
         this.btnStory.Click += new System.EventHandler(this.btnStory_Click);
         //
         // Form1
         //
         this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
         this.ClientSize = new System.Drawing.Size(504, 314);
         this.Controls.Add(this.btnStory);
         this.Controls.Add(this.lblStory);
         this.Name = "Form1";
         this.Text = "Steven\'s Story";
         this.ResumeLayout(false);

      }
      #endregion

      /// <summary>
      /// The main entry point for the application.
      /// </summary>
      [STAThread]
      static void Main()
      {
         Application.Run(new Form1());
      }

      private void btnStory_Click(object sender, System.EventArgs e)
      {
         //Make lblStory visible
         lblStory.Visible=true;
         btnStory.Visible=false;

         lblStory.Text="Way down south where the grass grows green " +"\n"+
            "Steve jumped on the old sewing machine." +"\n"+
            "That sewing was going so fast"+ "\n"+
            "It sewed ninety stitches up old Steve's ass";
      }
   }
}


And this is what you get for the final output (compiled program) or aka the executable. http://www.toasty0.com/Marlow/Steven.exe

Jerry
MCTS: SQL Server 2005 | MCP: Windows Server 2003 | MCTS: Microsoft Certified Technology Specialist | MCT: Microsoft Certified Trainer | MOS: Microsoft Office Specialist 2003 | VSP: VMware Sales Professional | MCTS: Vista

Offline Sirgod

  • Whooot Master Cattle Baron
  • Global Moderator
  • Vice Admiral
  • *
  • Posts: 27844
  • Gender: Male
Re: Steve: Lesson 32^3 (A simple winform)
« Reply #1 on: June 07, 2005, 07:29:22 pm »
LOL< ok Bro, them's fighting words.  ;D

Stephen
"You cannot exaggerate about the Marines. They are convinced to the point of arrogance, that they are the most ferocious fighters on earth - and the amusing thing about it is that they are."- Father Kevin Keaney, Chaplain, Korean War

Offline SkyFlyer

  • D.Net Beta Tester
  • Commander
  • *
  • Posts: 4240
  • Gender: Male
Re: Steve: Lesson 32^3 (A simple winform)
« Reply #2 on: June 08, 2005, 02:45:28 am »
hahahaha.
Life is short... running makes it seem longer.

"A god who let us prove his existence would be an idol" - Dietrich Bonhoeffer