Solved

Using VB controls in Lotus Notes

Posted on 2007-12-05
5
411 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
[X]
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
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

696 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