你看这样好不好,不过要有一个有窗口控件辅助实现(还有其他方法,不过这个容易实现一点):
APIs声明:
Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long常量声明:
Private Const SRCCOPY = &HCC0020 ' (DWORD) dest = source用一个CommandButton按钮作为辅助控件,在Caption输入你要显示的字体和文字Dim hButtonDC as long hButtonDC = GetWindowDC(cmdButton.hWnd)dim x as long, y as long,cx as long,cy as longx=0:y=0
cx =cmdButton.Width/screen.TwipsPerPixelX
cx =cmdButton.Height/screen.TwipsPerPixelYBitBlt Picture1.hDC,x,y,cx,cy,hButtonDC,x,y,SRCCOPY;

解决方案 »

  1.   


    Public Declare Function DrawTextEx Lib "user32" Alias "DrawTextExA" (ByVal hDC As Long, ByVal lpsz As String, ByVal n As Long, lpRect As RECT, ByVal un As Long, lpDrawTextParams As DRAWTEXTPARAMS) As Long
    Public 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
    可以吧?
      

  2.   

    Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
      

  3.   

    griefforme(菠菜鱼汤)  的简单好使