Monthly Archives: April 2013

Accessing Images from Compressed Folders

OpenInsight’s BITMAP property allows developers access images by path name or from within a resource file (.DLL or .EXE):

// Pull image from a path. 
Set_Property(Ctrl, 'BITMAP', 'BMPS\Check.png') 

// Pull image from a resource file. 
Set_Property(Ctrl, 'BITMAP', 'Images.dll#check')

Storing images within a resource file makes an application more professional and prevents the curious end user from modifying the images stored on the hard drive. However, many developers are unfamiliar with the technology necessary to manage images from within a resource file. Most software development kits provide tools for this. If you are unfamiliar with (or would rather not learn) these SDKs there are simple utilities that can be downloaded to make this relatively easy (e.g. one that seems to work well is Resource Hacker.)
Continue reading

Using the TabColors Property

In another article we highlighted the stunning Color Fill feature that many developers might not have been aware of. Several controls were demonstrated in that article. One example that was not pictured was the SRP Tab control, which will be the focus of this article.

There are two reasons which inspired me to highlight the SRP Tab control. First, being one of our very first ActiveX controls, it has received very little attention in recent years. Second, while doing an application review the other day I came across a window that instantly caught my attention:


The gradient background made me wonder if this application was being developed in OpenInsight 9.x, since that is when Revelation introduced this feature. This is demonstrated below in the Report Builder Page Setup dialog:


However, I was pretty sure this application was not designed in OpenInsight 9.x. I checked the About box. Sure enough, version 8.0.1. I was then reminded of a color-based ActiveX property that we introduced with little fanfare: TabColors. Therefore, if I had forgotten about this feature in our own controls, it seemed like a good candidate for a new article.
Continue reading

Using the Color Fill Property Type

With the proliferation of so many ‘home improvement’ type television programs it is hard not to discover how important color is for both aesthetic and functional purposes. Many of the same principles apply to software design as well. However, like home owners with little experience in interior design, many OpenInsight developers struggle to create a visual experience that is both intuitive and attractive. To make matters worse, modern systems commonly incorporate desktop themes and gradients as seen in the My Computer window below:


OpenInsight’s out of the box toolkit is somewhat limited in this area, making it challenging for the developer to offer these kinds of visual enhancements. One popular work-around is to create (or download) custom images and use them with PUSHBMP or BITMAP controls in very creative ways. While this helps, it doesn’t provide true theme support. Quite often these images use background colors to blend with the form. This works well while the user stays in the same theme. Once this is changed the well-crafted image looks glaringly out of place. This problem was one of the primary reasons SRP began developing ActiveX controls.

Now, in addition to support for Transparency, Alpha Channel, RGB/HSL colors, System colors, MS Office colors, and HTML colors, SRP ActiveX controls give the developer custom Gradient options via the Color Fill property type. Since all of the above are fully documented in our SRP OLE Controls help document, this article will focus on a few examples in hopes that it will inspire you to greater visual awesomeness.
Continue reading

Displaying Content in Internet Explorer

Many programmers have realized the benefits of using a browser ActiveX control within an OpenInsight form. HTML provides an easy way to deliver rich, flexible, and dynamic content. For example, this is a popular technique for building application dashboards.

There are occasions when an ActiveX browser control will not be ideal (or work at all.) A recent project required OpenInsight to display some rather complex reports that were created on-the-fly via a web service. In and of itself this was not a problem. We were able to make our request and get back the report within an XML wrapper. However, the HTML content included various elements that precluded the use of an ActiveX control, such as various dependencies upon the document object model (DOM). Therefore, another method for displaying HTML was required.

The Internet Explorer object provides us a way to launch an instance of Internet Explorer that is virtually under the control of OpenInsight. It shares the same methods and properties as the the ActiveX browser control so it will be somewhat familiar to many programmers. Comprehensive documentation can be found on the Microsoft Developer Network website.

In OpenInsight 7.1 and later you can use the Basic+ OLE/COM functionality to utilize this object. Earlier versions of OpenInsight require the assistance of third-party utilities such as our SRP_COM function. The following code samples will use the native Basic+ functionality but anyone who wishes to use SRP_COM will find that the syntax is remarkably similar.
Continue reading

Using the SRP Editor for Code Presentation

For some time now various methods for presenting code into web pages and portable documents have been introduced. Earlier methods simply formatted code within a gray box. Recent methods have included support for color coding but still require that your code be copied into another utility. Recognizing the value of displaying richly formatted code we added this feature directly into the SRP Editor several years ago.


Therefore, the programmer only needs to select their code, right-click, and click on the ‘Copy as HTML Code’ menu item. Using this results in a block of HTML code that you can now paste into a document that supports HTML formatting, including many blog pages…
Continue reading

What’s Under The Hood


Recently a customer reported that they were having trouble installing the SRP Set MinMaxInfo utility. Immediately I began to get suspicious and through a quick Q&A session discovered that the customer was attempting to install this from the three year old installer which is still available from our Downloads page. This served as a helpful reminder that our Downloads page is seriously outdated. Not only do we no longer support the original installer for the SRP Set MinMaxInfo utility, we no longer provide that as a stand-alone utility! Instead we have bundled it within our feature rich (but still free) SRP Utilities.

We realized that perhaps many OpenInsight developers might not be aware of this product. Although it was unveiled during one of our 2008 Revelation Users Conference presentations we never updated our website to make it available to the community at large. This was somewhat on purpose as it is customary for conference materials (or product in this case) to remain exclusive to conference attendees for a period of time in order to encourage more people to participate. It is now time to showcase the many tools that comprise the SRP Utilities package. To kick things off we will focus on some very useful Array functions.
Continue reading