FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ActiveX formats
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
ActiveX formats
Posted: Thu Jun 04, 2009 01: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)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: ActiveX formats
Posted: Thu Jun 04, 2009 04:41 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: ActiveX formats
Posted: Sun Jun 07, 2009 12:07 AM
Hi Antonio,

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


I can get the Calendar and Datepicker up on the screen like this:
Code (fw): Select all Collapse
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 (fw): Select all Collapse
oDate:AttachToCalendar(oAct)


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


But it too will not work.
Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: ActiveX formats
Posted: Sun Jun 07, 2009 06: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
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: ActiveX formats
Posted: 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)

Continue the discussion