#ifdef __FB_WIN32__
# define unicode
# include once "windows.bi"
#endif
const LANG = "Chinese"
dim helloworld as wstring * 20 => "你好,世界!"
print """Hello World!"" in "; LANG; ": "; helloworld
#ifdef __FB_WIN32__
messagebox( 0, helloworld, """Hello World!"" in " & LANG & ":", MB_OK )
#endif
2010年12月21日 星期二
freebasic秀一張圖
事先準備一張p1.bmp圖檔
Screen 18, 32
Cls
BLoad "p1.bmp"
Sleep
秀一張48x48的圖
ScreenRes 320, 200, 32
Dim myImage As Any Ptr = ImageCreate( 48, 48 )
BLoad "48.bmp", myImage
Put (10,10), myImage
ImageDestroy( myImage )
Sleep
Screen 18, 32
Cls
BLoad "p1.bmp"
Sleep
秀一張48x48的圖
ScreenRes 320, 200, 32
Dim myImage As Any Ptr = ImageCreate( 48, 48 )
BLoad "48.bmp", myImage
Put (10,10), myImage
ImageDestroy( myImage )
Sleep
畫圓
' 設定 640x480 顯示模式, 256 colors
Screen 18
' 畫圓
Circle (320, 240), 200, 15
' 畫橢圓並填色
Circle (320, 240), 200, 2, , , 0.2, F
' 畫一個弧
Circle (320, 240), 200, 4, 0.83, 1.67, 3
Sleep
Screen 18
' 畫圓
Circle (320, 240), 200, 15
' 畫橢圓並填色
Circle (320, 240), 200, 2, , , 0.2, F
' 畫一個弧
Circle (320, 240), 200, 4, 0.83, 1.67, 3
Sleep
訂閱:
文章 (Atom)