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

VB调用系统的"打印机设置"和"页面设置".

VB调用系统的"打印机设置"和"页面设置".
Option Explicit
Const FW_NORMAL = 400
Const DEFAULT_CHARSET = 1
Const OUT_DEFAULT_PRECIS = 0
Const CLIP_DEFAULT_PRECIS = 0
Const DEFAULT_QUALITY = 0
Const DEFAULT_PITCH = 0
Const FF_ROMAN = 16
Const CF_PRINTERFONTS = &H2
Const CF_SCREENFONTS = &H1
Const CF_BOTH = (CF_SCREENFONTS Or CF_PRINTERFONTS)
Const CF_EFFECTS = &H100&
Const CF_FORCEFONTEXIST = &H10000
Const CF_INITTOLOGFONTSTRUCT = &H40&
Const CF_LIMITSIZE = &H2000&
Const REGULAR_FONTTYPE = &H400
Const LF_FACESIZE = 32
Const CCHDEVICENAME = 32
Const CCHFORMNAME = 32
Const GMEM_MOVEABLE = &H2
Const GMEM_ZEROINIT = &H40
Const DM_DUPLEX = &H1000&
Const DM_ORIENTATION = &H1&
Const PD_PRINTSETUP = &H40
Const PD_DISABLEPRINTTOFILE = &H80000

Private Type POINTAPI
x As Long
y As Long
End Type
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Private Type PAGESETUPDLG
lStructSize As Long
hwndOwner As Long
hDevMode As Long
hDevNames As Long
flags As Long
ptPaperSize As POINTAPI
rtMinMargin As RECT
rtMargin As RECT
hInstance As Long
lCustData As Long
lpfnPageSetupHook As Long
lpfnPagePaintHook As Long
lpPageSetupTemplateName As String
hPageSetupTemplate As Long
End Type

Private Type PRINTDLG_TYPE
lStructSize As Long
hwndOwner As Long
hDevMode As Long
hDevNames As Long
hDC As Long
flags As Long
nfromPage As Integer
nToPage As Integer
nMinPage As Integer
nMaxPage As Integer
nCo


相关文档:

再谈用VB无窗口透明Usercontrol编写透明浮动按钮

    去年曾写过一篇博文,名称叫《用VB无窗口透明Usercontrol编写透明浮动按钮》,该文有一个观点是错误的,即透明无窗口Usercontrol不支持设计时点选。其实,通过在UserControl_HitTest过程里加入HitResult = vbHitResultHit语句,就可以实现设计时的点选了,为此,修改代码如下:
'* ******************* ......

调试JavaScript/VB Script脚本程序(IE篇)


JavaScript/VB Script脚本程序一般有两种执行方式,一种是嵌入在宿主程序里面执行,比如在IE浏览器里面执行;另外一种,在资源管理器里面双击执行(虽然还是通过另外一个程序解释执行,但是给人的感觉毕竟是直接运行)。
这两种方式,都可以使用Visual Studio来进行调试,先看大家用得比较频繁的网页脚本程序的调试:
1 ......

VB遍历当前目录

Option Explicit
Dim FSO As New FileSystemObject
Dim currentFolder As Folder
Dim currentFolderName As String
Dim folderItem, fileItem
Private Sub Form_Load()

currentFolderName = FSO.GetFolder(App.Path) & "\content"
SeachFolder (FSO.GetFolder(currentFolderName))

End Sub ......

VB/C++/C#串口通讯源代码【附详细注释】


VB
    If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
    MSComm1.CommPort = i1
    MSComm1.PortOpen = True
    MSComm1.InputMode = comInputModeBinary
    MSComm1.InBufferCount = 0
& ......

一些VB相关的东西~~


珍贵vb函数列表
Variant 变量的内部表示:
_______________________________________________________________
符号常量 值 内部表示 字节数
V_EMPTY 0 Empty
V_NULL 1 Null
V_INTEGER 2 Interger 2
V_LONG 3 Long 4
V_SINGLE 4 Single 4
V_DOUBLE 5 Double 8
V_CURRENCY 6 Currency 8
V_DATE 7 Date 8
V_STRI ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号