PDA

View Full Version : How can I send Girder 4 an event from VB.net 2005 Express?



iruser
July 28th, 2007, 12:07 PM
I would like to send Girder 4 Pro an event from Visual Basic 2005 Express. Has anyone been successful trying this yet? I have tried to get the GirderX.dll into the toolbox but I'm not having any luck.

iruser
July 28th, 2007, 04:03 PM
I was able to make it work finally. I'm putting the steps I followed below if anyone else is a total VB 2005 Express beginner like me.

I had to register the GirderX.dll on my system. I did this in a shell window as I'm not sure of an easier way. If someone knows the shortcut please feel free to post it here.
Then in Visual Basic 2005:
1. On Menu Bar - File>New Project>Windows Application
2. On Menu Bar - Project>Add Reference. Browse to Girder folder and double click on GirderX.dll.
3. On Toolbox bar - Drag button object onto Form 1 and double click to open button properties. Properties window now looks like this.

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

End Sub
End Class

4. In the blank line above End Sub I pasted in:

Dim MyGirder As New GIRDERXLib.Girder
MyGirder.TriggerEvent("EventNameHere", 18, "1", "2", "3", 0)

The button properties window now looks like this:

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim MyGirder As New GIRDERXLib.Girder
MyGirder.TriggerEvent("EventNameHere", 18, "1", "2", "3", 0)
End Sub
End Class

5. On standard toolbar - click on "start debugging" icon (looks like a green colored "play" icon) to test the tiny application with one button.

6. Open Girder
7. On menu bar - View>Switch to Expert Interface
8. Click on "Log Display" at the bottom of the screen
9. In the Form 1 application window click the button to test. In Girder EventNameHere should now show in the log display.
10. Click and drag "EventNameHere" to the main Girder window onto any task to test it.

Now you can create your own Windows application easily and use Visual Basic events to create Girder events. Sorry for the long post but I hope this helps somebody else to enjoy building Girder solutions.

iruser
July 28th, 2007, 04:07 PM
Here is the web link to download Visual Basic 2005 Express Edition. It's a free application and there are some good tutorial videos for free as well there.

http://msdn.microsoft.com/vstudio/express/downloads/

Twit
July 29th, 2007, 09:02 AM
To use the girderx.dll in jscript on a webpage i also had to register the girderx.dll.

click - start - run

type [regsvr32 "c:\program files\promixis\girder\girderx.dll"] without the [], but with the quotes. After I did this the webpage (apache server) worked.

Now I have to figure out how to make this work from a computer that isn't the girder/apache machine.

And yes I know girder has a webserver but I could not figure out a way to get php/mysql to run in it, which i need for other applications.

iruser
July 29th, 2007, 09:15 AM
Hey Twit,

Is your PHP/MySQL server a Windows server? If so can you use the Girder to Girder plugin to send events to Girder on the separate computer?

Twit
July 29th, 2007, 09:27 AM
Runs on WinServer 2003. apache & girder are on the same machine.

I was hoping to control some home automation stuff from any browser. Like from work where girder is not installed. I did get the apache web server 'talking' to the girder web server (using Ajax) which then could be used from any browser. but I have a rule of running my HTPC machine as lean/mean as possible, and running 2 web servers was not on.

Unfortunately I have no programming skills and am more of a cut & paste type of 'coder'.

I actually copied the girdex.dll to another machine and registered it, but it still did not work.

Later
Simon.

zones
April 1st, 2008, 10:56 AM
All,

The post was very usefull my vb aplication can mute / unmute my amp.
The program only works when on the same PC as girder any ideas how to change so it works on any PC on my network ?

Cheers

harleydude
April 1st, 2008, 11:31 AM
Have a look at this thread.

http://www.promixis.com/forums/showthread.php?t=18203&highlight=csevent

zones
April 1st, 2008, 12:49 PM
Harleydude,

Thanks that works in commandline will incorporate in to my VB ap.

Thanks a lot.
By the way I am more of a VrexDude
http://www.travertson.com/model.html

zones
April 1st, 2008, 02:05 PM
Thanks Harleydude that does the trick