3 Replies - 472 Views - Last Post: 16 November 2009 - 04:59 PM Rate Topic: -----

#1 poncho4all  Icon User is offline

  • D.I.C Head!
  • member icon

Reputation: 123
  • View blog
  • Posts: 1,405
  • Joined: 15-July 09

Starting on Question

Posted 16 November 2009 - 04:24 PM

Well im wondering if i should ask this here or somewhere else, if its not here psyco could move it or something.

Question:
Im using Visual Studio 2008 and Im starting on C#, Im reading this not so good tutorial but it was the only one i found that really started on the basics and so on in a good speed rate. Im a C++ programmer so i know somethings and some are new for me. But my main problem is now, i reached a part where the tutorial author started working with some windows app (or i think he did :o). So I go on to Create->Visual C#->Windows->(here is the problem i dont know wich one to select out of all the options)

List of Options:
Windows Forms Application(used this one but i comes with some predefined stuff i dont yet understand)
WPF Application
Console Application
Windows Service
WPF Control Library
Class Library
WPF Browser Application
Empty Proyect (I have been using this one for console applications that the tutorial showed, when i tried to use this one for the windows code shown below, it didnt had intelisence so im guessing it doesn't work for that)
WPF Custom Control Library
Windows Forms Control Library

If some could point out the one i should use would be nice :P

Just wondering: What does WPF stands for?


This is the code that is in the tutorial
using System;
using System.Windows.Forms;
using System.Drawing;

namespace NotePadWindowsForms
{
	public class NotePadWindowsForms : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button Button1;
		public NotePadWindowsForms()
		{
			Button1 = new System.Windows.Forms.Button();
			Button1.Location = new System.Drawing.Point(8, 32);
			Button1.Name = "Button";
			Button1.Size = new System.Drawing.Size(104, 32);
			Button1.TabIndex = 0;
			Button1.Text = "Click Me";
			Controls.AddRange(new System.Windows.Forms.Control[] { Button1 });
			Button1.Click += new System.EventHandler(Button1_Click);
		}
		private void Button1_Click(object sender, System.EventArgs e)
		{
			MessageBox.Show("Button is Clicked");
		}
		public static int Main()
		{
			Application.Run(new NotePadWindowsForms());
			return 0;
		}
	}
}



Is This A Good Question/Topic? 0
  • +

Replies To: Starting on Question

#2 MentalFloss  Icon User is offline

  • "ADDICTED"[2:5]
  • member icon

Reputation: 528
  • View blog
  • Posts: 1,397
  • Joined: 02-September 09

Re: Starting on Question

Posted 16 November 2009 - 04:28 PM

You're using the right one.

WPF stands for Windows Presentation Foundation.
Was This Post Helpful? 1
  • +
  • -

#3 poncho4all  Icon User is offline

  • D.I.C Head!
  • member icon

Reputation: 123
  • View blog
  • Posts: 1,405
  • Joined: 15-July 09

Re: Starting on Question

Posted 16 November 2009 - 04:52 PM

Thanks for the reply MetalFloss.

Im guessing there is no good tutorial or someone who bothered to make something like a walk throw the predefined stuff in the "Windows Forms Application" area right?

Thing is wrote all the code in an area that says program.cs, but before i wrote it there, noticed that there is something above this that says Form1.cs and it has like a little empty window like the one that prompts when i run the code, but without the button or anything.

This post has been edited by poncho4all: 16 November 2009 - 04:56 PM

Was This Post Helpful? 0
  • +
  • -

#4 MentalFloss  Icon User is offline

  • "ADDICTED"[2:5]
  • member icon

Reputation: 528
  • View blog
  • Posts: 1,397
  • Joined: 02-September 09

Re: Starting on Question

Posted 16 November 2009 - 04:59 PM

You'll notice that your Form1 code has the class declared as partial. That's because all the actual designer code is in another file.
So, you can just open the designer and slap some controls on and watch the designer code update to kinda get a feel for what's happening.

Edit: As for working with controls and such, your best bet really is to buy a book on the subject. Try to find one that also goes over creating custom controls.

This post has been edited by MentalFloss: 16 November 2009 - 05:01 PM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1