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.

Reply
 
Thread Tools Display Modes
Old 11-11-2007, 05:53 PM   #1
wrunning
Junior Member
 
Join Date: Aug 2005
Location: Virginia
Posts: 13
Default Re: starting over

Thanks Tons! Didn't work right off but kept playing and finally started working.That had to be the answer
Thanks again
wrunning is offline   Reply With Quote
Old 11-10-2008, 04:32 PM   #2
jlipsit
Advanced Senior Member
 
jlipsit's Avatar
 
Join Date: Jul 2003
Location: Boynton Beach, Florida
Posts: 1,339
Default Re: starting over

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.
__________________
Take Care,

Jim

See more about HAL 2000 here:
Home Automation
jlipsit is offline   Reply With Quote
Old 11-11-2008, 11:30 PM   #3
Cynthia
Member
 
Join Date: Jan 2004
Location: Dallas, Texas
Posts: 73
Default Re: starting over

Jim... I am actually using Visual Studio .NET 2005. It is different enough that the VB6 method isn't working.
__________________
Home automation website:
http://home.roadrunner.com/~cynthia....auto/index.htm
Cynthia is offline   Reply With Quote
Old 11-12-2008, 06:56 AM   #4
TimShriver
Administrator
 
TimShriver's Avatar
 
Join Date: Jul 2003
Location: Laurel, MD
Posts: 1,356
Default Re: starting over

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.Load
AxHALi1.Init()

EndSub

PrivateSub AxHALi1_MacroExecuted(ByVal sender AsObject, ByVal e As AxHALiContol.__HALi_MacroExecutedEvent) Handles AxHALi1.MacroExecuted
MsgBox(e.sMacroName)

EndSub


PrivateSub AxHALi1_SceneExecuted(ByVal sender AsObject, ByVal e As AxHALiContol.__HALi_SceneExecutedEvent) Handles AxHALi1.SceneExecuted
MsgBox(e.sSceneName)

EndSub

EndClass
__________________
Tim Shriver
Home Automated Living
TimShriver is offline   Reply With Quote
Old 11-12-2008, 11:20 PM   #5
Cynthia
Member
 
Join Date: Jan 2004
Location: Dallas, Texas
Posts: 73
Default Re: starting over

Yes, I am calling the Init function.

Cynthia
__________________
Home automation website:
http://home.roadrunner.com/~cynthia....auto/index.htm
Cynthia is offline   Reply With Quote
Old 11-13-2008, 08:23 AM   #6
TimShriver
Administrator
 
TimShriver's Avatar
 
Join Date: Jul 2003
Location: Laurel, MD
Posts: 1,356
Default Re: starting over

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
TimShriver is offline   Reply With Quote
Old 11-13-2008, 07:52 PM   #7
Cynthia
Member
 
Join Date: Jan 2004
Location: Dallas, Texas
Posts: 73
Default Re: starting over

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
__________________
Home automation website:
http://home.roadrunner.com/~cynthia....auto/index.htm
Cynthia is offline   Reply With Quote
Old 11-13-2008, 08:41 PM   #8
jlipsit
Advanced Senior Member
 
jlipsit's Avatar
 
Join Date: Jul 2003
Location: Boynton Beach, Florida
Posts: 1,339
Default Re: starting over

Do a google search or look at the help file for "Adding Components" then browse to the HALi.ocx in the HAL folder.
__________________
Take Care,

Jim

See more about HAL 2000 here:
Home Automation
jlipsit is offline   Reply With Quote
Old 11-13-2008, 10:01 PM   #9
TimShriver
Administrator
 
TimShriver's Avatar
 
Join Date: Jul 2003
Location: Laurel, MD
Posts: 1,356
Default Re: starting over

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
TimShriver is offline   Reply With Quote
Old 11-15-2008, 10:17 AM   #10
Cynthia
Member
 
Join Date: Jan 2004
Location: Dallas, Texas
Posts: 73
Default Re: starting over

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
__________________
Home automation website:
http://home.roadrunner.com/~cynthia....auto/index.htm

Last edited by Cynthia; 11-15-2008 at 10:24 AM.
Cynthia is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -6. The time now is 08:41 AM.



Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© 2001-2010 Home Automated Living. All Rights Reserved.