黑客风云——风云网络
设为首页 加入收藏 我要投稿 网站地图

您现在的位置: 黑客风云 >> 黑客文章 >> 黑客进阶 >> 黑客编程 >> 正文
·没有路由密码权限时的鸽08-23·上网安全 Vista自我防范10-11
·让濒临崩溃的Windows XP10-11·有备无患,快速自制救急10-11
·要你好看!Windows看图工10-11·空间赞助网提供不同类型10-11
·讨论net.exe和net1.exe的10-10·让3389远程桌面传输更通10-10
·巧妙入侵渗透赌博站10-10·Aspx空间扫权限工具10-10
·Windows2003最新提权工具10-10·易淘乐提供100M免费全能10-10
·系统开机密码忘了不着急10-09·中意网络提供免费100M免10-09
·与众不同 Windows XP开始10-08·让桌面图标翻跟斗 在XP上10-08
·上海宽元站长资助计划-提10-08·个性化Windows XP的任务10-07
·趣盘提供3G免费网络硬盘10-07·秀山热线提供200MB免费全10-07
·一次艰辛的提权过程10-06·成功入侵IT大卖场的渗透10-06
·mysqlhack- MYSQL利用工10-06·lanker一句话PHP后门客户10-06
·WIXI提供3G免费多媒体网10-06·新人网络提供100M/ftp免10-06
·如何利用QQ带来高流量10-05·UuShare提供免费网络文件10-05
[推荐]利用API在VB中加入超级链接
      ★★★★★

利用API在VB中加入超级链接

文章整理发布:黑客风云 文章来源:www.05112.com 更新时间:2006-6-1 9:35:48

 

CODE:  [Copy to clipboard]
Option Explicit

Public Const SW_NORMAL = 1
Public Const SW_MAXIMIZE = 3
Public Const SW_RESTORE = 9
Public Const HWND_TOP = 0
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1

Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Declare Function ShowWindowAsync Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
下面的事就很简单了。
相信大家也知道了吧。

在窗体frmmain的load事件中加入如下代码:
CODE:  [Copy to clipboard]
Private Sub Form_Load()


Dim temphwnd As Long, x As Long, AppTitle As String
If App.PrevInstance Or FindWindow("ThunderRT5Form", App.Title) > 0 Then
  'get the handle to the window
  'for non-mdi forms use:
  temphwnd = FindWindow("ThunderRT5Form", App.Title)
    'for MDI forms use:
  'temphwnd = FindWindow("ThunderRT5MDIForm", App.Title)

  AppTitle = App.Title
  App.Title = "#$#"
  
  Caption = "#$#"
  
  'activate the previous instance at the same
  'place and size it was before
  'could do to non-asyc with ShowWindow but that
  'lead to problems when working outside the current thread
  x = ShowWindowAsync(temphwnd, SW_RESTORE)
  
  SetWindowPos temphwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
  
  'set focus to it
  AppActivate AppTitle
  
  SetWindowPos temphwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
  
  End
End If

Caption = App.Title
Show

lblemail = email
lblurl = URL
End Sub
在标签label1的click事件中写:
CODE:  [Copy to clipboard]
Private Sub Label1_Click()
gotoweb
End Sub
在标签lblemail的click事件中写:
CODE:  [Copy to clipboard]
Private Sub lblemail_Click()
sendemail
End Sub
在标签 lblurl的click事件中写:
CODE:  [Copy to clipboard]
Private Sub lblurl_Click()
gotoweb
End Sub
在按纽cmdend的click事件中:
CODE:  [Copy to clipboard]
Private Sub cmdend_Click()
End
End Sub
好了,这样,就完成了在VB中加入超级连接的功能。

上一页  [1] [2] 

文章录入:cainiaowang    责任编辑:sygbox 
【字体:
Copyright @2006 黑客风云 ●业务联系:QQ 联系怪人 联系奇人 Email:给怪人发邮件 给奇人发邮件
ICP备案:冀06009886