Solved

ActiveX object in form

Posted on 2002-03-25
9
259 Views
Last Modified: 2013-12-18
I have created a OCX in VB, and inserted this (it includes UI) into the design of a form.
I have set the name of it, but im having problem accessing this object.  It says 'variant does not contain an object'.
Anything i have forgotten to do ... ?
0
Comment
Question by:Gunsen
  • 5
  • 4
9 Comments
 
LVL 10

Expert Comment

by:zvonko
Comment Utility
place here at least the LotusScript code for accessing your registered control.
Most the times I am reading my typos so what I want to read. Therefore I supose you are doing the same: overreading your typos :-)
0
 
LVL 3

Author Comment

by:Gunsen
Comment Utility
What is the scope of this inserted object?

The object-name is:  console
It try using a property in the ocx, and tried the following:
SettingsFile = "E:\myfile.ini" (in initialize event)
console.SettingsFile = "E:\myfile.ini"
formname.console.SettingsFile = "E:\myfile.ini"

Then i get the error (variant does not contain
an object).

Is there any special considerations in destroying this attached design object?
0
 
LVL 10

Expert Comment

by:zvonko
Comment Utility
OK,

before doing anything else, set this two agent Options:
Option Public
Option Declare

The second Option will warn you if Object wrong declared or Object properties and methods invoced that are not accessible.

What line do you create your Object?
What is the Object variable: formanme or console?

Normal doing is like this:
Dim formname As Variant
Set formname = CreateObject("myRegApp")
formname.SettingsFile = "E:\myfile.ini"

and this depends on Properties and Methods of "myRegApp" or what the name of your registered application object creator is.

If your OCX is correct registered on this test machine, then you can see your registered Properties and Methods in "OLEClasses" browser left from the agent source code. Look for this.

0
 
LVL 3

Author Comment

by:Gunsen
Comment Utility
Ok, i have done a Create|Insert of the OCX.
Is this wrong (i already know what you are saying).
If thats wrong approach, how do i assure that the control is at right UI place...
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 10

Expert Comment

by:zvonko
Comment Utility
I am loosing the thread :-)

can you send me please your database and thius OCX control with a short description to: zp@arcor.de

Please do zip it for download time reduction :-)

If you decide to do it on your own: icluding the OCX into form is also a way, but with reduced command set.
Better aproach is to instatiate the object in BackEnd.



0
 
LVL 3

Author Comment

by:Gunsen
Comment Utility
Hi, appritiate ur answer.

This propblem is more in general.
If i insert an ocx directly on a form, how do i address it (i know this is an applet in notes).

I allways have Explicit declares.

The thing im wondering about is how to address this object. O have inserted the object (control) onto a form and then... whats the name of this instanced object ?

This is not back-end this is front end.

300 p is the value...
0
 
LVL 10

Accepted Solution

by:
zvonko earned 300 total points
Comment Utility
OK, I do not know what your OCX is doing, so let us use a general OCX.

I placed "Microsoft ProgressBar Control, version 6.0" on my form.
The name placed in OCX properties was same as OCX name, but I changed it to this string in property dialog: "myProgressBarOne"
The Object name has to be unique on the form.

I added a button to control this OCX.
Here is the silly code for this button:
Sub Click(Source As Button)
  Dim ws As New NotesUIWorkspace
  Dim uidoc As NotesUIDocument
  Dim OCX_OBJ As Variant
  Set uidoc = ws.CurrentDocument
  Set OCX_OBJ = uidoc.getObject("myProgressBarOne")
  If (OCX_OBJ.Value = 0) Then
    OCX_OBJ.Min = 1
    OCX_OBJ.Max = 10
    OCX_OBJ.Value = 1
  End If
  Print "Act: " & OCX_OBJ.Value
  If (OCX_OBJ.Value < OCX_OBJ.Max) Then
    OCX_OBJ.Value = OCX_OBJ.Value + 1
  Else
    OCX_OBJ.Value = 1
  End If
End Sub

The OCX was comming from MSCOMCTL.OCX

Is this working for you?


0
 
LVL 3

Author Comment

by:Gunsen
Comment Utility
That's the ticket.
Thanx, zvonko
0
 
LVL 10

Expert Comment

by:zvonko
Comment Utility
anytime <|;-)

how far did you progress with your domino3 RunOnServer attempts?

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

10 Experts available now in Live!

Get 1:1 Help Now