I click on a button to activate the dialog and if transparent is in the define dialog the program runs through the oRadMenu and excutes some of the oRadMenu
functions. After running the functions the dialog occurs and the color and paint perfect. It seems that the transparent causes each oRadmenu item to paint and execute amenuchoice().
Need to be able to stop this from happening.
Using Harbour FWH 2009
- Code: Select all Expand view
DEFINE DIALOG oDlg1 RESOURCE "newReports" OF oWnd1 font ofont7 title cTitle transparent
REDEFINE RADIO oradmenu var rchoice1 ID 121,99,101,102,103,104,105,106,108,;
107,110,111,123,124,118,112,113,114,115,116,119,117,122,125,126,127 ;
OF oDlg1 on click(AMENUCHOICE(rchoice1,ODLG1), rchoice1 := 1,odlg1:refresh(),oDlg1:setFocus(),.t.)
REDEFINE BUTTON ID 4002 OF oDlg1 ACTION (oDlg1:End()) //,iif(mvar,ofld:restore(),mvar := .f.))
REDEFINE BUTTON ID 4003 OF oDlg1 ACTION (setcalc(),quickprint(),printmenu())
REDEFINE BUTTON ID 100 OF oDlg1 ACTION (neworder(1))
ACTIVATE DIALOG oDlg1 centered on init(oDlg1:setfocus(),oDlg1:refresh()) on paint GradPaint2(hdc,oDlg1)
function amenuchoice(rchoice1,oDlg1)
local nNumber := 0
local cAccount
local cAmount
local cTitle
if !isALIAS("company")
use company alias company new
endif
if company->series500 == 1
gl->(dbseek("9801"))
gl->a1 := 0
gl->(dbseek("0125"))
gl->a14 := 1
endif
if rchoice1 == 2
setcalc()
setminbal(1)
endif
if rchoice1 == 3
setcalc()
plbrow(.t.)
endif
if rchoice1 == 4
setcalc()
plqtr()
select gl
endif
if rchoice1 == 5
setcalc()
select tot
total(2)
select gl
endif
if rchoice1 == 6
setcalc()
genesis2()
endif
if rchoice1 == 7
setcalc()
select tot
set filter to
set order to 1
clentot()
cftotal(1)
cfqtr()
select gl
endif
if rchoice1 == 8
setcalc()
select tot
cftotal(0)
select gl
endif
if rchoice1 == 9
setcalc()
indirect(.t.)
endif
if rchoice1 == 10
setcalc()
balbrows()
endif
if rchoice1 == 11
setcalc()
paywin()
endif
if rchoice1 == 12
setcalc()
termbrow(1)
endif
if rchoice1 == 13
setcalc()
termbrow(2)
endif
if rchoice1 == 14
anote->(dbsetorder(2))
notepad2()
endif
if rchoice1 == 15
setcalc()
cursorwait()
comparepl()
cursorArrow()
endif
if rchoice1 == 16
setcalc()
goforward := .F.
bsenter(.F.)
if goforward == .T.
plan2actual(.t.)
endif
endif
if rchoice1 == 17
compplqtr()
endif
if rchoice1 == 18
setcalc()
ratiospread()
endif
if rchoice1 == 19
setcalc()
breven()
endif
if rchoice1 == 20
setcalc()
ratio(.f.,.t.)
endif
// sale by prod 20
// sale by vs actual 21
if rchoice1 == 21
setcalc()
pikprodmth()
endif
if rchoice1 == 22
setcalc()
goforward := .F.
bsenter(.T.)
if goforward == .T.
plan3actual(.t.)
endif
endif
if rchoice1 == 23
setcalc()
banker1()
endif
if rchoice1 == 24
setcalc()
goforward := .T.
fivecol()
endif
if rchoice1 == 25
setcalc()
goforward := .T.
ratioNew()
endif
if rchoice1 == 26
setcalc()
goforward := .T.
bsActPlan()
endif
rchoice1 := 1
return nil