再谈用VB无窗口透明Usercontrol编写透明浮动按钮
'* ************************************************************** *
'* 程序名称:Button.ctl
'* 程序功能:透明浮动按扭
'* 作者:lyserver,最后修改日期:2009年11月
'* 联系方式:http://blog.csdn.net/lyserver
'* ************************************************************** *
Option Explicit
'----------------------------------------------------------------------
' API 声明
'----------------------------------------------------------------------
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 Declare Function SetRect Lib "user32" (ByRef lpRect As RECT, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function OffsetRect Lib "user32" (ByRef lpRect As RECT, ByVal x As Long, ByVal y As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (ByRef lpPoint As POINTAPI) As Long
Private Declare Function ScreenToClient Lib "user32" (ByVal hwnd As Long, ByRef lpPoint As POINTAPI) As Long
Private Declare Function ClientToScreen Lib "user32" (ByVal hwnd As Long, ByRef lpPoint As POINTAPI) As Long
Private Declare Function DrawEdge Lib "user32" (ByVal hdc As Long, ByRef qrc As RECT, ByVal edge As Long, ByVal grfFlags As Long) As Long
Private Const BDR_RAISED = &H5
Private Const BDR_SUNKEN = &HA
Private Const BDR_RAISEDINNER = &H4
Private Const BDR_SUNKENINNER = &H8
Private Const BDR_RAISEDOUTER = &H1
Private Const BDR_SUNKENOUTER = &H2
Private Const BF_RECT = &HF
Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hdc As Long, ByVal lpStr As String, ByVal nCount As Long, ByRef lpRect As RECT, ByVal wFormat As Long) As Long
Private Const DT_CENTER = &H1
Private Const DT_VCENTER = &H4
Private Const DT_TOP = &H0
相关文档:
重拾VB之二,毫秒篇
PMP 关劲松
鬼使神差,09年12月入职的公司仍使用VB开发软件,虽然并非专职开发,但也不得不在事隔4年之后,重新使用VB。
在vb中如何获得毫秒精度级别的时间?vb的时间函数不支持毫秒,需要利用windows的基本API,编写程序才能获取毫秒级 ......
不能直接使用CopyMemoryStr,应该将字符串转为byte数组,然后使用CopyMemory
Property Get item() As String
If h = 0 Then ErrRaise ERROR_INVALID_DATA
'BugAssert p <> pNull
Dim c As Long, ptr0 As Long
Dim ab() As Byte
& ......
'**************************读图片文件**************************************
Sub GetPicfromDB(cn As ADODB.Connection)
On Error Resume Next
Dim ......
使用VC编写VB使用DLL
一、在函数定义前必须加上extern "c",_stdcall关键字。
extern "C" int _stdcall Sum(int x,int y)
{
return x+y;
}
二、DLL的.def文件中必须加上入口函数
EXPORTS
sample @1
  ......
可以筛选数据,但不能是标准的SQL语句:
Me.DsUserManager1.Tables(0).Select("id > 5 and id <20")
---------------------------------------------------------------
1.筛选:
dataset.tables("tabname").select("id=1")'相当于SQL中WHERE后的条件内容
2.保存到哪?这倒是不知 ......