易截截图软件、单文件、免安装、纯绿色、仅160KB

vb 打印

 Private Sub PrintTxt(txt As String, ConWidth As Long, LeftPosition As Long)
    Dim str As String
    Dim str1 As String
    Dim len1 As Long
   
    str = txt
    len1 = ConWidth
    Do While Len(str) > 0
        str1 = str
        Do While len1 > 0 And Printer.TextWidth(str1) - ConWid > len1
            str1 = Left(str1, Len(str1) - 1)
        Loop
        Printer.CurrentX = LeftPosition
        Printer.Print str1 '打印
        If Len(str1) = 0 Then Exit Do '不匹配
        str = Mid(str, Len(str1) + 1) '截断!
    Loop
End Sub
Private Sub PrintBC(prectl As Control)
    Dim I As Integer
    Dim str As String
    Dim str1 As String
    Dim len1 As Long
    len1 = prectl.Width
    If prectl.BorderStyle = 0 Then
        ConWid = 90
    Else
        ConWid = -90
    End If
   
    Printer.CurrentX = prectl.Left
    Printer.CurrentY = prectl.Top
    Printer.Font.Name = prectl.Font.Name
    Printer.Font.Size = prectl.Font.Size
    'Printer.ForeColor = prectl.ForeColor
    str = prectl
    For I = 1 To Len(str)
        If I > Len(str) Then Exit For
        If Asc(Mid(str, I, 1)) = 13 Then
       


相关文档:

用VB Winsock控件创建TCP/IP客户机/服务器程序


转自:http://www.52arm.com/Article_Show.asp?ArticleID=186
 
作者:weidian    ---本站原创    点击数:4721    发表时间:2008-5-7    编辑:sanzang
 
Winsock控件建立在TCP、UDP协议的基础上,完成与远程计算机的 ......

VC VC++ VB UG and so on

学生时代专业是机械,但是参加工作后,机缘巧合从事了与软件相关的工作,就是对大型工程软件软件做一些二次开发,收获过快乐,收获过辛酸,在一次又一次的得与失中,想找一个地方,找一些人可以慢慢与之分享,与之交流,并期得到帮助或提供帮助!也许你是无意见路过,甚或漂过,但你的注目是我前进的动力,有幸驻足也会让我 ......

VB显示透明FLASH效果

VB显示透明FLASH效果
  演示效果:
 
    代码如下:
公共声明区域
Option Explicit
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetW ......

VB实现“木马”式隐形运行程序

程序隐形的原理
  对于一个隐形程序而言,最基本的要求是:
  1. 不在桌面出现界面;
  2. 不在任务栏出现图标;
  3. 程序名从任务管理器名单中消失。
Public Declare Function GetCurrentProcessId Lib “kernel32” () As Long
’获得当前进程ID函数的声明
Public Declare Functio ......

VB 写COOKIE

Private Declare Function InternetSetCookie Lib "wininet.dll" Alias "InternetSetCookieA" (ByVal lpszUrlName As String, ByVal lpszCookieName As String, ByVal lpszCookieData As String) As Boolean
Private Declare Function InternetGetCookie Lib "wininet.dll" Alias "InternetGetCookieA" (ByVal lpszUrlName ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号