Page 1 of 1

Express++ Outlookbar Sample Program

Posted: Fri Feb 27, 2015 3:22 pm
by unixkd
Hi Roger/ All,

I want to use the features of the sample OUTLOOKBAR in my application, but the sample MAIN.PRG is written in pure Xbase++. Could you pls write the sample in Express++ using DCREAD GUI ....

Thanks.

Joe

Re: Express++ Outlookbar Sample Program

Posted: Fri Feb 27, 2015 7:22 pm
by rdonnay
That took me 5 minutes to do that.
Really? You didn't have 5 minutes of free time?

Code: Select all

FUNCTION Main()

LOCAL aMenuItems, aButtons, oDlg, oOutlookBar, nEvent, oXbp, mp1, mp2, ;
      GetList[0], GetOptions

PUBLIC aKillMnuItm := {}

USE TAXMNU INDEX TAXMNU1 VIA 'DBFNTX' ALIAS 'SysMnu' NEW
USE TAXKEY INDEX TAXKEY1 VIA 'DBFNTX' ALIAS 'SysKey' NEW

aMenuItems := LdMnuStr( 'TAX' )

SYSMNU->(dbCloseArea())

aButtons := { ;
   { 'Accounts Payable', 'AccountsPayable.Exe', '', 'calendar.bmp' }, ;
   { 'Technical Support', 'http://www.bmsi-fund.com/BMSI-support.aspx', '', 'design.bmp' }, ;
   { 'Payroll 2000', 'Payroll2000.exe', '', 'display.bmp'  }, ;
   { 'Cash Receipts', 'CashReceipts.Exe', '', 'copyclip.bmp' }, ;
   { 'Google Search', 'http://www.google.com', '', 'colorset.bmp' }, ;
   { 'Payroll 2000', 'Payroll2000.exe', '', 'display.bmp'  }, ;
   { 'Snyffle', 'http://snyffle.com', '', 'expicon.bmp' }, ;
   { 'Taxes && Utilities', 'TAXESANDUTILITIES.Exe', '', 'dialog.bmp' }, ;
   { 'Notepad', 'Notepad.Exe', '', 'editmemo.bmp' } }

/*
oDlg := DC_XbpDialog1():new(,,{100,100},{1000,800})
oDlg:title := 'BMSI Outlook Bar Test Program'
oDlg:taskList := .t.
oDlg:create()

oOutlookBar := OutlookBar():new( oDlg )
oOutlookBar:menuArray := aMenuItems
oOutlookBar:buttonArray := aButtons
oOutlookBar:create()
*/

DCGETOPTIONS ;
   WINDOWWIDTH 1000 ;
   WINDOWHEIGHT 800 ;
   WINDOWROW 100 ;
   WINDOWCOL 100

DCREAD GUI TITLE 'BMSI Outlook Bar Test Program' ;
   OPTIONS GetOptions ;
   EVAL {|oDlg|oOutlookBar := OutlookBar():new( oDlg ), ;
               oOutlookBar:menuArray := aMenuItems, ;
               oOutlookBar:buttonArray := aButtons, ;
               oOutlookBar:create()}

/*
DO WHILE nEvent # xbeP_Close
  nEvent := AppEvent( @mp1, @mp2, @oXbp, .1 )
  IF nEvent > 0
    oXbp:handleEvent(nEvent,mp1,mp2)
  ENDIF
ENDDO
*/

RETURN nil

Re: Express++ Outlookbar Sample Program

Posted: Wed Mar 04, 2015 2:41 am
by unixkd
Hi Roger,

1. I need to place the Outlookbar on a STATIC object and pass the object to OutlookBar():new( oPanelStatic ) as shown below instead of the dialog object that way I will be able to place the outlookbar in any place on a form.

2. The OUTLOOKBAR class coordinates are in PIXEL, I would which to have them in DEC.

3. After modifications, the outlook sample no longer work well.

Thanks.

Joe

FUNCTION Main()

LOCAL aMenuItems, aButtons, oDlg, oOutlookBar, nEvent, oXbp, mp1, mp2
Local Getlist[0], GetOptions
PUBLIC aKillMnuItm := {}

USE TAXMNU INDEX TAXMNU1 VIA 'DBFNTX' ALIAS 'SysMnu' NEW
USE TAXKEY INDEX TAXKEY1 VIA 'DBFNTX' ALIAS 'SysKey' NEW

aMenuItems := LdMnuStr( 'TAX' )

SYSMNU->(dbCloseArea())

aButtons := { ;
{ 'Accounts Payable', 'AccountsPayable.Exe', '', 'calendar.bmp' }, ;
{ 'Technical Support', 'http://www.bmsi-fund.com/BMSI-support.aspx', '', 'design.bmp' }, ;
{ 'Payroll 2000', 'Payroll2000.exe', '', 'display.bmp' }, ;
{ 'Cash Receipts', 'CashReceipts.Exe', '', 'copyclip.bmp' }, ;
{ 'Google Search', 'http://www.google.com', '', 'colorset.bmp' }, ;
{ 'Payroll 2000', 'Payroll2000.exe', '', 'display.bmp' }, ;
{ 'Snyffle', 'http://snyffle.com', '', 'expicon.bmp' }, ;
{ 'Taxes && Utilities', 'TAXESANDUTILITIES.Exe', '', 'dialog.bmp' }, ;
{ 'Notepad', 'Notepad.Exe', '', 'editmemo.bmp' } }

@ 0,0 DCSTATIC TYPE XBPSTATIC_TYPE_TEXT SIZE 10,10 OBJECT oPanelStatic COLOR COLOR_GREEN

DCGETOPTIONS;
NORESIZE

/*
DCGETOPTIONS ;
WINDOWWIDTH 1000 ;
WINDOWHEIGHT 800 ;
WINDOWROW 100 ;
WINDOWCOL 100
*/
DCREAD GUI TITLE 'BMSI Outlook Bar Test Program' ;
OPTIONS GetOptions ;
EVAL {|oDlg|oOutlookBar := OutlookBar():new( oPanelStatic ), ;
oOutlookBar:menuArray := aMenuItems, ;
oOutlookBar:buttonArray := aButtons, ;
oOutlookBar:create()}

RETURN nil

Re: Express++ Outlookbar Sample Program

Posted: Wed Mar 04, 2015 6:54 am
by rdonnay
This is not an eXpress++ support issue.
You are asking me to do special programming for you.
I charge other customers my normal hourly rate for this.
They are probably wondering why I do this for you for free.
I am wondering this too. :doh: