Directions For Creating Form5.pbr (PowerBASIC Resource File) For Form5.Bas

An easy way to get a menu on a form/dialog, or to add a Dialog is to create a resource file as seen below.  If
you wish to run Form5.bas you have to do this as that program requires this resource file to be compiled
into the exe.

1) Open a new file in PowerBASIC and paste the following (you shouldn't have to do this part if you already
   have Form5.rc, and you should have it if you are reading this Readme.txt file, however, you do have
   to compile Form5.rc to Form5.res and Form5.pbr):

#include "resource.h"
#define IDM_OPEN        1000
#define IDM_SAVE        1002
#define IDM_EXIT        1004
#define IDM_SHOWDLG     2000
#define IDC_NAME        2100
#define IDM_HELP        3000

Form5 MENU
{
 POPUP "&File"
 {
  MENUITEM "&Open...",               IDM_OPEN
  MENUITEM "&Save...",               IDM_SAVE
  MENUITEM SEPARATOR
  MENUITEM "E&xit",                  IDM_EXIT
 }
 POPUP "O&ptions"
 {
  MENUITEM "Sho&w Dialog",           IDM_SHOWDLG
 }
 POPUP "&Help"
 {
  MENUITEM "&Help...",               IDM_HELP
 }
}

dlgBox DIALOG DISCARDABLE 30,90,340,40
STYLE WS_POPUP | WS_CAPTION | WS_DLGFRAME
CAPTION "What Do You Want To Do With Your Life?"
FONT 8, "MS Sans Serif"
BEGIN
  DEFPUSHBUTTON  "OK",IDOK,200,20,40,14
  PUSHBUTTON     "Cancel",IDCANCEL,145,20,40,14
  LTEXT          "In 80 Characters Or Less",IDC_STATIC,3,6,110,8
  EDITTEXT       IDC_NAME,85,4,250,12,ES_AUTOHSCROLL
END


2) Save file as Form5.rc;

3) Compile within PBEdit by clicking little gear or Compile
   from menu.  You'll quickly in succession be presented
   with two messages, the first informing you that Form5.res
   was successfully created, then that Form5.pbr was success-
   fully created;

4) Copy Form5.bas to another PBEdit 'New' window, and save
   in same folder/directory as Form5.rc;

5) Compile and run Form5.bas. 

