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
 
相关文档:
ASP是目前一种广为应用的用来快速构建动态WEB站点的编程语言,默认的内置开发语言是VBScript,由于ASP和微软Windows系列操作系统的结合非常的好,使得ASP已经成为了NT开发平台上面进行WEB开发的首选语言和环境。
他有着简单易学,方便快速开发的种种优点,但是他也有着致命的弱点,就是他是脚本语言解释执行的,速度会受到 ......
作者: 佚名, 出处:IT专家网, 责任编辑: 谢妍妍,
2010-04-23 11:20
本文介绍VB对程序运行的监控。
转眼间,本系列文章已经写到了第六个,今天写点什么呢?
还是得写,看似VB做不到的事情,那么今天起就写写VB对操作系统的控制吧。
首先,说一说,VB对于被调用后的程序的监控方法。
原型函数简 ......
使用c#语言在.net平台生成的dll是基于MSIL的二进制代码,通常情况下是无法被native的语言和程序调用的(例如vb,vc,delphi)。但是一般来说windows上native的程序都是可以直接使用com对象的。通过.net平台提供的一些工具,可以为其伪造一个com接口并注册到系统中。此时,可以在native的程序里,通过这个伪com接口来实现此. ......
Option Explicit
Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Public Declare Function RegCreateKey Lib "advapi32.dll" Alias ......
http://www.carlosag.net/Tools/CodeTranslator/ 这个也许学计算机的哥哥姐姐们会用得到,,就转了希望多多支持哦 西西 用得到就顶哦
差点忘了哦 ,藕还有一个sql的插件很好用的呀。。。。有想要的就留言下要咯。。。。。 ......