• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

Getting started with Delphi

Any advice on how to get started in Delphi? I do alot of .Net - C#, VB.Net. Have done some Java. I don't even know what IDE to use. Thanks.
0
seinc
Asked:
seinc
5 Solutions
 
D-MasterCommented:
0
 
Mohammed NasmanSoftware DeveloperCommented:
start with Delphi 2006, so you could work with native Delphi win32 compiler and .Net too, beside the C# builder which included in Delphi 2006 IDE

to start work with D2006, here are few links to help you get started

Delphi Basics
http://www.delphibasics.co.uk/

Learning Delphi Online
http://delphi.about.com/od/beginners/a/delphionline.htm

Delphi land
http://www.festra.com/eng/les01.htm
0
 
Scay7Commented:
Now heres a interesting question, well every person here probably got started on delphi by just messing around with it.

For information on how to do stuff in delphi just search google on the function or search for the information in the standard delphi help file, they are well documented and have loads of example to work off of. A book like Dummies for Delphi?

Other wise if the question is to difficult just ask away here on EE where there are millions of people, and im sure 1 of them knows how to solve your problem.

As for which Delphi Version to use id suggest "Delphi 7 Enterprise" no idea why well mabey cause 7 is my lucky number :P

Peace Scay7

PS welcome to the delphi world, the best dam place in da universe...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
CodedKCommented:
Hi Seinc.

First i'd like to say that i agree with Scay7. Use Delphi 7 (Enterprise or not).
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Now... About your question. Start like everyone started :P

Create a folder. You are going to save your files in there.
Open Delphi.

The left window is Object inspector. There you can find a property named 'Caption' write this : 'Hi'.
Now look at the menu, click the button icon and now click on the form. (You just created a button !)
Double click the button and write:

ShowMessage('Hello world');

Now click the save button and then the play button.!!!

Thats the way everybody started. :P
Hope you find this usefull.
0
 
Scay7Commented:
I think for my self that D7 is da best cause its a good upgrade from D1-6 without the wierdness that 2005 2006 has never mind all the wierd things that come with it, but thats my opi.

Heres my first program that i wrote...

Open up delphi youll be presented with 4 main windows

The one that starts with

unit Unit1;

interface

uses

is the coding window, where all code will be written

The very big looking grey window that has lots of dots on it is called the FORM, this is where youll design how you program will look like

The one on the LEFT of that is the Object inspector, where all quick settings are made to the thingy majigies

The one on the TOP is the components, where all pre built program/functions/procedures are built into (button like) objects (very cool reason why i love delphi so much)


K now on the top where those components are look for : STANDARD
hover your mouse over the little pictures untill you see something called * Memo(stdctrls) *
Click on that
Now click on that grey window where all the dots are...
You should see a white smalish window being placed

Go back to that STANDARD and look for something called * button(stdctrls) *
do the same thing as with the Memo
and place it next to the white box(memo)

Now add another button just underneath the first you that you placed doing the same thing as you did with the first one

Its that big grey area you should have something looking like this

_______________________________________________
|                                                                                |
|                                _________________                  |
|     ________            | memo1                 |                 |
|    | button1 |           |                             |                 |
|     -----------            |                             |                 |
|    | button2 |           |                             |                 |
|     -----------            |                             |                 |
|                               |                             |                 |
|                               |                             |                 |
|                                ------------------------                  |
|                                                                     ____     |
|                                                                    ||/_/|    |
|                                                                     -----     |
_______________________________________________

K now on that same place where STANDARD is look for something called DIALOGS
Then hover your mouse over the icons and look for something called * Opendialogs(Dialogs) *
clck on that and place it anywhere on the grey part...

...NOW FOR THE CODING...

this part i love... double click anywhere on the grey are where the dots are
you should see something like this being created...

procedure TForm1.FormCreate(Sender: TObject);
begin
memo1.Clear;
opendialog1.Execute; //<-- starting a dialog to interact with you to select a file
memo1.Lines.LoadFromFile(opendialog1.FileName)  //<-- and with the selected file opens/reads the contents to the    
                                                                           //      memo and pastes it...
end;

Well not the code that is inside that is, just copy the inside part of thise one and paste it into yours


Now on the button1 double click it and this should have been created...

procedure TForm1.Button1Click(Sender: TObject);
var
done, lines : string;        //<-- declearing var's
f : textfile;                      
begin
memo1.Clear;
assignfile(f,opendialog1.FileName);  //<-- getting ready to open a file from that box that you selected
reset(f);
  while not eof(f) do
  begin
  readln(f,lines); //<-- reads the file 1 line at a time until there are no more line to read
  done := StringReplace(lines,' ','.',[rfReplaceAll]);  //<-- while reading those line searchs for " " (a space)
  memo1.Lines.Add(done)                                     //      and replaces it with a "." (dot)
  end;
closefile(f);  //<-- always make sure you close the file once youre finished with it...
end;

Ye yours should look empty but just copy everything from Var to closefile(f); and insert it into yours


Now double click the second button, and add the following...

procedure TForm1.Button1Click(Sender: TObject);
begin
close;   //<--- so that we can close the program
end;


Well that was my first program, hope it helps you :PP in some strange way...

Peace Scay7
0
 
CodedKCommented:
:O ... You started with that ?
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now