Re: Analyze This

new topic     » goto parent     » topic index » view thread      » older message » newer message

I've tried to do this Matt. The code below does create different list boxes
bound/shroud and not bound/shroud on my computer. The bound/shroud is longer.

include win32lib.ew
global integer sx, sy, maxX, maxY, fs, cx, cy, sw, sh,
	heightHorScroll,widthVertScroll,widthFrame
global sequence charSize, fontType

global function ceil(object a)
	return floor(a) + 1
end function

global function tint(object a)
	return floor(a)
end function

    fontType = "Courier New"
    maxX = getSystemMetrics(SM_CXFULLSCREEN)
    maxY = getSystemMetrics(SM_CYFULLSCREEN)
    heightHorScroll = getSystemMetrics(SM_CYHSCROLL)
    widthVertScroll = getSystemMetrics(SM_CXVSCROLL)
    widthFrame = getSystemMetrics(SM_CXFIXEDFRAME)

    -- Scale font size to match screen resolution
    if maxX > 1200 then
    	fs = 14
    elsif maxX > 1000 then
    	fs = 12
    elsif maxX > 800 then
        fs = 11 -- font size
    elsif maxX > 640 then
        fs = 9
    else
    	fs = 8
    end if

    setFont(Screen, fontType, fs, Normal)
    charSize = getFontSize(Screen)

    cx = charSize[1]
    cy = charSize[2]
    
    sw = cx * 82 --+ 20
    sh = cy * 33 --+ 10

    sx = ceil((maxX - sw)/2)
    sy = ceil((maxY - sh)/2)
        
constant Main = create(Window,"ARE020-Cash Receipts Entry",
                       0,sx,sy+10,sw,sh,0)

constant    idList =
create(List,"",Main,4,cy*19-tint(cy/2),cx*80+4,cy*10,WS_SCROLLBARS)

WinMain(Main,Normal)    


new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu