再谈用VB无窗口透明Usercontrol编写透明浮动按钮
去年曾写过一篇博文,名称叫《用VB无窗口透明Usercontrol编写透明浮动按钮》,该文有一个观点是错误的,即透明无窗口Usercontrol不支持设计时点选。其实,通过在UserControl_HitTest过程里加入HitResult = vbHitResultHit语句,就可以实现设计时的点选了,为此,修改代码如下:
'* ************************************************************** *
'* 程序名称:Button.ctl
'* 程序功能:透明浮动按扭
'* 作者:lyserver
'* 联系方式:http://blog.csdn.net/lyserver
'* 说明:解决了FloatButton版本设计时不能点选的BUG
'* ************************************************************** *
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" (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" (lpRect As RECT, ByVal x As Long, ByVal y As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function ScreenToClient Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long
Private Declare Function DrawEdge Lib "user32" (ByVal hdc As Long, 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, lpRect As RECT, ByVal wFormat As Long) As Long
Private Const DT_CENTER = &H1
Private
相关文档:
VB中 Replace 函数
描述
返回字符串,其中指定数目的某子字符串被替换为另一个子字符串。
语法
Replace(expression, find, replacewith[, compare[, count[, start]]])
Replace 函数的语法有以下参数:
参数 描述
expression 必选。字符串表达式,包含要替换的子字符串。
find 必选。被搜索的子字符串。
......
在很多 VB 的资料库书籍中,都会很完整的提到:如何由其他种类的文件中将资料导入资料库,但是却很少有书提到:如何将资料库中的资料,导出到各种不同的文件类型的文件中,连 VB 的 Help 中也是这样!
或许是大家都认为资料库主题的重点是在资料库本身吧!
但是,在实际的资料库程序运用中,却常常需要将资料库导出到各种 ......
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 ......
添加2个text,一个command,一个 WebBrowser
Dim vDoc, vTag
Dim i As Integer
Private Sub Command1_Click()
Set vDoc = WebBrowser1.Document
For i = 0 To vDoc.All.length - 1
If UCase(vDoc.All(i).tagName) = "INPUT" Then
Set vTag = vDoc.All(i)
If vTag.Type = "text" Then
Select Case vTag.Nam ......
http://www.carlosag.net/Tools/CodeTranslator/ 这个也许学计算机的哥哥姐姐们会用得到,,就转了希望多多支持哦 西西 用得到就顶哦
差点忘了哦 ,藕还有一个sql的插件很好用的呀。。。。有想要的就留言下要咯。。。。。 ......