Using ActiveX Objects in a window?

Windows specific forum
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Using ActiveX Objects in a window?

Post 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
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Using ActiveX Objects in a window?

Post 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)
User avatar
Kiffi
Addict
Addict
Posts: 1510
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Using ActiveX Objects in a window?

Post 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
Hygge
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Using ActiveX Objects in a window?

Post 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
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Using ActiveX Objects in a window?

Post by jassing »

I tried searching but came up empty....

Image
User avatar
Kiffi
Addict
Addict
Posts: 1510
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Using ActiveX Objects in a window?

Post 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
Hygge
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Using ActiveX Objects in a window?

Post 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
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Using ActiveX Objects in a window?

Post by jassing »

Thanks for the tips.
-josh
Post Reply