Quick Tutorial
Create a new Application Project. Project->New Project->Application->OK.
Drop a TMemo and a TButton in the form. Select the TMemo and set the Scrollbars style to ssAutoVertical. Set the caption of the TButton to "Capitalize it !". Double click the button. Then write the following:
procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Text := UpperCase(Memo1.Text); end;
Run It
Press F9 (Run->Run). Enter some text in the memo and then click the button.Concept
Well it is easy! Just find out what you want to capitalize and then use the Uppercase() function to capitalize it. The function comes from sysutils unit.For example,
uses ..., sysutils, ...; ... begin Caption := Uppercase('John Doe'); end;
The above function will set the form's caption as JOHN DOE.
So the syntax is:
function UpperCase( const s: ):;
It will return the uppercase/capitalized version of s. You can capitalize letters, words, sentences etc.
Download source zip
Download the sample source code zip file from here: http://db.tt/lKVYnRYcOr from here: http://bit.ly/111WGlk
Size: 518 KB
The zip file contains executable EXE file.