Problems with OCX, VisualBasic Translation to Clarion 
Author Message
 Problems with OCX, VisualBasic Translation to Clarion

Hello please could sombode have a look at my code about VisualBasic
-'translation'

I don't know how to referenz AME:Commandbar-Objekt in the following
code.
The Visual Basic-Code looks like this

Set cmdBar1 =_
CommandBars.Add(name:="Test",Position:=msoBarTop,MenuBar:=True;Temporary:=TRUE)
cmdBar1.Visible = True

I convertet it with a Clarionsample to the following

LOC:WordAppObj       CSTRING(35)
LOC:WordDocObj       CSTRING(35)
AME:CommandBar       CSTRING(35)
AME:CommandControls  CSTRING(35)

After Opening the Window

  ?WordAppOLE{PROP:ReportException} = TRUE
  LOC:WordAPPObj = ?WordAppOLE{'Application'}
  IF LOC:WordAppObj = 'GetPropertyFailed' OR LOC:WordAppObj = 'No ole
automation interface' THEN
    ?WordAppOLE{PROP:CREATE} = 'Word.Application.8'
    LOC:WordAppObj = ?WordAppOLE{'Application'}
  ELSE
  END

  ?WordAppOLE{PROP:HIDE} = TRUE
  ?WordAppOLE{LOC:WordAppObj & '.WindowState = 4'}
  ?WordAppOLE{'Visible'} = 1
  LOC:WordDocObj = ?WordAppOLE{'Documents.Add("Normal.dot")'}

  res# =?WordAppOLE{'CommandBars.Count'}
  LOOP i# = 1 TO res#
    IF CLIP(?WordAppOLE{'CommandBars(' & i# & ').name'}) <> 'AME' THEN
      CYCLE
    ELSE
      AME:CommandBar =
?WordAppOLE{'CommandBars.ADD("AME",msoBarLeft,False,True)'}
      i# +=1
      BREAK
    END
  END

! ?WordAppOLE{'CommandBars('&i#&').Visible'} = TRUE      
!???????????? Why dos this work fine????????????

?WordAppOLE{'CommandBars("'&AME:CommandBar&'").Visible'}  = True  ! !
!???????????? And this not ????????????



Wed, 30 Oct 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem with Internet Explorer ocx in Clarion 4

2. Problems using Catalyst OCX in Clarion 5

3. EDI translation software with Clarion

4. Translation - Basic to Clarion

5. Clarion 3.1 Language Translation

6. OCX call in Clarion

7. Clarion 5b and Satellite Forms OCX

8. OCX and Clarion

9. HTML render - browser component (OCX or DLL) for Clarion

10. SNMP ocx or llib for Clarion?

11. using ocx/ole & clarion

12. OCX and Clarion 5

 

 
Powered by phpBB® Forum Software