• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 4 رای - 2.5 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: VB6 Writing text to a picture box
حالت موضوعی
#1
با سورس زیر میتونید داخل یه عکس متن مورد نظر خودتون رو بنویسید.
کد:
Option Explicit
Private Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
End Type

Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hDC As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
Private Const DT_WORDBREAK = &H10
Public By: Parsicoders.com

'usage
Dim rct As RECT





Private Sub Command1_Click()
DrawText Picture1.hDC, Text1.Text, -1, rct, DT_WORDBREAK
End Sub

Private Sub Form_Load()

Picture1.ScaleMode = vbPixels
With rct
    .Left = 0
    .Right = Picture1.ScaleWidth
    .Top = 0
    .Bottom = Picture1.ScaleHeight
End With

End Sub
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
 
پاسخ
  


پرش به انجمن:


Browsing: 1 مهمان