Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
send events using vb.net code???
send events using vb.net code???
I use vb.net language. I want to send the event by vb.net code.
thanks!
thanks!
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: send events using vb.net code???
I do not know for sure, but maybe the following topic will help you:
COM Integration with other apps that require a type library?
Please tell us even if you find a suitable solution.
Pako
COM Integration with other apps that require a type library?
Please tell us even if you find a suitable solution.
Pako
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: send events using vb.net code???
Or, more generic, use a message broker like MQTT (mosquitto) and you can publish/subscribe events from many users on different machines and various environments (Linux, Windows, Mac, iOS, Android, Java...).
I think you can find sample vb.Net implementations using mosquitto if you google a bit. I have written a MQTT Client for EG that can both subscribe and publish events to the broker.
Best regards, Walter
I think you can find sample vb.Net implementations using mosquitto if you google a bit. I have written a MQTT Client for EG that can both subscribe and publish events to the broker.
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: send events using vb.net code???
Does not work on "Win 8.1 64 bit"
Please help
Please help
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: send events using vb.net code???
What is not working?
I could only try in W7 64bit and there the little test application works fine. Could it be related user rights?
From the log
I could only try in W7 64bit and there the little test application works fine. Could it be related user rights?
From the log
Code: Select all
18:09:29 Main.C# Event u"C# Payload"
18:09:48 Main.C# Event u"C# Payload"My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: send events using vb.net code???
I am using Win 8.1 64bit
phenomenon hangs send event
Please help
phenomenon hangs send event
Please help
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: send events using vb.net code???
It is like calling a man who is drowning.tommylam wrote:Please help
In this case there is nothing to add.
But I thought, that you are asking for help in solving a problem.
Why are you so close-mouthed?
Two ways of solution have been presented to you.
I would expect that you write why this solution is not suitable for you,
or what you've done and from what point it does not work as expected.
In other words - you should try to provide as much information
so that the man who wants to help, had the job as easy as possible.
Pako
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: send events using vb.net code???
Very well spoken Pako,
Best regards Walter
Best regards Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: send events using vb.net code???
I use this code
But it does not work on win 8.1 64 bit
Code: Select all
private void TriggerEvent(string EventName, string Payload)
{
Object[] Params;
Type EventGhost = Type.GetTypeFromProgID("EventGhost");
object myObject = Activator.CreateInstance(EventGhost);
Params = new Object[] { EventName, Payload };
EventGhost.InvokeMember("TriggerEvent", BindingFlags.InvokeMethod, null,
myObject, Params);
}-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: send events using vb.net code???
The code was posted back in 2009 some 7 months before Windows 7 was released. Obviously the code is working in some Windows versions so you might have to look for VB compatibility issues related to Windows 8.
Anyway, did you also try to run the executable that is inside the zip???
Did you try and verify the functionality in another Windows version?
Anyway, did you also try to run the executable that is inside the zip???
Did you try and verify the functionality in another Windows version?
Code: Select all
EGTest.zip\EGTest\EGTest\bin\EGTest.exeMy released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: send events using vb.net code???
#1) So what do you actually want? You asked VisualBasic solution, but this is C#.tommylam wrote:But it does not work on win 8.1 64 bit
#2) On Windows 8 Pro (64 bit) it works. And even both options (VisualBasic and C#).
Pako
Re: send events using vb.net code???
I copied the code at link
viewtopic.php?f=2&t=461
Here is the code I am using
I add code to the form load event
it does not work on win 8.1 64bit
viewtopic.php?f=2&t=461
Here is the code I am using
Code: Select all
Public Sub TriggerEvent(ByVal EventName As String, ByVal Payload As String)
Dim Params As [Object]()
Dim EventGhost As Type = Type.GetTypeFromProgID("EventGhost")
Dim myObject As Object = Activator.CreateInstance(EventGhost)
Params = New [Object]() {EventName, Payload}
EventGhost.InvokeMember("TriggerEvent", Reflection.BindingFlags.InvokeMethod, Nothing, myObject, Params)
End SubCode: Select all
TriggerEvent("test", "event")- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: send events using vb.net code???
Please try the attached two programs.
One is created using vb, the second using C#.
Pako
One is created using vb, the second using C#.
Pako
- Attachments
-
- Test.zip
- (11.5 KiB) Downloaded 233 times
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: send events using vb.net code???
Please anyone of you is the user of operating system Win 8.1 64 bit?
If so, can you please try the programs provided in the previous post?
Of course, I suppose then tell us the result.
Thanks , Pako.
If so, can you please try the programs provided in the previous post?
Of course, I suppose then tell us the result.
Thanks , Pako.
Re: send events using vb.net code???
Sorry. me busy jobs.
two of your applications work well on "win 8.1 64 bit".
Please give code applications
thanks!
two of your applications work well on "win 8.1 64 bit".
Please give code applications
thanks!