ActiveX object in form

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 ... ?
LVL 3
GunsenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zvonkoCommented:
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
GunsenAuthor Commented:
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
zvonkoCommented:
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
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

GunsenAuthor Commented:
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
zvonkoCommented:
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
GunsenAuthor Commented:
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
zvonkoCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GunsenAuthor Commented:
That's the ticket.
Thanx, zvonko
0
zvonkoCommented:
anytime <|;-)

how far did you progress with your domino3 RunOnServer attempts?

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.