|
-
Aug 23rd, 2011, 04:35 PM
#1
Thread Starter
Hyperactive Member
upgrade from vb6 issue...
hi, i found a class module from planetsourcecode in vb6 used to log browser activity.. i wanted to convert it into .net.. but the issue is it uses linkmode constants.. and as far as ive read they aren't supported in .net. so what should i use in this piece of code?? plz help..
Code:
Option Explicit
Private txtMon As Object
Public LastURL As String
Public WithEvents myTimer As Timer
Public Active As Boolean
Public Event TitleChanged(Title As String)
Public Event URLChanged(URL As String)
Private WithEvents MTimer As Timer
Private Sub LinkTextBox(ByRef pTextBox As TextBox, plinkTopic As String, plinkMode As LinkModeConstants, plinkItem As Variant)
On Local Error GoTo listen:
pTextBox.LinkTopic = plinkTopic
pTextBox.LinkTimeout = 10
pTextBox.LinkMode = plinkMode
pTextBox.LinkItem = plinkItem
pTextBox.LinkRequest
listen:
On Error GoTo 0
End Sub
Public Sub GetDDEURL(LinkTopic As String)
Dim sTmp As String, sLink() As String
Call LinkTextBox(txtMon, LinkTopic, vbLinkManual, &HFFFFFFFF)
sTmp = Mid(txtMon.Text, 2)
sLink = VBA.Split(sTmp, """,""")
If UBound(sLink) > 0 Then
If VBA.Left(sLink(0), 1) = """" Then
sTmp = Mid(sLink(0), 2, Len(sLink(0)) - 1)
Else
sTmp = sLink(0)
End If
If sTmp <> LastURL Then
RaiseEvent URLChanged(sTmp)
LastURL = sTmp
If sLink(1) <> "" Then
If VBA.Right(sLink(1), 1) = """" Then
sTmp = VBA.Left(sLink(1), Len(sLink(1)) - 1)
Else
sTmp = sLink(1)
End If
RaiseEvent TitleChanged(sTmp)
End If
End If
End If
End Sub
Public Sub StartMon(TextBoxCtl As Object, myTimer As Object)
Set txtMon = TextBoxCtl
myTimer.Interval = 500
myTimer.Enabled = True
End Sub
Public Sub StopMon()
myTimer.Enabled = False
End Sub
-
Aug 23rd, 2011, 06:14 PM
#2
Fanatic Member
Re: upgrade from vb6 issue...
have you attempted to use google to search for an alternative that's .net friendly?
-
Aug 24th, 2011, 11:12 AM
#3
Thread Starter
Hyperactive Member
Re: upgrade from vb6 issue...
ya but cant get it. i found ndde but am not able to find a way to use it....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|