Looking for certain tutorial.

  • (2 Pages)
  • +
  • 1
  • 2

18 Replies - 688 Views - Last Post: 11 January 2012 - 03:35 PM Rate Topic: -----

#1 Psychonaut  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 11-January 12

Looking for certain tutorial.

Posted 11 January 2012 - 09:23 AM

Hello, im looking for tutorials that are not based off of using an IDE like visual studio or any for that matter, Im wanting to learn how to do everything manually , no drag n drop stuff. I would appreciate any help. Thank you
Is This A Good Question/Topic? 0
  • +

Replies To: Looking for certain tutorial.

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8937
  • View blog
  • Posts: 33,462
  • Joined: 12-June 08

Re: Looking for certain tutorial.

Posted 11 January 2012 - 09:26 AM

Are you looking for just a console app tutorial, or still GUI stuff?
Was This Post Helpful? 0
  • +
  • -

#3 negligible  Icon User is offline

  • D.I.C Regular

Reputation: 62
  • View blog
  • Posts: 302
  • Joined: 02-December 10

Re: Looking for certain tutorial.

Posted 11 January 2012 - 09:46 AM

Do you already know how to code? The whole point of object-orientated languages is to use Visual Development environments. Because coding all the GUI components manually would really hinder your learning in my opinion.

You can create controls manually in code for when you need dynamicly created controls... but otherwise there is no point. It's easy enough, you to keep testing your UI which takes up time.

You just call the object with a reference. Then you create a new instance of the object, the item will then be displayed.
TextBox tbNameEntry = new TextBox();
tbNameEntry.Text = "Text in this box"


You can set an objects properties in the overload. Such as in my ToolStripMenuItem example here.
var view = new ToolStripMenuItem(itemText, icon, view_Click);
This would create the control and then set it's text, icon and assign an event handler to it. You can check on the MSDN to see what overloads an object accepts, it also shows you in IntelliSense.

This post has been edited by negligible: 11 January 2012 - 09:46 AM

Was This Post Helpful? 1
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5436
  • View blog
  • Posts: 11,653
  • Joined: 02-June 10

Re: Looking for certain tutorial.

Posted 11 January 2012 - 10:07 AM

There is a massive amount of stuff done by the IDE. yeah, you can learn to code it by hand. But not at the same time as learning the language itself. It's just too much. You're talking about so many new concepts all at the same time that all have very specific relationships.

You might as well be saying... I want to learn how to build a jet aircraft, all of it from front to back, while at the same time learning English.

The end result is still the same: Lots of terms and gibberish being thrown at you and none of it making any sense.

Go ahead and just learn C# with an IDE to start with. Once you feel you have a good handle on the language (6 months minimum) - then start digging deeper into the files that Visual Studio keeps out of your hands for your own safety: Like the manifest. That way you can have properly formatted and working files to dismantle and learn from.

Let me say this though... It sounds like this is all VERY new to you. This type of thing is covered very early on in any self-teaching book. Which makes me think you really aren't ready to be designing an application yet.

Newbie/Rookie said:

I have a little programming experience but I need to write ...


You need to start there. I can't say "I have little experience in speaking Russian, but I have been assigned to write a mystery novel in Russian. Can you help me?"

We can help you by saying "First learn basic programming and the language of C#. Then take on assignments." Could someone here write this program for you? Sure. Could someone here map out all the processes you need to follow and do the Software Design part of this in the slim hope you could code it from there? Sure. But we don't volunteer to do the job that you're either getting paid for, or getting a grade for. You may want to read this.

For now, just work on the lessons. Do a self-teaching book from cover to cover. Then consider writing a program.

Don't try to create a useful working program to fit a need of yours (or a for-pay contract) as your introduction to coding project. When you are learning to code you don't know enough to code a program, let alone know how to engineer the architecture of a program. It would be like saying "I don't know how to read sheet music, or play an instrument. I think I'll write a 3 act opera as my first learning experience."

