Error Upgrade From FWH115 To FWH1110

Re: Error Upgrade From FWH115 To FWH1110

Postby acwoo1 » Sun Nov 27, 2011 7:18 am

Thanks For Your Help

The wording in the buttons run with skinbuttons()

The prg:

#include "FiveWin.ch"

static oWnd

function Main()

local oFont
local obtn1

skinbuttons()

DEFINE FONT oFont NAME "Arial" SIZE 0, -22 BOLD
if !file("tax3.dbf")
createfilea()
endif

DEFINE WINDOW oWnd FROM 1, 1 TO 20, 70 ;
TITLE "Test"

@ 1.5, 1 BUTTON obtn1 PROMPT "Test1" OF oWnd ACTION test1() ;
SIZE 100, 24

SET MESSAGE OF oWnd ;
TO "WELCOME" CENTERED TIME DATE
ACTIVATE WINDOW oWnd MAXIMIZED

DEFINE FONT oFont NAME "Arial" SIZE 0, -11 BOLD
oFont:End()

return nil
*******************************************
function createfilea()

// "File : tax3.dbf"
tmpdbf:= {}
AAdd(tmpdbf, {"recnum1", "n", 5, 0})
AAdd(tmpdbf, {"recnum", "c", 8, 0})
AAdd(tmpdbf, {"desp", "c", 100, 0})
dbcreate("tax3.dbf", tmpdbf)
close
****************************
function test1()

#include "fivewin.ch"
local oDlg

mrecnum1 = 0
mrecnum = space(8)
mdesp = space(100)


if (Select("tax3") == 0)
use tax3 new
index on recnum to temp
else
select Select("tax3")
endif


DEFINE DIALOG oDlg FROM 0, 0 TO 26, 79 ;
TITLE "Test 1"

@ -0.361, -0.1 to 13.945, 44.714
@ -0.361, -0.1 to 12.545, 44.714

@ 0, 1 say "No."
@ 0.9, 1 say "Ref. No."
@ 1.8, 1 say "Desp"
@ 0, 6 get mrecnum1 OF oDlg SIZE 38, 11 picture "99999"
@ 1, 6 get mrecnum OF oDlg SIZE 100, 11
@ 2, 6 get mdesp OF oDlg SIZE 150, 11


@ 4, 0.4 LISTBOX oLbx FIELDS str(tax3->recnum1,5,0),;
tax3->recnum, tax3->desp ;
HEADERS "No", "Ref. No.", "Desp" ;
FIELDSIZES 40, 80, 390 ;
SIZE 307, 116 OF oDlg

@ 9.95, 18.7 BUTTON "&Save" OF oDlg SIZE 40, 12 ;
ACTION (test1a("2"), oLbx:Refresh())
@ 9.95, 25.7 BUTTON "&Exit" OF oDlg SIZE 40, 12 ;
ACTION ( lreturn := .t., oDlg:End())

ACTIVATE DIALOG oDlg CENTERED
close databases
return nil
************************************************
function test1a()

parameter Newedit

local oDlg
local oFont
local oLbx
local lreturn := .f.
local oc1desp
local time1:= 1
local newref1:= "N"

DEFINE FONT oFont NAME "Arial" SIZE 0, -11 BOLD

select tax3
append blank
onerror("APPEND")
replace recnum1 with mrecnum1
replace recnum with mrecnum
replace desp with mdesp
goto top
return nil
********************************************
function ONERROR

parameters errortype
errortype:= Upper(errortype)
do case
case errortype == "RLOCK"
if (RLock())
return .T.
endif
do while (!RLock())
InKey(3)
enddo
case errortype == "APPEND"
if (!neterr())
onerror("RLOCK")
return .T.
endif
do while (neterr())
InKey(3)
append blank
enddo
onerror("RLOCK")
endcase
return .T.

********************************

Please help

Regards
Eddy
Using FWH1111+bcc582
acwoo1
 
Posts: 173
Joined: Tue Nov 10, 2009 10:56 am

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 83 guests