Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Does STYX plugin support OLE automation and sample/demo code

Author
Message
Darth Potato
10
Years of Service
User Offline
Joined: 8th Aug 2009
Location: The Death Star
Posted: 3rd Jan 2010 07:49
I need help using STYX for OLE. Can anybody help? The ones in the default STYX examples aren't detailed enough. They don't help much. Any help? Especially smaple or demo code.

The Sith Empire will rule the galaxy.
Happy Bunny
9
Years of Service
User Offline
Joined: 7th Jan 2010
Location: UK
Posted: 9th Jan 2010 01:34
I have many years experience writing OLE automation code.

What is it that you are trying to do and I will knock together some sample code for you?

Turning Possibilities into Realities
Darth Potato
10
Years of Service
User Offline
Joined: 8th Aug 2009
Location: The Death Star
Posted: 9th Jan 2010 10:26
I am trying to get a Internet Explorer window inside of DBPro, not opening a new window (basically follows DBPro window and has no title bar kinda thing). I am unsure whether this is possible at all since I have only been able to open new windows for it. Although repositioning it after every loop may work, still not sure how to get rid of title bar.

The Sith Empire will rule the galaxy.
Happy Bunny
9
Years of Service
User Offline
Joined: 7th Jan 2010
Location: UK
Posted: 11th Jan 2010 17:20
Internet Explorer with STYX

In short, you can’t do what you want directly. Your only (2) options would be to use Visual Basic or Power Basic etc. to create an ActiveX EXE COM Server based around Microsofts Web Browser control. Or perhaps ask someone nicely to do this for you. The other option would be to access the WinAPI to remove the TitleBar and surrounding window from the Explorer window instance at runtime.

If you want to attempt a work around with the Explorer object and reposition it within your app, then please read further.



The documentation you need for OLE Automation is usually found with the supplier of that particular object.

In this case the SHDocVw object for web browsing from Microsoft.

Unfortunately STYX supports only the instancing of OLE classes and cannot act as a container.

The WebBrowser is an activeX control that would need a container.

You can however access Internet Explorer for Automation with the same properties and methods. This is in part shown with the STYX demo prog.

Details of the Object interface can be found from Microsoft at
http://msdn.microsoft.com/en-us/library/aa752084(VS.85).aspx

What Microsoft calls “Methods” is what STYX refers to as “Com Func”.
Eg. To call The “QUIT” Method
Use: Call Com Func 1, "Quit"

NB. The 1 is the number of the COM object instance that you created by using the Load Com Class command.


Microsofts “Properties” are accessed by STYX using either “GET COM” to read the value or “SET COM” to set the value, followed by the supported datatype, “FLOAT, INTEGER, POINTER or STRING”

Eg. Set Com Integer 1, "Visible", 1
This shows the application using IEXplore.Visible

To make it invisible, all remains the same except the last argument which is set to 0 (False)
Eg. Set Com Integer 1, "Visible", 0


You can set the position using the “Height, Top, Left and Width” properties.
Eg:
Set Com Integer 1, "Top", 200
Set Com Integer 1, "Left", 100
Set Com Integer 1, "Height", 300
Set Com Integer 1, "Width", 400



If you don’t want the user to change the size then you can set the “Resizeable” property to false(0).
Eg: Set Com Integer 1, “Resizeable”,0


You can turn the “Address Bar”, “Menu Bar” and “Tool Bar”, on and off using:
‘Turn on OFF the Bars
Set Com Integer 1, "AddressBar", 0
Set Com Integer 1, "MenuBar", 0
Set Com Integer 1, "ToolBar", 0

‘Turn ON the Bars
Set Com Integer 1, "AddressBar", 1
Set Com Integer 1, "MenuBar", 1
Set Com Integer 1, "ToolBar", 1


If you make IE full screen then there are no window borders or menu bars, just the page being displayed. This can be done using the following:
Set Com Integer 1, "FullScreen", 1

And can be set back to windowed mode using:
Set Com Integer 1, "FullScreen", 0





If you mess things up with your IE while trying things out, please remember START, CONTROL PANEL, INTERNET OPTIONS, ADVANCED, RESET.



Hope this has been of some help.

Turning Possibilities into Realities

Login to post a reply

Server time is: 2019-10-19 08:16:29
Your offset time is: 2019-10-19 08:16:29