I don't say this to be mean. We've seen lots of new coders take this approach and we know it doesn't work. Trying to design your own programs before you understand the basics of the code language you've chosen just leads to problems, frustrations, and 'swiss-cheese' education (lots of holes).


Resources, references and suggestions for new programmers. - Updated Jan 2012
Spoiler

Was This Post Helpful? 0
  • +
  • -

#5 Robin19  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 267
  • View blog
  • Posts: 547
  • Joined: 07-July 10

Re: Looking for certain tutorial.

Posted 11 January 2012 - 10:13 AM

You also have to add it to your Controls object. And worry about Size and Position.

Java is close to C#. Learn how to do Java Swing in code. That was how I learned GUI. Then come back and say you don't want to use drag and drop IDE. I now spend my time writing and debugging code, not debugging positions and sizes.

Or you could try WPF. That is C# that has a separate xml-like file for the GUI. You will learn about placement, sizing, hooking up events, etc while getting to see it built live. Although the properties of each aren't 100% the same, you should learn enough to be able to manually build a WinForm GUI.
Was This Post Helpful? 0
  • +
  • -

#6 Psychonaut  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 11-January 12

Re: Looking for certain tutorial.

Posted 11 January 2012 - 11:21 AM

First of all , i appreciate the speedy replies and I appreciate your input. The reason I am asking this is because I feel like im not learning to the full extent when Visual studio is doing all the work for me. Im not a complete newb to the programming world but i am far from calling myself a programmer. I used to know Vb6 pretty well then i left the scence ( kids,wife and all that good stuff ) then i came back and they had the .net framework , I also know the basics of assembly , which is where my drive for programming comes from , I like to learn it strictley as a hobby , i enjoy making trainers ( editing the games memory to make it do what you want ) as well as making small things that me and the wife can use. But from i have read i guess i will just go along with the IDE for now, only reason i was asking is i checked a c# book out from the local library and i though it was awesome and the author sais "DO not use visual studio" and i thought it was cool making all that stuff happen from scratch, but like you guys say i can always come back to that. I guess im just trying to rush myself into it. again thanks for the comments
Was This Post Helpful? 0
  • +
  • -

#7 Curtis Rutland  Icon User is online

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4431
  • View blog
  • Posts: 7,702
  • Joined: 08-June 10

Re: Looking for certain tutorial.

Posted 11 January 2012 - 11:36 AM

Quote

and the author sais "DO not use visual studio"


That author is full of shit. Sorry for the strong words, but I've been in this industry for a while now, and there has absolutely never been a time where I've needed to compile my code outside of VS. VS is extremely helpful.

I'd compare it to another profession. Let's say there's a handy tool that lets a mechanic take all the lug nuts off a tire at once. The tool will literally be in every mechanic's shop everywhere (VS Express is free). Would you go and loosen each with a hand wrench? Would you give credence to the guy that tells you you should do it that way?

In the same way, VS is a productivity tool. It has it's own learning curve, but that's fine. There's so many ways it can make your life easier and more productive. I 100% suggest learning and using it. This isn't Java. The language was designed with the IDE in mind, since they're both 1st party products.
Was This Post Helpful? 1
  • +
  • -

#8 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2530
  • View blog
  • Posts: 4,631
  • Joined: 24-September 10

Re: Looking for certain tutorial.

Posted 11 January 2012 - 11:43 AM

I don't know about the author of the book you're referring to OP, but I'm not going to agree with him. Maybe he meant use another IDE like MonoDevelop or something, I'm not sure. Or maybe it was a C++ book, in which case their could be several rational reasons for suggesting not using VS.

Anyways, you can write your code with what ever text editor you'd like. And you can use the command line compiler to compile (you can also use the mono command line compiler).

Here's a starting point, there are related articles at the end that go into more detail.

http://msdn.microsof...y/78f4aasd.aspx

This post has been edited by lordofduct: 11 January 2012 - 11:55 AM

Was This Post Helpful? 0
  • +
  • -

