I’m tinkering with some ideas for an interactive HMI/UI, and using HTMLViewer, HTML5, and javascript. HTML5 works fine, allowing me to create numerous graphical elements - in my particular example I’m using the HTML5 document to show actively flowing piping, valve positions, and other indicators in a factory control system.
So far I’m having good luck programmatically writing “into” the HTML5 running in HTMLViewer (sample code below, showing a simple request to start a timeline in the document), triggering associated actions w/in the HTML5 doc.
Now I want to find a way for the HTML5 elements to ‘send’ data back thru the HTMLViewer for taking action on. For instance, someone ‘presses’ a value graphic to actuate it, in turn the HTML5 element sends a javascript action (that I hope to intercept with HTMLViewer).
Suggestions are appreciated. Thanks!
Sample of working method of sending commands ‘into’ the HTML5 document:
Dim jsSrc As String
jsSrc = "HYPE.documents['theControl'].startTimelineNamed('Main Timeline');"
HTMLViewer1.ExecuteJavaScript(jsSrc)
Dim jsSrc As String
jsSrc = "HYPE.documents['theControl'].pauseTimelineNamed('Main Timeline');"
HTMLViewer1.ExecuteJavaScript(jsSrc)