Solved

ActiveX object in form

Posted on 2002-03-25
9
261 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
ID: 6893741
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
ID: 6893848
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
ID: 6894313
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
ID: 6894653
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 10

Expert Comment

by:zvonko
ID: 6894669
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
ID: 6894712
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
ID: 6895342
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
ID: 6895844
That's the ticket.
Thanx, zvonko
0
 
LVL 10

Expert Comment

by:zvonko
ID: 6895863
anytime <|;-)

how far did you progress with your domino3 RunOnServer attempts?

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lotus Domino server 9 7 69
Lotus Notes transfer mail box problem 6 91
Inconsistent date field in Lotus Notes 6 89
Code for extraction to mkdir folder 5 49
For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
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…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

23 Experts available now in Live!

Get 1:1 Help Now