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!
Borland Delphi 7, help me out
- LuxuriousMeat
- Posts: 824
- Joined: Thu Nov 03, 2005 6:43 pm
- Location: zzzzzzzzzzzzzzzz
- Contact:
Message box:
Valid options for MB_Type:
Valid options for MB_Icon:
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:
Declaring variables:
Put this outside of any 'begin'.
Example:
Here's an example of putting it all together:
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
Code: Select all
MessageBox(handle, 'Message Text', 'Message Title', MB_Type or MB_Icon);
Code: Select all
MB_OK
MB_OKCANCEL
MB_ABORTRETRYIGNORE
MB_YESNOCANCEL
MB_YESNO
MB_RETRYCANCEL
Code: Select all
MB_ICONERROR
MB_ICONQUESTION
MB_ICONWARNING
MB_ICONASTERISK
If:
If <Condition> Then
begin
//code here
end;
Example:
Code: Select all
If 1 = 1 Then
begin
MessageBox(handle, '1 = 1', '', MB_OK);
end;
Put this outside of any 'begin'.
Code: Select all
var varName: Type;
Code: Select all
var x: Integer;
begin
x := 1;
If x = 1 Then
begin
MessageBox(handle, 'x = 1', '', MB_OK);
end;
end;
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;
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