Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Prolems of creating notepad application in C#?

Prolems of creating notepad application in C#?

Scheduled Pinned Locked Moved C#
questioncsharpgraphics
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stateless
    wrote on last edited by
    #1

    1] Is there any method of load form2 from form1? 2] Is case of resize form1 ,when a form1 is loaded textbox size is equal to form1 size & when i hide the status bar this resize statement is work but at loaded time its not work what is reasion behind it? e.g. //above code is not work properly private void Form1_Load(object sender, EventArgs e) { //toolStripStatusLabel1.Text = "© 2006,Microsoft Corporation,All Rights Reserved"; textBox1.Font = new Font("Arial",16,FontStyle.Bold); textBox1.Size = new System.Drawing.Size((this.Width - 10), (this.Height - 80)); } //above code is work properly private void statusBarToolStripMenuItem_Click(object sender, EventArgs e) { if (statusflag == false) { statusBarToolStripMenuItem.Checked = true; statusStrip1.Visible = true; statusflag = true; textBox1.Size = new System.Drawing.Size((this.Width - 10), (this.Height - 80)); } else { statusBarToolStripMenuItem.Checked = false; statusStrip1.Visible = false; statusflag = false; textBox1.Size = new System.Drawing.Size((this.Width - 10), (this.Height - 60)); } } desert_rose

    C 1 Reply Last reply
    0
    • S Stateless

      1] Is there any method of load form2 from form1? 2] Is case of resize form1 ,when a form1 is loaded textbox size is equal to form1 size & when i hide the status bar this resize statement is work but at loaded time its not work what is reasion behind it? e.g. //above code is not work properly private void Form1_Load(object sender, EventArgs e) { //toolStripStatusLabel1.Text = "© 2006,Microsoft Corporation,All Rights Reserved"; textBox1.Font = new Font("Arial",16,FontStyle.Bold); textBox1.Size = new System.Drawing.Size((this.Width - 10), (this.Height - 80)); } //above code is work properly private void statusBarToolStripMenuItem_Click(object sender, EventArgs e) { if (statusflag == false) { statusBarToolStripMenuItem.Checked = true; statusStrip1.Visible = true; statusflag = true; textBox1.Size = new System.Drawing.Size((this.Width - 10), (this.Height - 80)); } else { statusBarToolStripMenuItem.Checked = false; statusStrip1.Visible = false; statusflag = false; textBox1.Size = new System.Drawing.Size((this.Width - 10), (this.Height - 60)); } } desert_rose

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Stateless wrote:

      1] Is there any method of load form2 from form1?

      A form is just a class. You just instantiate the class and call the apropriate methods on it.

      MyForm frm = new MyForm();
      frm.Show();

      Stateless wrote:

      Is case of resize form1 ,when a form1 is loaded textbox size is equal to form1 size & when i hide the status bar this resize statement is work but at loaded time its not work what is reasion behind it?

      Why don't you just use the Dock[^] property on the text box to get it to fill the window by setting it to DockStyle.Fill. Then you don't have to worry about that because it will resize itself automatically.

      Stateless wrote:

      //toolStripStatusLabel1.Text = "© 2006,Microsoft Corporation,All Rights Reserved";

      I'm really curious about that line. Why were you thinking of assigning the copyright of your applicaiton to Microsoft?


      Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups