Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Using VB controls in Lotus Notes

Posted on 2007-12-05
5
406 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 Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

809 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