Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FiveWin 1.9.2 - January 97 - // fivewin - vbx visual basic controls management tutorial http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
// FiveWin - VBX Visual Basic controls management tutorial

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

   local oWnd, oVbx, oLbx
   local nGraphType := 2

   DEFINE WINDOW oWnd TITLE "Using VBXs with FiveWin"

   @ 2, 5 VBX oVbx SIZE 200, 195 ;
      FILENAME "Graph.vbx" ;
      ON CLICK MsgInfo( "Click" )

   oVbx:Set( "BottomTitle", "FiveWin power" )

   @ 2, 35 LISTBOX oLbx VAR nGraphType ITEMS { "" } ;
      SIZE 200, 200 ;
      COLOR "N/W" ;
      ON CHANGE ( oVbx:GraphType := nGraphType - 1,;
                  oVbx:DrawMode := 2 )

   @ 19, 5 BUTTON "&PrintOut" SIZE 80, 20 ;
      ACTION oVbx:HardCopy( 5 )

   @ 19, 20 BUTTON "&Set Data" SIZE 80, 20 ;
      ACTION ( oVbx:DataReset :=  1,; // 1 Data, 2 Colors, 3 Extra
               oVbx:QuickData := "20" + Chr(9) + "30" + Chr(9) + "40" + ;
                                 Chr(9) + "15" + Chr(9) + "50" + CRLF,;
               oVbx:AutoInc   :=  1,;
               oVbx:LabelText := "January",;
               oVbx:LabelText := "February",;
               oVbx:LabelText := "March",;
               oVbx:LabelText := "April",;
               oVbx:LabelText := "May",;
               oVbx:DrawMode  :=  2 )

   ACTIVATE WINDOW oWnd ;
      ON INIT ( oLbx:SetItems( oVbx:GetEnums( "GraphType" ) ),;
                oLbx:Select( 3 ) )

return nil

//----------------------------------------------------------------------------//

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson