Code to Demonstrate 3D Panels In Clipper and FoxPro



SunShow MS-DOS 3D Panels and Buttons

do sunshow.prg

SET LIBRARY TO SUNPRO25.PLB

status = LoadSunVideo()
status = LoadSunFonts()

nfonthandle = loadstxfont("vsys14.ptx")
IF nfonthandle <0 ? "Could not load font file vsys14.ptx" return ENDIF nfontwidth="getfontwidth(nfonthandle)" nfontheight="getfontheight(nfonthandle)" nfhandle2="loadstxfont("sona24.ptx")" IF nfhandle2 < 0 ? "Could not load font file sona24.ptx" return ENDIF nStatus="FindVideoMode(640," 480, 16) IF nStatus < 0 ? "Could not set mode 640 x 480 x 16" return ENDIF status="draw3dbox(640," 2, 0, SUN_BWHITE, SUN_GREY, SUN_WHITE, 0, 0, 639, 479) status="draw3dbox(0," 1, 1, SUN_BWHITE, SUN_GREY, SUN_WHITE, 20, 20, 180, 220) status="sunsayxy(20+10," 20-4, nfonthandle, SUN_BLACK, SUN_WHITE, "", "Raised Group Box") status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 30+10, 20+20, 30+10+nfontwidth+4, 20+20+nfontheight) status="sunsayxy(30+40," 20+20+2, nfonthandle, SUN_BLACK, SUN_WHITE, "", "Item 1") status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 30+10, 20+40, 30+10+nfontwidth+4, 20+40+nfontheight) status="sunsayxy(30+40," 20+40+2, nfonthandle, SUN_BLACK, SUN_WHITE, "", "Item 2") status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 30+10, 20+60, 30+10+nfontwidth+4, 20+60+nfontheight) status="sunsayxy(30+40," 20+60+2, nfonthandle, SUN_BLACK, SUN_WHITE, "", "Item 3") status="sunsayxy(30+10+3," 20+60+1, nfonthandle, SUN_BLACK, 256, "", "x") status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 30+10, 20+80, 30+10+nfontwidth+4, 20+80+nfontheight) status="sunsayxy(30+40," 20+80+2, nfonthandle, SUN_BLACK, SUN_WHITE, "", "Item 4") status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 30+10, 20+100, 30+10+nfontwidth+4, 20+100+nfontheight) status="sunsayxy(30+40," 20+100+2, nfonthandle, SUN_BLACK, SUN_WHITE, "", "Item 5") status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 30+10, 20+120, 30+120, 20+120+nfontheight+2) status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 30+10, 20+140, 30+120, 20+140+nfontheight+2) status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 30+10, 20+160, 30+120, 20+160+nfontheight+2) status="draw3dbox(0," 1, 1, SUN_GREY, SUN_BWHITE, SUN_WHITE, 200, 20, 350, 220) status="sunsayxy(200+10," 20-4, nfonthandle, SUN_BLACK, SUN_WHITE, "", "Inset Group Box") status="DrawOutButton(6," 31, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "BUTTON1") status="DrawOutButton(9," 31, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "BUTTON2") status="DrawOutButton(12," 31, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "BUTTON3") status="DrawInButton(15," 31, 8, SUN_RED, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "BUTTON4") status="DrawOutButton(18," 31, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "BUTTON5") status="DrawOutButton(21," 31, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "BUTTON6") * Vertical separator bar status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 370, 20, 370, 220) status="draw3dbox(0," 1, 0, SUN_BWHITE, SUN_GREY, SUN_WHITE, 390, 20, 620, 90) status="sunsayxy(390+10-1," 50-1, nfonthandle, SUN_BWHITE, SUN_WHITE, "", "Raised panel with raised text") status="sunsayxy(390+10," 50, nfonthandle, SUN_BLACK, 256, "", "Raised panel with raised text") status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 390, 120, 620, 190) status="sunsayxy(390+10+1," 150+1, nfonthandle, SUN_BWHITE, 256, "", "Inset Panel with inset text") status="sunsayxy(390+10," 150, nfonthandle, SUN_BLACK, 256, "", "Inset Panel with inset text") * Horizontal separator bar status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 390, 220, 620, 220) * Horizontal separator bar status="draw3dbox(0," 1, 0, SUN_GREY, SUN_BWHITE, SUN_WHITE, 20, 245, 620, 245) status="draw3dbox(0," 2, 0, SUN_BWHITE, SUN_GREY, SUN_WHITE, 20, 270, 300, 400) status="draw3dbox(3," 1, 1, SUN_BWHITE, SUN_GREY, SUN_WHITE, 20+8, 270+8, 300-8, 400-8) status="sunsayxy(20+30," 300, nfonthandle, SUN_BLACK, SUN_WHITE, "", "Raised panel with raised frame") status="sunsayxy(20+30-1," 330-1, nfhandle2, SUN_BWHITE, SUN_WHITE, "", "Raised text") status="sunsayxy(20+30+1," 330+1, nfhandle2, SUN_GREY, 256, "", "Raised text") status="sunsayxy(20+30," 330, nfhandle2, SUN_BLACK, 256, "", "Raised text") status="draw3dbox(0," 2, 0, SUN_BWHITE, SUN_GREY, SUN_WHITE, 320, 270, 620, 400) status="draw3dbox(0," 1, 1, SUN_GREY, SUN_BWHITE, SUN_WHITE, 320+8, 270+8, 620-8, 400-8) status="sunsayxy(320+30," 300, nfonthandle, SUN_BLACK, SUN_WHITE, "", "Raised panel with inset frame") status="sunsayxy(320+30-1," 330-1, nfhandle2, SUN_GREY, SUN_WHITE, "", "Inset text") status="sunsayxy(320+30+1," 330+1, nfhandle2, SUN_BWHITE, 256, "", "Inset text") status="sunsayxy(320+30," 330, nfhandle2, SUN_BLACK, 256, "", "Inset text") status="draw3dbox(0," 2, 0, SUN_BWHITE, SUN_GREY, SUN_WHITE, 20, 415, 620, 455) status="DrawOutButton(54," 5, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "Button1") status="DrawOutButton(54," 14, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "Button2") status="DrawOutButton(54," 23, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "Button3") status="DrawInButton(54," 32, 8, SUN_RED, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "Button4") status="DrawOutButton(54," 41, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "Button5") status="DrawOutButton(54," 50, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "Button6") status="DrawOutButton(54," 59, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "Button7") status="DrawOutButton(54," 68, 8, SUN_BLACK, SUN_WHITE, SUN_BWHITE, SUN_GREY, SUN_BLACK, "Button8") editstr1="Edit field 1" status="sungetxy(30+10+2," 20+120+2, nfonthandle, SUN_BLACK, SUN_WHITE, "", @editstr1) editstr2="Edit field 2" status="sungetxy(30+10+2," 20+140+2, nfonthandle, SUN_BLACK, SUN_WHITE, "", @editstr2) editstr3="Edit field 3" status="sungetxy(30+10+2," 20+160+2, nfonthandle, SUN_BLACK, SUN_WHITE, "", @editstr3) status="sleep(20)" status="unloadfonts(nfonthandle)" status="unloadfonts(nfhandle2)" status="textmode()" set library to return 





Return to Technical Support, Notes, Tips, and Programming Page






Return to SunShow Professional Page






Return to SunShow Main