Solved

Using VB controls in Lotus Notes

Posted on 2007-12-05
5
401 Views
Last Modified: 2013-12-18
Is there anyone out there familiar with using vb controls on a form in Lotus Notes?  I am trying to get a handle to a vb text box that is in a vb frame on a notes form.  I can get a handle to the frame in lotusscript, but not to the textbox inside of it.  It seems the only way not to allow the user to resize the textbox is to place it in a vb frameset, but then I get this problem.


Thanks in advance for your help.

0
Comment
Question by:KDrago
  • 2
  • 2
5 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 20412112
Could you shed some light on this solution? What's wrong with the standard textboxes of Notes, why not use them instead? If it's the "resize", when does the textbox get resized?
0
 

Author Comment

by:KDrago
ID: 20412289
There is nothing wrong with notes textboxes.  This is not a mission critical question, just something I was playing around with when I noticed that you can't seem to get a handle on any objects in a vb frameset through lotusscript.  It would be nice to be able to utilize some of the vb controls, since, from a design point, they can add more to the standard notes elements.  

The resize issue I was speaking of was regarding a vb textbox I put on a notes form.  I initially added it directly to the form.  What seems to happen is when the form is run, the user can resize the vb textbox.  I've tried accessing the properties of the textbox to see if I can restrict this, to no avail.  So I placed the vb textbox in a  vb frameset and voila!  I can no longer resize the textbox, however I also can't get a handle it, only the frameset it resides in.
0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 250 total points
ID: 20412852
Ah, I get it. And there is no way you can access the textbox THROUGH the frameset, i.e. that the textbox becomes a child object of the frameset somehow? Just guessing...
0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 250 total points
ID: 20417120
The frameset is a container. Notes only knows about things in the container that have been exposed by the container. The only thing Notes knows about is the object dirfectly embedded in Notes.

So, if the container allows you to enumerate its obkects or has a mehod whereby you can request an object by name, then LotusScript will be able to access that. It can get tricky, and not all things are possible even when the Notes-embedded object exposes some method or property, because there may be an incompaible interface.

You also run into problems if you need to consume an event. Some controls work by assuming you are attaching an event handler to them, and they just fire the event handler. LotusScript has no way of binding to those events, so you have no way to consume them, so there is no way to respond to them.
0
 

Author Comment

by:KDrago
ID: 20419385
After spending way too much time, I figured out the syntax for referencing the objects in the frameset.  I will post here in case it can be of any use to others.  There is very little documentation for using the VB controls in Notes, but I can see why.  The controls behave unpredictably, I suppose for the reasons qwaletee described above.
       
        'set an object to the frame control
        Set frObj = uidoc.GetObject("fraVB")
        'reference the object in the frame through the frame's controls class
      Set txtGetObj = frObj.controls("TextBox1")

Thanks to both of you for your help.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now