Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ActiveX object in form

Posted on 2002-03-25
9
Medium Priority
?
281 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
[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
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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
 
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 1200 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
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.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

604 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