mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
I'm trying to eventually write a DLL that will implement webcam functionality in mIRC. For now, I'm just trying to test to see if I can change the text of a label on a VB form from mIRC. I'm pretty new to VB, so I'm not sure how to go about writing the code to do that. I could have made a mistake here. I can open the COM connection, but when I run the alias to change the label, it returns 1 (which means it thinks it was successful, right?) but the label text doesn't change. Any help would be appreciated from anyone who knows VB. Here's my VB code and the mIRC alias:

VB
Quote:

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
Default Property SetLabel(ByVal labeltext As String) As String
Set(ByVal value As String)
Label1.Text = labeltext
End Set
Get
Label1.Text = labeltext
End Get
End Property
End Class


mIRC
Code:
/testcom {
  var %a = hello
  $com(test,SetLabel,3,bstr %a,*dispatch set)
  echo -a $com(test).result
}

Joined: May 2005
Posts: 449
Fjord artisan
OP Offline
Fjord artisan
Joined: May 2005
Posts: 449
As you can see, I'm pretty new to Visual Basic. I'm not sure how to write this to get what I want. I figure that all I need to do is pass an IP address from mIRC to the VB app and it will use the windows media player object to connect to the IP address. The project will also have a windows media encoder object to start and broadcast a webcam. I'll need two functions in the VB code. One will take the IP address, and one will take "on" or "off" as a string to turn it on or off.


Link Copied to Clipboard