Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OCX - How do you get it into Clarion7 1

Status
Not open for further replies.

emaduddeen

Programmer
Mar 22, 2007
184
US
Hi Everyone,

Can you tell me how to get an OCX control into Clarion7?

Also can you tell me how to set a property of the control within my embeds? For example I find a nice fancy 3d OCX label control that is used in VB and one of the properties is to set the text 3d effect on or off (true or false).

Thanks.

Truly,
Emad
 
Hey!

register the ocx using dos prompt: Regsvr32 MSMAPI32.OCX

Here is some simple HAND CODE. Don't ask me anything about templates since I do not use them. Sorry Dude!

!============================================================================================================================================================
Win WINDOW(EHeading),AT(,,529,275),FONT('Arial',8,COLOR:Black,FONT:regular,CHARSET:ANSI),COLOR(COLOR:White),CENTER,IMM,ICON('\\server\Dev\Images\BROWSER.ico'),ALRT(AltLeft),ALRT(AltRight),ALRT(TabKey),ALRT(ShiftTab),STATUS,TIMER(100),GRAY,MAX,RESIZE,AUTO
OLE,AT(0,0,529,262),USE(?BrowserObj),FULL,HIDE,CREATE('Shell.Explorer.2'),COMPATIBILITY(020H)
END
END
CODE
Open(Win)
OCXRegisterEventProc(?BrowserObj,Events)

UnHide(?BrowserObj)
?BrowserObj{'Silent'} = True
?BrowserObj{'Navigate(URL="' & Clip(URL) & '",Flags=0)'}
Select(?BrowserObj)

ACCEPT
END
CLOSE(WIN)

!============================================================================================================================================================
UnSelect Routine
!============================================================================================================================================================
?BrowserObj{'document.execCommand("Unselect")'}

!============================================================================================================================================================
SelectAll Routine
!============================================================================================================================================================
?BrowserObj{'document.execCommand("SelectAll")'}

!============================================================================================================================================================
Copy Routine
!============================================================================================================================================================
?BrowserObj{'document.execCommand("Copy")'}
?BrowserObj{'document.execCommand("Unselect")'}


This code may not compile since I copied and pasted from a home grown internal browser we use, but it will give you the gist of what is up. The parameters/methods can be tricky to set sometimes but trial and error will get you there.

There you go!
 
Hi xXHwyStarXx,

I will try to figure out the code and hack
around with what happens.

Thanks.

Truly,
Emad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top