📄 新建 文本文档.txt
字号:
Integer ls_year
String t
ls_year = 2006
t = mid(fill('鼠牛虎兔龙蛇马羊猴鸡狗猪',48),(mod(ls_year -1900,12)+13)*2 -1,2)
messagebox("",t)
//文件存取加密
Integer li_FileName,li_return
String t1,t2
//t1 = g_topassword ("abercrombie刘")
//t2 = g_getpassword (t1)
li_FileName = FileOpen("HHJJ.liu",LineMode!,Write!,LockWrite!,Replace!)
FileWrite(li_FileName,"abercrombie刘")
FileWrite(li_FileName,"王景爱刘辉")
//li_return = FileRead(li_FileName,t1)
//t2 = g_getpassword (t1)
//messagebox(String(li_return),t2)
FileClose(li_FileName)
点击小球时让其动起来的动画用timer事件来做,在窗口的timer事件中做循环,来依次播放做好的几幅图片,在open()中定义的timer用来指定时间间隔
播放声音
FUNCTION ulong sndPlaySound(ref string lpszSoundName,ulong uFlags) LIBRARY "winmm.dll" ALIAS FOR "sndPlaySoundA"
18.如何播放音乐?
利用"winmm.dll"(在windows\system"下,).
声明:function boolean sndplaysounda(string fname,uint flag) library "winmm.dll"
语句执行sndplausounda("wavfilename",1)
通过控制sleep函数的参数值来控制小球行走速度
按钮单击事件
win_main L_WIN_Parent
L_WIN_Parent = this.GetParent( )
//L_WIN_Parent.x = 1102
//L_WIN_Parent.y = 328
L_WIN_Parent.set_alpha(0)
L_WIN_Parent.show()
Integer i
for i = 0 to 255 step 4
L_WIN_Parent.set_alpha(i)
end for
//messagebox("",String(L_WIN_Parent.x) + " " + String(L_WIN_Parent.y))
//for i = 0 to 50 step 5
//// sleep(10)
//if L_WIN_Parent.width >= 3000 then
// return
// end if
// L_WIN_Parent.width = L_WIN_Parent.width + i
//
//end for
//
使用动画鼠标指针
尽管在PB的帮助中没有提到,实际上在PB中时可以使用动画鼠标指针的,只需指定路径和文件名即可,例如: st_1.Pointer = "c:\windows\cursor\hourglas.ani"
在Response窗口中使用Menu
PB中Response窗口不能直接放置Menu,但我们可以通过脚本来实现,在窗口的OPEN事件中加入:This.changemenu(m_test)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -