ActiveX formats

ActiveX formats

Postby Jeff Barnes » Thu Jun 04, 2009 1:21 am

Hi,

I am having some difficulty trying to figure out the format of the ActiveX commands.

Is there a guide or something that can explain what and when you use items from an object list.
I'm having a hard time explaining what I'm after ... maybe some examples will help...

Playing with the codejock calendar controls I look at the "object browser" in in Microsofts VB.

The following (at bottom) are examples of what I must use for things to work but I am only coming across these either by finding an example or by trial and error. How do you know what to put after the "oAct:"
I guess I am just having a hard time getting my mind around this.

If I look at the object viewer I see for example:
Class DatePicker
Then there is a list of "Members of DatePciker". No matter what I try ... can't get a DataPicker on the screen.
I figured doing a oAct:DatePicker:AttachToCalendar() would work but no luck.

If I could figure out how the format works I could save a lot of time.


oAct:SetDataProvider:="Provider=XML;Data Source=\FusionEMR\Events.xml"
oAct:DataProvider:Open()
oAct:DayView:Timescale := 30
oAct:ActiveView:ShowDay:= Date()
oAct:ViewType:=xtpCalendarDayView
oAct:Options:WorkDayStartTime("8:00:00 AM")
oAct:Options:WorkDayEndTime("8:00:00 PM")
oAct:DayView:ScrollToWorkDayBegin()
oAct:VisualTheme:=3
oAct:ShowTimelineButton:= .f.
oAct:ShowCaptionBar:= .t.
oAct:ShowCaptionBarScrollDateButtons:= .t.
oAct:ViewType:= xtpCalendarWorkWeekView
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: ActiveX formats

Postby Antonio Linares » Thu Jun 04, 2009 4:41 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: ActiveX formats

Postby Jeff Barnes » Sun Jun 07, 2009 12:07 am

Hi Antonio,

It looks like this is the way to solve the problem...
Code: Select all  Expand view
Call DatePicker.AttachToCalendar( CalendarObject.Object )


I can get the Calendar and Datepicker up on the screen like this:
Code: Select all  Expand view
oDate:= TActiveX():New( oWnd, "Codejock.DatePicker.13.0.0", 100, 0, 200, 550 )         
oAct := TActiveX():New( oWnd, "Codejock.CalendarControl.13.0.0", 100, 200, 800, 550 )  
 


They way I would think I need to use the AttachedToCalendar() function is like this:
Code: Select all  Expand view
oDate:AttachToCalendar(oAct)


But it does not work, so, how do I convert their solution for use with Fivewin?
I have tried:
Code: Select all  Expand view
oDate:AttachToCalendar(oAct:object)


But it too will not work.
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: ActiveX formats

Postby Antonio Linares » Sun Jun 07, 2009 6:51 am

Jeff,

Try it this way:

oDate:AttachToCalendar( ActXPdisp( oAct:hActiveX ) )

or

oDate:AttachToCalendar( TOleAuto():New( ActXPdisp( oAct:hActiveX ) ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: ActiveX formats

Postby Jeff Barnes » Sun Jun 07, 2009 12:13 pm

Thanks Antonio ... I would never have figured this out without your help.

The 2nd option works :D
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: jair, nageswaragunupudi and 115 guests