Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Using the SRP Schedule Control

It has been awhile since I started using the SRP Controls. I have recommended and introduced a client to these controls, have purchased the Schedule Control, and registered the ocx at their site.
Now my question is how do I add the Schedule control to an OI Form through the Form Designer?
Do I add an OLE Control to the Form and somehow set it's properties?
Please advise.
Phil Hessemer


  • Phil,

    I think you already understand how to add the Schedule control to the form. You previously sent me a screen shot that suggested you got the Prog ID correctly entered and the control was able to visibly display. Is that correct? If so, then you will want to position and size the control as you would like it to appear to the end user.

    You do not, however, want to set the properties via the control's Properties dialog box. Most of the critical properties for the SRP Schedule Control require complex MV structures and it will not be feasible to enter these in the dialog box. So you should expect to do your setup in the CREATE event handler of your form.

    I followed up on your recent email to me and suggested the best way to start is to focus on two properties: The EntityList property and the AppointmentList property. These two should get you 90% of the Schedule control set up. Entities is the abstract term for the columns - which can represent trucks, doctors, pools, rooms, fields, etc. Appointments are the actual blocks that define the date, time, duration of a scheduled event.
  • I have the Schedule Control on a form in OI 8.0.1. I am also using my own monthly calendar using the SRP Button control for each day of the month. I periodically am getting the error message: "OpenInsight Has Stopped Working". There is a Debug button in the message which displays "Visual Studio Just In-Time Debugger" in the title and "An unhandled Win32 exception occurred in OINSIGHT.exe [326164]......"

    The message is not related to any one statement when I step through the OI program debugger. It happens after set_property on the Schedule Control and the Button Controls. Usually it takes several steps before the message occurs and not always at the same time.

    Any ideas or suggestions?
    Is this due to using OI 8.0.1?
    Is this due to workstation resources? I'm using Windows 7 with 4GB of RAM.
  • Phil,

    I've seen these kind of crashes before. They all boil down to a specific cause, naturally, so the trick is isolating that cause. I am very doubtful this is due to resource issues on the workstation. OI 8.0.1 could be related but the only way to know for sure is to upgrade and test everything all over again. I also assume you are using one of the latest versions of our controls.

    Your specific use of the Schedule and Button controls is not out of the ordinary. Nothing about what you are describing is sounding any alarms for me. Perhaps you are doing something with the SRP Button control that is revealing a memory leak. Are you changing any properties on the SRP Button control dynamically on a regular basis?

    All I can offer you at this time is to be vigilant in your testing and observation. Try removing any use of the SRP Button control (temporarily) to see if this can be linked to the SRP Schedule control (then vice-versa.) Of course, all of this might be a red herring and the problem is related to something else. You might also want to create your own logging utility in hopes of tracking the last successful interface call with the OLE controls.
  • it's good to know it's not 8.01 as the client is not prepared to upgrade at this time.
    Perhaps you are doing something with the SRP Button control that is revealing a memory leak. Are you changing any properties on the SRP Button control dynamically on a regular basis?
    I agree it looks like a 'memory leak' due to the randomness of this situation but I can force the error if I just go through the normal steps a user would go through changing appointment dates and time.
    Yes I am changing the color properties of the SRP buttons dynamically on a regular basis. The program has record updates, UPDATE_INDEX, and uses BTREE.EXTRACT to get the current appointments.

    Any more ideas on what may be causing the memory leak?
  • Phil,

    Please note that I did not say it wasn't (or couldn't be) related to 8.0.1. However, I am skeptical of this connection.

    If you can force the error then that is a very good thing. I still recommend creating a simple logging utility. Since you know what parts of your code are used when you "go through the normal steps" then this ought to be relatively easy to isolate.
Sign In or Register to comment.