求助:form_load 时能执行但放到command_click没反应VB codePrivateDeclareFunctionTextOutLibgdi32 Alia
求助:form_load 时能执行但放到command_click没反应
VB code
Private 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 Private Sub Form_Load() Const sStr = "vb我爱你 " TextOut Picture1.hdc, 0, 0, sStr, tLen(sStr) SavePicture Picture1.Picture, "c:\1.bmp " End Sub Private Function tLen(ByVal expression As String) As String tLen = Len(expression) For i = 1 To Len(expression) If Asc(Mid(expression, i, 1)) < 0 Then tLen = tLen + 1 End If Next End Function