Page 1 of 1

Using ActiveX Objects in a window?

Posted: Fri Sep 14, 2012 6:00 am
by jassing
I want to use a dbi control (calendar) in a project I'm working on -- what's the best way to get it going? I'm using PureFORM -- is there a way to add an active/x as custom gadget?

thanks.
-j

Re: Using ActiveX Objects in a window?

Posted: Fri Sep 14, 2012 6:51 am
by jesperbrannmark
I was looking at the dbi controls a while ago. Then I decided to try to implement a webgadget and jquery week calendar view (http://jquery-week-calendar.googlecode. ... _demo.html).
In the end I ended up doing the code myself using PB only and sprites (maybe will change this to canvasgadget in the future).
If I were you I would do it all in PB, very soon you will outgrow the dbi controls for this.. I have some old sample code in the forum if you search for it.
(PB rocks.. activex sux)

Re: Using ActiveX Objects in a window?

Posted: Fri Sep 14, 2012 8:00 am
by Kiffi
jassing wrote:I want to use a dbi control (calendar)
Link? This one? http://www.dbi-tech.com/ComponentPage_dbiCalendar.aspx

Greetings ... Kiffi

Re: Using ActiveX Objects in a window?

Posted: Fri Sep 14, 2012 4:28 pm
by jassing
Kiffi wrote:
jassing wrote:I want to use a dbi control (calendar)
Link? This one? http://www.dbi-tech.com/ComponentPage_dbiCalendar.aspx
Exactly -- what would be the best way to implement that in pb?
jesperbrannmark wrote:I was looking at the dbi controls a while ago. Then I decided to try to implement a webgadget and jquery week calendar view (http://jquery-week-calendar.googlecode. ... _demo.html).
In the end I ended up doing the code myself using PB only and sprites (maybe will change this to canvasgadget in the future).
Well -- the question is bigger than just this example.... it's a "how to" sort of question; Right now I'm leaning towards not even using PB for this project due to limitations (math issues, activex, etc)
jesperbrannmark wrote:If I were you I would do it all in PB, very soon you will outgrow the dbi controls for this.. I have some old sample code in the forum if you search for it.
(PB rocks.. activex sux)
Unfortunately, it's a requirement, not an option... I'll search for your post -- tried searching for activex, but clearly I missed that post...
Thank you.
-josh

Re: Using ActiveX Objects in a window?

Posted: Fri Sep 14, 2012 4:34 pm
by jassing
I tried searching but came up empty....

Image

Re: Using ActiveX Objects in a window?

Posted: Fri Sep 14, 2012 5:13 pm
by Kiffi
this is a simple example:

Code: Select all

IncludePath "[YourPathTo]\COMatePLUS\"
IncludeFile "COMatePLUS.pbi"

Define ctCalendarCtrl.COMateObject

If OpenWindow(0, #PB_Ignore, #PB_Ignore, 800, 600, "ctCalendarCtrl demo")
  
  ctCalendarCtrl = COMate_CreateActiveXControl(0, 0, 800, 600, "ctCALENDAR.ctCalendarCtrl.6")
  
  If ctCalendarCtrl
    
    Repeat
      Select WaitWindowEvent()
        Case #PB_Event_CloseWindow
          Break
      EndSelect
      
    ForEver
    ctCalendarCtrl\Release()
  Else
    MessageRequester("COMate - TreeView ActiveX demo", "Couldn't create the ActiveX control!")
  EndIf    
  
  CloseWindow(0)
  
EndIf
Greetings ... Kiffi

Re: Using ActiveX Objects in a window?

Posted: Fri Sep 14, 2012 5:52 pm
by jesperbrannmark
I never ever used Activex for my calendar, I did the code from scratch. It will be some more work initially for you, but it will be better in the end.
That is what I mean. I am no wizzard at user interface but get a migraine from this
Image
Make your own calendar instead of rely on them, it will look better - act better - be nicer - feel nicer etc
http://www.purebasic.fr/english/viewtopic.php?t=46369
http://www.purebasic.fr/english/viewtop ... 12&t=50113

Re: Using ActiveX Objects in a window?

Posted: Fri Sep 14, 2012 6:09 pm
by jassing
Thanks for the tips.
-josh