请问各位大虾:1. 我如何能得到LAN中的一台主机的网络卡的MAC地址,IP地址,用户名称,机器名称
,当LAN中有一台主机更改了IP地址时,我能探测的到.2.向"金山词霸"的屏幕取词是如何实现的.3.我的软件给用户一个使用期限,可以用注册表来限制,但不安全,听说可以用DLL来控制,不知道该如何实现先谢谢各位大虾
,当LAN中有一台主机更改了IP地址时,我能探测的到.2.向"金山词霸"的屏幕取词是如何实现的.3.我的软件给用户一个使用期限,可以用注册表来限制,但不安全,听说可以用DLL来控制,不知道该如何实现先谢谢各位大虾
解决方案 »
- 找高人求助:用VB拦截API获取其他进程中Label中的字符
- Text1_KeyPress(KeyAscii As Integer) 在这种事件里,如何可以写组合键呢
- vb 请问哪种方式拷贝共享文件最快最稳定并且要能够显示进度条?
- 如何自动关闭控件?
- 如何用API关闭WINNT系统
- vb中 的 字符串转换成数字的问题 在线等啊 急啊
- 一个关于窗体最大化的问题
- 虽然前几天问出了32位色下点的颜色混合的公式,但那个公式用了许多浮点乘除,速度比较慢。谁能化简一下?或者谁有更好的公式?
- 如何用vbs打开visio画一个矩形?我写了一个总报错说未找到对象名,why?
- 怎样给类的属性赋值,新手求救(在线)
- 大家好,有来求救了。我在VB时,在运行父窗体时,会打开所有的子窗体,有没有一种方法,可以让子窗体不打开呢?
- cr85解压密码!?
一个richtextbox,两个label
代码如下: Option Explicit
Private Const EM_CHARFROMPOS& = &HD7
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVa
l hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As
Long
' Return the word the mouse is over.
Public Function RichWordOver(rtf As RichTextBox, X As Single, Y As Single) A
s String
Dim pt As POINTAPI
Dim pos As Integer
Dim start_pos As Integer
Dim end_pos As Integer
Dim ch As String
Dim txt As String
Dim txtlen As Integer
' 把位置坐标转换为像素.
pt.X = X \ Screen.TwipsPerPixelX
pt.Y = Y \ Screen.TwipsPerPixelY
' Get the character number
pos = SendMessage(rtf.hWnd, EM_CHARFROMPOS, 0&, pt)
If pos <= 0 Then Exit Function
'查找单词的开始位置.
txt = rtf.Text
For start_pos = pos To 1 Step -1
ch = Mid$(rtf.Text, start_pos, 1)
' 允许数字,字母,下划线
If Not ( _
(ch >= "0" And ch <= "9") Or _
(ch >= "a" And ch <= "z") Or _
(ch >= "A" And ch <= "Z") Or _
ch = "_" _
) Then Exit For
Next start_pos
start_pos = start_pos + 1
'查找单词的结尾
txtlen = Len(txt)
For end_pos = pos To txtlen
ch = Mid$(txt, end_pos, 1)
' 允许数字,字母,下划线
If Not ( _
(ch >= "0" And ch <= "9") Or _
(ch >= "a" And ch <= "z") Or _
(ch >= "A" And ch <= "Z") Or _
ch = "_" _
) Then Exit For
Next end_pos
end_pos = end_pos - 1
If start_pos <= end_pos Then _
RichWordOver = Mid$(txt, start_pos, end_pos - start_pos + 1)
End Function
Private Sub Form_Load()
rtfTest.Text = "Welcome to use source code provided by Alp Studio" & _
vbCrLf & vbCrLf & "This example program is provided as is with no wa
rranty of any kind" & _
vbCrLf & vbCrLf & "Send the control the EM_CHARFROMPOS message to ma
ke it return the character closest to the mouse position." & _
vbCrLf & vbCrLf & "http://dropwater.163.net"
End Sub
Private Sub rtftest_MouseMove(Button As Integer, Shift As Integer, X As Sing
le, Y As Single)
Dim txt As String
txt = RichWordOver(rtfTest, X, Y)
If lblCurrentWord.Caption <> txt Then _
lblCurrentWord.Caption = txt
End Sub 鼠标屏幕取词技术的原理和实现
http://ttcode.51.net/jishu/delphi/delphi%20(29).htm