When you start your Radasm IDE the first time you might find
some colors very weird compared to
Your VB IDE.
The first thing i did (as a VB programmer ) I changed the color scheme.
NOTE: All Screenshots are taken from my NT4.0 System. Radasm meanwhiles supports XP Style so if you
are using XP your IDE will look different.

From the Radasm IDE menu click &Options
then click &Colors and Keywords. You see this Dialog:

This &Option menu where you changed
some colors you can change editor font, helpmenus and almost
everything you need. You can also change the gridsize in your dialog editor, so it looks
as the
VB Dialog editor. See &Dialog Editor Options.
None of all those changes are needed, we can start right away with our 1st application
written in
pure assembler and you should be finished in 30 seconds:
FIRST STEP
First click &File and then &New Project or just hit SHIFT+Ctrl+N.

You will see this dialog:

Leave the radio buttons and the combobox alone
right now.
All you have to do is enter a program title (first textbox), then
add a description for your application (second textbox).
The path where Radasm will save the wizard created files and folders (third textbox).
As our template our choice will be DialogApp.tpl (fourth textbox)

Click next, next and finish.
Radasm created some (actually alot) of files for you and even two folders (the \res and
the \bak folder)
The main files you can see now in your project window.
Under this project window you have the property window.
Your Radasm project window should now look like this:

Now it s time to take a look at your Radasm
toolbar. You should find a
button called "go" (tooltip)

Click it to link your creation.
If you did everything correct, you should see then your first window popping up.
In pure assembler, without writing one line of code. Thats really RAD (rapid application
developement).

Now we have one empty ugly window.
Without going to look at assembler code or windows API itself you
can already do lots of modifications to this window thanks to this great Radasm editor.
Go ahead and open the dialog editor. It s just like in VB.
Except for some lill differences, but you will find them out soon, they dont matter
anyway.
To open it simple double click the Window.dlg in your project window.
You can place buttons, textboxes, shapes on your form and as soon
you hit Go! again your changed window will appear with your controls on it.
Of course they dont have any functions yet, and they are not even initilized (like in VB)
We do this in our second tutorial.
Note: If you place some CommonControls (example Richedit or DateTimePicker)
to your dialog, your program might wont appear anymore if you
Hit Go! Even if Radasm doesnt give you any errors while linking.
We will deal with this later (Tutorial #5), dont worry, everything is o.k.
You can change the dialogs caption and style, try to make it topmost -
You do all this in the property dialog of your window. Experiment a lill with the changes
you
can do. It s quite alot.
SECOND STEP
Our first task will be putting a pretty icon to our window.
Look for an icon and copy it to your project \ res folder. (Remember: Radasm created a
\res folder for you.)
Radasm is doing lots of work again for us so just sit back and relax.
First click &Project and then &Resource from the Radasm menu.
You see a dialog like this appear:

Click Add buttton to add a new resource
(our icon) to our
Project. We call this Icon IDC_ICON and give it the ID 500.
Now click the path button and look for the icon you copied into
Your \res folder. Choose this icon and click &open.
You should have a result like this. You can click OK to exit the resource dialog.

Now we have to insert some code.
But dont worry it s not much. In your project browser you see the files
Windows.asm and Windows.inc
We need to add a few lines to the first one and 1 single line to the second.
First the Windows.inc file. Double click it to open it.
You should see something like this

- We have to add a memory reservation for our icon,
- we call this variable hIcon, it s stored at the unintialised datasection
called
-
- .data ?
-
- so go ahead and type:
hIcon dd ?
;dd means declare dword, the question mark is cause we cant tell
it s size.
Now your Windows.inc looks like this:

Now double-click your Windows.asm file

Now we add 3 lines to our code, to get the icon actually showing on our
window.
- Just like in Visual Basics FORM LOAD in Windows API we use WM_INITDIALOG
- Here is where we have to write our lines:
[code]
invoke LoadIcon,hInstance,500 ;our first Win API loading icon to our created window
mov hIcon,eax ;the
result loaded is stored in the eax register, our first OPCODE mov puts it into the hIcon
variable.
invoke
SendMessage,hWin,WM_SETICON,NULL,hIcon ;our second WIN API
sets the loaded icon to our dialog
[/code]
Looks like this:

Hit Go once more to see the result (Radasm
autosaves your project as soon you link)
If you did any typos (hope not ) Radasm will give you errormessages in the output window
at the bottom:
Simple doubleclick to jump the line. Radasm highlights the line where it finds an error.
NOTE: Unlike Visual Basic here we are CASE SENSITIV.
If you ve done all correct, take a look at your first created assembler standalone .exe
file.
It s just 5kb big. (without icon propably just 2kb) This is really impossible to do in VB.
You can download the example from here.