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

vb设置窗体不可移动

Option Explicit
Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, Optional ByVal wFlags As Long = 0&) As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
Dim i As Boolean
Function SetWindowMoveAble(ByVal hWnd As Long, Optional ByVal MoveAble As Boolean = True) As Boolean
'function: SetWindowMoveAble
'  params:
'          hWnd: 一个顶级窗口句柄
'          MoveAble: 是否可移动
'  result: 与参数 Moveable 的设置一样,否则即为失败
Dim mhandle As Long
If MoveAble Then _
  GetSystemMenu hWnd, 1&: _
  DrawMenuBar hWnd _
Else _
  mhandle = GetSystemMenu(hWnd, 0&): _
  SetWindowMoveAble = DeleteMenu(mhandle, &HF010&)
End Function
Private Sub Command1_Click()
SetWindowMoveAble hWnd, i
i = Not i
End Sub
转自:http://topic.csdn.net/u/20091202/13/66015bdf-6b87-4268-8e9d-dccf45f7ae52.html?15976


相关文档:

VB 取地址函数大全

Public Declare Function VarPtrArray Lib "msvbvm60.dll" Alias "VarPtr" (Var() As Any) As Long
Public Declare Function VarPtrStringArray Lib "msvbvm60.dll" Alias "VarPtr" (Var() As Any) As Long
取对象地址: ObjPtr
取OLE对象的地址: OLE_NAME.LpOleObject
取函数地址: AddressOf
取字符串地址: StrPtr
取 ......

VB中得到屏幕支持的分辨率和色位

http://topic.csdn.net/t/20030306/11/1497896.html#
 工程文件名:Chdsp.vbp  
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\PWIN95\SYSTEM\\STDOLE2.TLB#OLE Automation
Module=Module1; ChDsp.bas
Form=ChDsp.frm
Startup="Form1"
He ......

VB错误代码

3,Return without GoSub
5,Invalid procedure call
6,Overflow
7,Out of memory
9,Subscript out of range
10,This array is fixed or temporarily locked
11,Division by zero
13,Type mismatch
14,Out of string space
16,Expression too complex
17,Cant perform requested operation
18,User int ......

[vb]使用vb统计.java的行数

 工作需要,针对java文件,作了一个行数统计的工具。统计的主要代码如下:
    Set srcIn = fso.OpenTextFile(fileNm, ForReading)
    
    Do While Not srcIn.AtEndOfStream
        buf = srcIn.ReadLine
 &nbs ......

永远的魔灵 by 郭卫 VB程序设计源码全家福

 
 
'*************************************************************************
**说 明:永远的魔灵 by icecept(郭卫)
'**创 建 人:icecept(魔灵)
'**日 期:2009-11-15 20:27:03
'**修 改 人:icecept(魔灵)
'**版 本:V1.0.0
'**E-mail   :icecept@163.com QQ:543375508
'**网 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号