It wont full-screen :P

My program isn't changing to fullscreen on click... I've found a million errors myself but i cant figure out why it's not changing to fullscreen =/

main.cs

using System;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;

namespace namespace_DesktopTexter {
class class_Main {
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.Run(new DesktopTexter());
}
}
}

DesktopTexter.cs

using System;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;

namespace namespace_DesktopTexter {
public partial class DesktopTexter : Form {

public int FullScreen = 0;

CheckBox CheckBox_FullScreen = new CheckBox();
Panel Panel_Top = new Panel();
Panel Panel_Info = new Panel();
Label Label_FileName = new Label();
Label Label_FileExtension = new Label();
LinkLabel LinkLabel_About = new LinkLabel();
Label Label_FullScreen = new Label();
TextBox TextBox_FileName = new TextBox();
TextBox TextBox_FileExtension = new TextBox();
Button Button_SaveToDesktop = new Button();
RichTextBox RichTextBox_Content = new RichTextBox();

public DesktopTexter() {

this.Text = "Desktop Texter";
this.MinimumSize = new Size(290, 200);
if(FullScreen == 0) {
this.FormBorderStyle = FormBorderStyle.Sizable;
this.Size = new Size(450, 450);
}
if(FullScreen == 1) {
this.FormBorderStyle = FormBorderStyle.None;
this.Size = new Size(1024, 768);
}

RichTextBox_Content.Parent = this;
RichTextBox_Content.Dock = DockStyle.Fill;
RichTextBox_Content.TabIndex = 0;

Panel_Top.Parent = this;
Panel_Top.Dock = DockStyle.Top;
Panel_Top.Height = 55;

Panel_Info.Parent = this;
Panel_Info.Dock = DockStyle.Bottom;
Panel_Info.Height = 20;

Label_FileName.Parent = Panel_Top;
Label_FileName.Location = new Point(5, 8);
Label_FileName.AutoSize = true;
Label_FileName.Text = "Filename:";

Label_FileExtension.Parent = Panel_Top;
Label_FileExtension.Location = new Point(5, 33);
Label_FileExtension.AutoSize = true;
Label_FileExtension.Text = "File extension:";

LinkLabel_About.Parent = Panel_Info;
LinkLabel_About.Location = new Point(3, 3);
LinkLabel_About.AutoSize = true;
LinkLabel_About.Text = "About Desktop Texter";
LinkLabel_About.TabStop = false;
LinkLabel_About.LinkClicked += new LinkLabelLinkClickedEventHandler(LinkLabel_About_Click);

Label_FullScreen.Parent = Panel_Info;
Label_FullScreen.Location = new Point(this.Width - 90, 4);
Label_FullScreen.AutoSize = true;
Label_FullScreen.TabStop = false;
Label_FullScreen.Anchor = AnchorStyles.Right;
if(FullScreen == 0) {
Label_FullScreen.Text = "Full Screen";
}
if(FullScreen == 1) {
Label_FullScreen.Text = "Window";
}

CheckBox_FullScreen.Parent = Panel_Info;
CheckBox_FullScreen.Location = new Point(this.Width - 23, 0);
CheckBox_FullScreen.TabStop = false;
CheckBox_FullScreen.Anchor = AnchorStyles.Right;
if(!CheckBox_FullScreen.Checked)
FullScreen = 0;
if(CheckBox_FullScreen.Checked)
FullScreen = 1;

TextBox_FileName.Parent = Panel_Top;
TextBox_FileName.Location = new Point(60, 5);
TextBox_FileName.Width -= 25;

TextBox_FileExtension.Parent = Panel_Top;
TextBox_FileExtension.Location = new Point(85, 30);
TextBox_FileExtension.Width -= 50;
TextBox_FileExtension.Text = "txt";

Button_SaveToDesktop.Parent = Panel_Top;
Button_SaveToDesktop.Location = new Point(139, 16);
Button_SaveToDesktop.Text = "Save to Desktop";
Button_SaveToDesktop.AutoSize = true;
Button_SaveToDesktop.Click += new EventHandler(Button_SaveToDesktop_Click);
}

void Button_SaveToDesktop_Click(object sender, EventArgs click) {
SaveToDesktop(TextBox_FileName.Text, RichTextBox_Content.Text, TextBox_FileExtension.Text);
}

void LinkLabel_About_Click(object sender, LinkLabelLinkClickedEventArgs click) {
Information();
}
}
}

Methods.cd

using System;
using System.IO;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;

