![]() |
|
| HALi HALi is an Actixe X interface that allow more advanced programming with HAL. Search this forum on how to create HALi Apps as well as find apps that others have already created. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Junior Member
Join Date: Aug 2005
Location: Virginia
Posts: 13
|
Thanks Tons! Didn't work right off but kept playing and finally started working.That had to be the answer
Thanks again |
|
|
|
|
|
#2 |
|
Advanced Senior Member
Join Date: Jul 2003
Location: Boynton Beach, Florida
Posts: 1,339
|
From VB6 goto the "Project" menu and select "Components" then check the HALi.ocx. this will add the OCX to your tool bar. Then you double click the HALi.ocx and it should place it on your form. You can also drag and drop it on your form.
|
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2004
Location: Dallas, Texas
Posts: 73
|
Jim... I am actually using Visual Studio .NET 2005. It is different enough that the VB6 method isn't working.
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Jul 2003
Location: Laurel, MD
Posts: 1,356
|
Cynthia,
Make sure you are calling the init function. The following code works after a macro or scene is executed. Sorry about all the extra blanks lines... couldn't get this code to paste cleanly. Tim PublicClass Form1 PrivateSub Form1_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.LoadAxHALi1.Init()EndSub PrivateSub AxHALi1_MacroExecuted(ByVal sender AsObject, ByVal e As AxHALiContol.__HALi_MacroExecutedEvent) Handles AxHALi1.MacroExecutedEndClassMsgBox(e.sMacroName)EndSub
__________________
Tim Shriver Home Automated Living |
|
|
|
|
|
#5 |
|
Member
Join Date: Jan 2004
Location: Dallas, Texas
Posts: 73
|
Yes, I am calling the Init function.
Cynthia |
|
|
|
|
|
#6 |
|
Administrator
Join Date: Jul 2003
Location: Laurel, MD
Posts: 1,356
|
Cynthia,
So if you start a project with just the code I have below in this thread, do you see the msgbox appear when you execute a macro or scene in HAL? If not, please post what versions of HAL, HALcom and HALi you are using. Thank you, Tim
__________________
Tim Shriver Home Automated Living |
|
|
|
|
|
#7 |
|
Member
Join Date: Jan 2004
Location: Dallas, Texas
Posts: 73
|
Tim, I am using VB under Visual Studio .NET 2005, and cannot use the code sample you provided. My main issue is not knowing how to add the HALi control to a project that doesn't have it (under VB .NET 2005). I have HAL 2000 revision 4.0.26 with HALi.ocx dated 9/7/2008 and HALCOM.exe 7/17/2008.
Cynthia |
|
|
|
|
|
#8 |
|
Advanced Senior Member
Join Date: Jul 2003
Location: Boynton Beach, Florida
Posts: 1,339
|
Do a google search or look at the help file for "Adding Components" then browse to the HALi.ocx in the HAL folder.
|
|
|
|
|
|
#9 |
|
Administrator
Join Date: Jul 2003
Location: Laurel, MD
Posts: 1,356
|
Cynthia,
Start by click File, New, Project and select Visual Basic, Windows, Windows Application. Next click View, ToolBox. Next open Windows Explorer and navigate to the HAL directory. Drag and drop the HALi.ocx onto the Toolbox pane of Visual Studio 2005. Finally, select the HALiControl.HALi and drag it to your Form. Tim
__________________
Tim Shriver Home Automated Living |
|
|
|
|
|
#10 |
|
Member
Join Date: Jan 2004
Location: Dallas, Texas
Posts: 73
|
Thank you Tim and Jim! I am able to get a new small program working.
Public Class Form1 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load AxHALi1.Init() End Sub Private Sub AxHALi1_MacroExecuted(ByVal sender As Object, ByVal e As AxHALiContol.__HALi_MacroExecutedEvent) Handles AxHALi1.MacroExecuted MsgBox(e.sMacroName) End Sub Private Sub Form1_Closed(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Closed 'Release the devices AxHALi1.UnInit() End Sub End Class Now I need to work on the larger one. Cynthia Last edited by Cynthia; 11-15-2008 at 10:24 AM. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -6. The time now is 08:41 AM.
|
|