Re: [VB6 ] 有邊框的字體

看板Visual_Basic作者 (rabbit)時間18年前 (2007/01/09 20:17), 編輯推噓1(102)
留言3則, 2人參與, 最新討論串3/3 (看更多)
※ 引述《fumizuki (矇面加菲獅)》之銘言: : ※ 引述《Berger927 (rabbit)》之銘言: : : 我用 picture.print 輸入文字,但我想讓字體有邊框,我該怎摸做? : : 我不想上下左右來回移動個8次貼圖,因為我放在迴圈中,資源會吃的太兇。 : : 不知道有沒有比較快速的方法達成這個效果? : : 在此先謝過~ ^^ 哎呀,應該是我沒說清楚,您誤會我的意思了... 不過還是很感激您的熱心,謝謝! 我是希望沿著字邊的外圍出現,而不是正方形圍著一個字。 我原先的寫法是這樣,希望您能看的懂我想表達的意思。 Private Tmp As Long Private Sub PrintStr(Str As String, Xx As Integer, Yy As Integer, Color As Long) Tmp = ColorN(Color) 'ColorN為計算出Color的互補色Function Call PrintText(Str, Xx - 1, Yy, Tmp) '背景字框 Call PrintText(Str, Xx + 1, Yy, Tmp) Call PrintText(Str, Xx, Yy - 1, Tmp) Call PrintText(Str, Xx, Yy + 1, Tmp) Call PrintText(Str, Xx - 1, Yy - 1, Tmp) Call PrintText(Str, Xx + 1, Yy + 1, Tmp) Call PrintText(Str, Xx + 1, Yy - 1, Tmp) Call PrintText(Str, Xx - 1, Yy + 1, Tmp) Tmp = Color Call PrintText(Str, Xx, Yy, Tmp) '前景字 End Sub Private Sub PrintText(Str As String, Xx As Integer, Yy As Integer) TempPic.Refresh '我把文字繪在TempPic裡面 TempPic.CurrentX = Xx * 15 TempPic.CurrentY = Yy * 15 TempPic.Print Str TempPic.Picture = TempPic.Image End Sub -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.104.178.98

01/09 21:09, , 1F
我連這樣的程式都不會寫 囧a
01/09 21:09, 1F

01/09 21:10, , 2F
所以我也想不到更好的方法*_*
01/09 21:10, 2F

01/09 21:16, , 3F
真覺得美工會整死程設人... 0rz
01/09 21:16, 3F
文章代碼(AID): #15euVVlj (Visual_Basic)
討論串 (同標題文章)
文章代碼(AID): #15euVVlj (Visual_Basic)