Page 1 of 1
Borland Delphi 7, help me out
Posted: Fri Feb 15, 2008 10:13 pm
by Jdogg
i have been using vb.net for too long.
i dont wanna do c#
so i chose delphi 7
could someone tell me simple things like
msgbox
DIM statement
IF statement
thanks!
Posted: Sat Feb 16, 2008 3:25 am
by bcnipod
why don't you do Java or another C language?
Posted: Sat Feb 16, 2008 9:06 am
by LuxuriousMeat
Message box:
Code: Select all
MessageBox(handle, 'Message Text', 'Message Title', MB_Type or MB_Icon);
Valid options for MB_Type:
Code: Select all
MB_OK
MB_OKCANCEL
MB_ABORTRETRYIGNORE
MB_YESNOCANCEL
MB_YESNO
MB_RETRYCANCEL
Valid options for MB_Icon:
Code: Select all
MB_ICONERROR
MB_ICONQUESTION
MB_ICONWARNING
MB_ICONASTERISK
You don't need the "or MB_Icon" part but if you want you can use of those icons.
If:
If <Condition> Then
begin
//code here
end;
Example:
Code: Select all
If 1 = 1 Then
begin
MessageBox(handle, '1 = 1', '', MB_OK);
end;
Declaring variables:
Put this outside of any 'begin'.
Example:
Code: Select all
var x: Integer;
begin
x := 1;
If x = 1 Then
begin
MessageBox(handle, 'x = 1', '', MB_OK);
end;
end;
Here's an example of putting it all together:
Code: Select all
var
x: Integer;
msg: PChar;
begin
x:= 1;
If x = 1 Then
begin
msg := 'x = 1';
MessageBox(handle, msg, '', MB_OK);
end;
end;
If this doesn't help then visit these links:
MessageBox:
http://delphi.about.com/od/windowsshell ... 02003b.htm
If
http://www.delphibasics.co.uk/RTL.asp?Name=If
Declaring variables
http://www.modelmakertools.com/articles ... l-var.html
Posted: Sat Feb 16, 2008 2:30 pm
by Jdogg
thanks