Several Easy Questions

how to get the year in delphi? Only Year
Time--Seconds,Min,hour?

what is the Difference between showmessage and MessageBox???
when you do Form1.ShowModal, does the form re-do the job in the FormLoad thing?
peritoXAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DavidBirch2dotComCommented:
0
DavidBirch2dotComCommented:
All the functions for Date and Time handling explained in Depth so you should find exactly what you need
http://www.delphibasics.co.uk/ByFunction.asp?Main=DatesAndTimes

A modal form will return a result, for example a message box is really a form, its a modal form as it can send back a responce - yes or no - the same with an input box

The messagebox function has more options, than the showmessage function

David
0
peritoXAuthor Commented:
dont see anything that gives the year only
does such function exist?
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

DavidBirch2dotComCommented:
I dont think so that list is very comprehensive,

you could put it into a string and then copy the last 4 characters ?

copy(string, length(string)-1,4)

(you may or may not need the -1 bit)

David
0
esoftbgCommented:
uses
  ...., DateUtils;

//........

var
  Y:   Word; // Integer;
begin
  Y := YearOf(Today);
end;

//........

var
  S:    string;
begin
  S := FormatDateTime(ss:mm:HH, Now);
end;

//........

  if (MessageDlg('Welcome to my Delphi application.  Exit now?', mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes) then
  begin
    MessageDlg('Exiting the Delphi application.', mtInformation, [mbOk], 0, mbOk);
    Close;
  end;

//........

    ShowMessage('Manchester, England, England ....')
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ChessoCommented:
ShowMessage() simply shows a string in a msgbox but MessageDlg can msgbox a string have an icon like mtWarning or mtInformation and have Ok/Cancel/Retry buttons etc on it and return values for each one so you know which was clicked.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.