KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Adding non-KixForms Controls

 
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion
View previous topic :: View next topic  
Author Message
rjdegraff
KiXforms Dabbler
KiXforms Dabbler


Joined: 12 Sep 2007
Posts: 8
Location: Winnipeg, Manitoba, Canada

PostPosted: Mon Jun 30, 2008 2:31 pm    Post subject: Adding non-KixForms Controls Reply with quote

Is it possible to add a non-KixForms control to a KixForm? For example, in vbScript can I

Dim System: Set System = CreateObject("KiXforms.System")
Dim frmMain: Set frmMain = System.Form
frmMain.Size = System.Size(525, 501)
frmMain.Text = "My Test Form"
frmMain.FormBorderStyle = 5

set dtp = CreateObject("MSComCtl2.DTPicker")

frmMain.Controls.Add(dtp)

frmMain.Visible = "True"
Do While frmMain.Visible
Execute(frmMain.DoEvents)
Loop

------------------------------

As you can see, I would like to add a date picker control. Doing it as above, however, results in the following error:

test.vbs(9, 1) Kixforms.System: Unable to cast COM object of type 'System.__ComObject' to class type 'Kixforms.Control'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Mon Jul 07, 2008 5:56 pm    Post subject: Reply with quote

yeah i'd say this is not doable. thinking out loud, the KiXforms.System object has a fixed list of children objects. Since MSComCtl2.DTPicker is not a valid child object of KiXforms.System, it cannot be a child under the form.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Mon Jul 07, 2008 7:07 pm    Post subject: Reply with quote

yup, not doable - would have to explicitly add that control into kf.net
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Tue Jul 08, 2008 9:19 pm    Post subject: Reply with quote

A Date Picker ?

I'd say please explicitly add this one or a similar one to kf.net and if you are at it please do it also for kf.classic ....

Desperately yours Smile

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
rjdegraff
KiXforms Dabbler
KiXforms Dabbler


Joined: 12 Sep 2007
Posts: 8
Location: Winnipeg, Manitoba, Canada

PostPosted: Tue Jul 08, 2008 9:20 pm    Post subject: Adding non-KixForms Controls Reply with quote

Ah well. In three weeks I'll be retired and it will be someone else's worry. Thanks anyway.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> KiXforms.NET Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group