DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

activeX DIADEM

Solved!
Go to solution

NI Diadem 10.2 

Vorrei poter utilizzare i controlli ACTIVEX in DIADEM.

Ho trovato nel forum un'esempio di utilizzo del Microsoft Toolbar activeX. 

Provato inserire il controllo MSComctlLib.Toolbar.2

Creato un buttonFile e un BottonMenu 

 

 ''''''''''

Sub MSComctlLib4_EventButtonMenuClick(ButtonMenu)
Dim This : Set This = MSComctlLib4
    Set oButtonmenuT = ButtonMenu
    msgbox "<"& oButtonmenuT.key & ">"&" was pressed..."
    Set oButtonmenuT = Nothing
End Sub

 '''''''''

 restituisce l'errore:

 <Object: MSComctlLib4', Event 'EventButtonMenuClick', line: 3>

Variabile non definita: 'obuttonmenuT'

 

 Stessa cosa con Microsoft TreeView

 

Dove è l'errore?

 

Come si fa a trattare i controlli ActiveX in DIADEM ?????

 

Grazie mille,

 

Yustas

 

0 Kudos
Message 1 of 5
(4,688 Views)

Hi Yustas,

 

Was that Italian?  I could make out parts of it using English and French cognates.  It sounds like you want to use an external ActiveX object as a control in a DIAdem SUDialog.  When I look at the list of registered ActiveX controls on my WinXP computer, I don't see anything resembling "MSComctlLib4".  Is that a control inside an ActiveX library of a different name?

 

The error message you listed, though, is just a syntax error-- you've used a variable ("oButtonmenuT") without defining it.  There are two ways of fixing this-- you can either define that new variable before using it, or you can just use the subroutine parameter as a variable:

 

Sub MSComctlLib4_EventButtonMenuClick(ButtonMenu)
Dim This : Set This = MSComctlLib4
    Dim oButtonmenuT

    Set oButtonmenuT = ButtonMenu
    msgbox "<"& oButtonmenuT.key & ">"&" was pressed..."
    Set oButtonmenuT = Nothing
End Sub

 

 

Sub MSComctlLib4_EventButtonMenuClick(ButtonMenu)
Dim This : Set This = MSComctlLib4
    msgbox "<"& ButtonMenu.key & ">"&" was pressed..."
End Sub

 

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 5
(4,678 Views)

Thanks Brad. I have just tried out your piece of code and it works well.

It was a variable declarition problem. 

 

I am trying to use MSComctlLib.Treectlr control activeX (TreeView)windows XP .

what can I do to creare nodes and manage this activeX control in Diadem?

I can't create "Node":

 

Sub MSComctlLib1_EventInitialize()
Dim This : Set This = MSComctlLib1

   Dim nd
    Set ND = Node  '???????????????????????????? but there isn't any Node
 Set nd = this.X.Nodes.add(, , "Root", "Ciao", "database")

End Sub 

 

where is the error?

 

Thanks..

 

Yustas

 

Sorry for my bad english, but i speak only Italian or Russian:)

0 Kudos
Message 3 of 5
(4,675 Views)
Solution
Accepted by Yustas

Hi Yustas,

 

What do you know, I found an application I worked on for another customer that used that same tree control in a SUDialog.  In that application these 2 methods added nodes:

 

Tree.X.Nodes.Add Null, 0, ParentName, ParentName

 

Set Node = Tree.X.Nodes.Add(ParentName, 4, ChildKey, ChildName)

 

Hope that helps,

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 5
(4,668 Views)

Ok. It works well.

Thanks Brad

 

Yustas

0 Kudos
Message 5 of 5
(4,652 Views)