#9 negligible  Icon User is offline

  • D.I.C Regular

Reputation: 62
  • View blog
  • Posts: 302
  • Joined: 02-December 10

Re: Looking for certain tutorial.

Posted 11 January 2012 - 11:46 AM

Robin I really think that is a pretty roundabout way of learning to code the GUI.

If you're using Visual Studio you can build the Form up how you want it to look, then open up the Form.designer.cs file and see exactly how the auto-generated code built it. This is what I did earlier in the week - I had to ask for some clarification, but all in all not that hard a concept (imo).

With background knowledge in C#, obviously.

This post has been edited by negligible: 11 January 2012 - 11:49 AM

Was This Post Helpful? 1
  • +
  • -

#10 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5436
  • View blog
  • Posts: 11,653
  • Joined: 02-June 10

Re: Looking for certain tutorial.

Posted 11 January 2012 - 12:02 PM

I agree with negligible 100%

Here's an easy way to look at it..

If you're looking for examples of the right/standard ways to do these things...
and Visual Studio is going to do all the behind-the-scenes work for you...
Doesn't that mean that Visual Studio is creating the examples you say you are looking?

You can therefore make your own examples starting with the simplest: Heres a form with a button.
And work your way up in complexity.
Was This Post Helpful? 0
  • +
  • -

#11 Psychonaut  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 11-January 12

Re: Looking for certain tutorial.

Posted 11 January 2012 - 12:16 PM

Well does visual studio generate something different than normally would be there? or is it exactley how it would be if you typed it yourself
Was This Post Helpful? 0
  • +
  • -

#12 negligible  Icon User is offline

  • D.I.C Regular

Reputation: 62
  • View blog
  • Posts: 302
  • Joined: 02-December 10

Re: Looking for certain tutorial.

Posted 11 January 2012 - 12:26 PM

Exactly the same.

the .designer.cs file is just a .cs file like any other, you can edit it and change the auto-generated code if you know what you are doing. It utilises a partial class of your Form.cs's class to connect the pages.

// .cs
public partial class Form1 : Form
    {
      <yourcode>
    }

// .designer.cs

    partial class Form1
    {
      <autogencode>
    }


The .designer.cs page is commented pretty well, have a look.

This post has been edited by negligible: 11 January 2012 - 12:30 PM

Was This Post Helpful? 0
  • +
  • -

#13 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2240
  • View blog
  • Posts: 9,411
  • Joined: 29-May 08

Re: Looking for certain tutorial.

Posted 11 January 2012 - 12:28 PM

View PostPsychonaut, on 11 January 2012 - 08:16 PM, said:

Well does visual studio generate something different than normally would be there? or is it exactley how it would be if you typed it yourself

It potentially could, depends on how you write your code.

Every control used in you application is created at runtime, they ain't magic.
Was This Post Helpful? 0
  • +
  • -

#14 Psychonaut  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 11-January 12

Re: Looking for certain tutorial.

Posted 11 January 2012 - 12:42 PM

well do you mean that their are many different ways to produce the same result? and thanks negligible your a great help
Was This Post Helpful? 0
  • +
  • -

#15 Robin19  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 267
  • View blog
  • Posts: 547
  • Joined: 07-July 10

Re: Looking for certain tutorial.

Posted 11 January 2012 - 12:54 PM

Yes, there are.

Imagine a control where
Location = new Point(10, 10); Padding = 3;
I can do the same thing by putting
Location = new Point(13, 13); Padding = 0;
I could also go
Location = new Point(0,0); Padding = 13
Or any other number of different ways once you understand that Location is where the control starts (with Point(0,0) being the upper left corner of the parent) and Padding is how much white space to surround itself with.

It's similar to other programming concepts, there are a usually several ways to skin your cat. You can iterate through a collection using a for loop, a foreach loop, a do/while loop, or a while loop. In the end it doesn't matter as long as you implemented it correctly.

This post has been edited by Robin19: 11 January 2012 - 12:54 PM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2