Code

#USING System.Windows.Forms

FUNCTION Start() AS VOID

LOCAL oWin := Form{} AS Form

LOCAL oMainMenu := MainMenu{} AS MainMenu

LOCAL oMenuFile := MenuItem{} AS MenuItem

LOCAL oMenuHelp := MenuItem{} AS MenuItem

LOCAL oMenuFile1:= MenuItem{} AS MenuItem

LOCAL oMenuFile2:= MenuItem{} AS MenuItem

LOCAL oMenuFile3:= MenuItem{} AS MenuItem

LOCAL oMenuFile4:= MenuItem{} AS MenuItem

LOCAL oMenuHelp1:= MenuItem{} AS MenuItem

LOCAL oMenuHelp2:= MenuItem{} AS MenuItem

LOCAL oMenuHelp3:= MenuItem{} AS MenuItem

 

oMenuFile:Text := "File "

oMenuHelp:Text := "Help "

// File Menu Items

oMenuFile1:Text := "Open... Ctrl O "

oMenuFile2:Text := "Print Setup... "

oMenuFile3:Text := "Send... "

oMenuFile4:Text := "Exit Alt F4"

// Help Menu Items

oMenuHelp1:Text := "Index F1 "

oMenuHelp2:Text := "Using Help "

oMenuHelp3:Text := "About "

//Add Top Level menu items

oMainMenu:MenuItems:Add(oMenuFile)

oMainMenu:MenuItems:Add(oMenuHelp)

//Add menu items to File Menu

oMenuFile:MenuItems:Add(oMenuFile1)

oMenuFile:MenuItems:Add(oMenuFile2)

oMenuFile:MenuItems:Add(oMenuFile3)

oMenuFile:MenuItems:Add(oMenuFile4)

//Add items to Help Menu

oMenuHelp:MenuItems:Add(oMenuHelp1)

oMenuHelp:MenuItems:Add(oMenuHelp2)

oMenuHelp:MenuItems:Add(oMenuHelp3)

// Bind the MainMenu to oWin.

oWin:Menu := oMainMenu

oWin:Text:="Vulcan.net First SDI Window Project"

oWin:StartPosition:= FormStartPosition.CenterScreen

oWin:ShowDialog()

RETURN

 

 Print  
Copyright 2012 GrafX Software DevelopmentTerms Of UsePrivacy Statement     Login