I'm creating an ASP.NET web app. I have some code that I need to run on the clientside. However, the only code I have is being run serverside (VB.NET). Is there anything I can use to convert it to VBscript? Or can someone do it for me? It's not much code. Although, I have no idea how difficult it may be. I'm trying to use 'ClickYes' on the clientside because I'm using Outlook on the client's computer to send email. Before you ask, I'm not using SMTP because its blocked by the company.
Code:
Private Declare Function RegisterWindowMessage _
Lib "user32" Alias "RegisterWindowMessageA" _
(ByVal lpString As String) As Long
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As Integer) As Long
Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" (ByVal hwnd As Long, _
ByVal wMsg As Long, ByVal wParam As Long, _
ByVal lParam As Long) As Long
Public Sub Turn_Auto_Yes_On()
Try
Dim wnd As Long
Dim uClickYes As Long
Dim Res As Long
uClickYes = RegisterWindowMessage("CLICKYES_SUSPEND_RESUME")
wnd = FindWindow("EXCLICKYES_WND", 0&)
Res = SendMessage(wnd, uClickYes, 1, 0)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Public Sub Turn_Off_Auto_Yes()
Try
Dim wnd As Long
Dim uClickYes As Long
Dim Res As Long
uClickYes = RegisterWindowMessage("CLICKYES_SUSPEND_RESUME")
wnd = FindWindow("EXCLICKYES_WND", 0&)
Res = SendMessage(wnd, uClickYes, 0, 0)
Catch ex As Exception
MsgBox(ex.Message)
End Try