namespace namespace_DesktopTexter{
public partial class DesktopTexter {

void SaveToDesktop(string Meth_Filename, string Meth_Content, string Meth_FileExtension) {

if(Meth_Filename != "") {
if(Meth_FileExtension == "") {
if(File.Exists("C:/Documents and Settings/Tomas/Skrivebord/" + Meth_Filename + ".txt")) {
File.Delete("C:/Documents and Settings/Tomas/Skrivebord/" + Meth_Filename + ".txt");
}
File.AppendAllText("C:/Documents and Settings/Tomas/Skrivebord/" + Meth_Filename + ".txt", Meth_Content);

MessageBox.Show("Used default extension \".txt\"", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
if(Meth_FileExtension != "") {
if(File.Exists("C:/Documents and Settings/Tomas/Skrivebord/" + Meth_Filename + "." + Meth_FileExtension)) {
File.Delete("C:/Documents and Settings/Tomas/Skrivebord/" + Meth_Filename + "." + Meth_FileExtension);
}
File.AppendAllText("C:/Documents and Settings/Tomas/Skrivebord/" + Meth_Filename + "." + Meth_FileExtension, Meth_Content);
}
}
if(Meth_Filename == "") {
if(Meth_FileExtension == "") {
if(File.Exists("C:/Documents and Settings/Tomas/Skrivebord/" + "file" + ".txt")) {
File.Delete("C:/Documents and Settings/Tomas/Skrivebord/" + "file" + ".txt");
}
File.AppendAllText("C:/Documents and Settings/Tomas/Skrivebord/" + "file" + ".txt", Meth_Content);

MessageBox.Show("Used default filename \"file.txt\"", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
if(Meth_FileExtension != "") {
if(File.Exists("C:/Documents and Settings/Tomas/Skrivebord/" + "file" + "." + Meth_FileExtension)) {
File.Delete("C:/Documents and Settings/Tomas/Skrivebord/" + "file" + "." + Meth_FileExtension);
}
File.AppendAllText("C:/Documents and Settings/Tomas/Skrivebord/" + "file" + "." + Meth_FileExtension, Meth_Content);

MessageBox.Show("Used default filename \"file.txt\"", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}

void Information() {
MessageBox.Show(
"Made by Tomas Sandven\n\nFreeware",
"Inforation",
MessageBoxButtons.OK,
MessageBoxIcon.Information
);
}
}
}
[7158 byte] By [dahwan] at [2007-11-20 9:38:14]
# 1 Re: It wont full-screen :P
Use the Form_Load function to resize the form, not the constructor.

Another tip: don't hardcode screen resolutions. You can retrieve these automatically (which will make your code usable on other resolutions than 1024 x 768 too).
Tischnoetentoet at 2007-11-9 11:34:25 >
# 2 Re: It wont full-screen :P
Thanks for the reply =D
I will change the program a lot when i get back to my own PC and can check my class refrences...
But what i wondered now was how i can get fullscreen. And i am a total noob; i have absolutely no idea what the form_load function is :D (and not a "constructor" eighter =/ )
dahwan at 2007-11-9 11:35:36 >
# 3 Re: It wont full-screen :P
Then buy a C# book and read it before you start any coding...
Tischnoetentoet at 2007-11-9 11:36:35 >
# 4 Re: It wont full-screen :P
Cant you just tell me how? :-(?By the way i found out what a constructor is :-P
dahwan at 2007-11-9 11:37:30 >
# 5 Re: It wont full-screen :P
If you don't even know what an event is, I don't think you will learn anything from the information I will provide you.
Tischnoetentoet at 2007-11-9 11:38:29 >
# 6 Re: It wont full-screen :P
OF COURSE i know what an event is!!

I get to check this forum like once pr week, and i am sick and tired of replies like this! if you dont know how i can fix my program, just tell me so some one else can help!

Ny problem is that my program aint changing to full screen when i click full screen =)

Any1 know why?
dahwan at 2007-11-9 11:39:40 >
# 7 Re: It wont full-screen :P
You are just telling me that you found out what a constructor is (and that's the basic of the basics).

According to this sentence:And i am a total noob; i have absolutely no idea what the form_load function is (and not a "constructor" eighter =/ ) I still think you should read a book first which will teach you the basics of the C# language (such as delegates, events, types, classes, etc).

Anyway, googling for "C# + fullscreen" brings up this article (http://www.codeproject.com/csharp/fullscreenmode.asp) which should help you along.

But again, don't tell us "OF COURSE i know what an event is" when you don't even know the Load event of a form. And that you are having more people replying to you with "read a book" should light up something in your head like "maybe I SHOULD start reading a book".
Tischnoetentoet at 2007-11-9 11:40:33 >
# 8 Re: It wont full-screen :P
I have read several books. 2 norwegian books covering the basics and an english one about directX.?Dont blame me for bad translations :p?Thx 4 the link
dahwan at 2007-11-9 11:41:37 >
# 9 Re: It wont full-screen :P
I hope they didn't actually translated the code in the book ;)

I read a book once where the translators also changed the variable names and if () functions, so at that moment I decided to read english books only...
Tischnoetentoet at 2007-11-9 11:42:35 >