乙個顯示彈幕的小程式

2021-07-23 23:20:09 字數 371 閱讀 1512

效果如圖,原始碼位址

視窗樣式指定ws_ex_topmost實現置頂(對於一些全屏程式不行,但是對於ppt夠用了)

指定ws_ex_transparent實現滑鼠穿透此視窗

指定ws_ex_layered並使用updatelayeredwindow繪製視窗實現視窗透明

以上樣式指定都在對話方塊資源編輯裡實現了

繪製彈幕使用了gdi+,為了效率先繪製到記憶體中的dc,以後直接用alphablend複製到目標dc就行

然後開幾個執行緒,乙個定時從伺服器獲取新彈幕,乙個更新彈幕位置,乙個渲染彈幕並顯示到螢幕上

實現乙個彈幕

html document 請選擇字型顏色 css div article section js 函式 let inputstr document.queryselector input let divele document.queryselector div let inputcolor doc...

乙個顯示選單的程式

建立這個程式的步驟 1 在命令列提示符後鍵入vi mymenu 這個命令啟動vi,並將程式命名為mymenu。2 在空白也出現後按i。這個命令切換到插入模式下工作。3 在空白頁上輸入如下的linux bin bash clear echo echo the telephone book echo e...

乙個java小程式

能讓阿拉伯數字讀成符合漢語語法和漢語習慣的中文.就這我 還做了一天呢 鬱悶.public class itcs string unit1 new string string unit2 new string string str args 0 string str 2 null system.out...