I am new to program so I am following expert's foot steps but I am kinda lost here

 ShowMessage('Hello World');
 MessageBox(null,'Hello World'mb_OK(1));
ShowModal('Hello World');

I know it's not correct Delphi syntax.

What is the difference between the three


All I know is that I have used ShowMessage a lot and the message comes on a small form with OK button.

Which one of the above uses the API


Thank you for your time


a modal messagebox is one that blocks you cant perform any action in the main windows unless you close this messagebox

a non modal messagebox doesnt block you can close it any time you wish and can continue to work in the main window

a MessageBox is a generic form if you provide the HWnd parameter it can be Modal if you provide null (as you show ) it will be nonmodal

all will reach user32!messagebox or its internals

it should be prestty easy for you to check by setting a breakpoint

and this question of yours will also likely be closed as unclear or lacks basic understanding

Not the answer you're looking for? Browse other questions tagged or ask your own question.