Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Skin Framework
  New Posts New Posts RSS Feed - SOLVED: How to set Font of Form at runtime
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: How to set Font of Form at runtime

 Post Reply Post Reply
Author
Message
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: How to set Font of Form at runtime
    Posted: 05 March 2009 at 4:48am
Hi,
 
Is it possible to set another font for form caption at runtime when Skin is already applied?
 
Thanks a lot
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2009 at 8:01am
Hi,
 
Sorry, no :( Only to change all fonts with replacing skin ini.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2009 at 10:03am
Hi Oleg,
 
Would it be possible to load new skin with ini as seperate file or resource ???
 
Thanks
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2009 at 2:09am
Hi,
 
Yes, call first
 
SkinFramework.CreateSchema
and SkinFramework.SetWindowTheme to apply it for some window.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2009 at 3:54am
Hi Oleg,
 
It doesn't do what I want
 
Well this is what I tried:
  1. Exported Office2007.cjstyles to resource script file
  2. All images and ini files are in App.Path\res
  3. Code in form: 
    • Dim skinSchemaTemp As SkinSchema
    • Set skinSchemaTemp = SkinFramework.CreateSchema(App.Path & "\res", App.Path & "\res\themes.ini")
    • SkinFramework.SetWindowTheme frmMain.hWnd, skinSchemaTemp
  4. Returns error because schemaSkin is Nothing
 
Can you please tell me what is wrong?
 
 
   
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2009 at 5:24am

try to compile new cjstyles with our SkinBuilder.  

also try
Set skinSchemaTemp = SkinFramework.CreateSchema(App.Path & "\res", "NormalBlue.INI")
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2009 at 7:22am
Hi Oleg,
 
Set skinSchemaTemp = SkinFramework.CreateSchema(App.Path & "\res", "NormalBlue.INI")  works but entire form (caption, borders, system buttons etc. etc.) are just black, no images are shown. Also menu isn't showing, only dropdown menu items.
 
Do I have set something else?
 
Thanks
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2009 at 1:47pm
Hi,
 
yes, you need fix all paths inside ini file.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2009 at 2:26pm
Hi Oleg,
 
This is what SkinBuilder exported in ini file:
 
ImageFile = Blue\FrameCaption.png
 
All images are in ...\res\*.png
Ini files are in ...\res\*.ini
 
 
What should it be?
 
I tried to change path in ini file:
 
  1. full path
  2. \res\FrameCaption.png
  3. FrameCaption.png

And it still didn't work

Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2009 at 4:04pm
Hi,
 
replace
ImageFile = Blue\FrameCaption.png
to
ImageFile = FrameCaption.png
 
or move all images to Blue subfolder.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2009 at 3:28am
Hi Oleg,
 
I can't get it to work  I guess you have to test this yourself (maybe just once)
 
Thanks
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2009 at 3:24am
Hi,
 
Here sample: Skins.zip
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2009 at 4:34pm
Hi Oleg,
 
Thanks for sample, so now I know it can be done  I wonder why it doesn't work when exporting to resource ???
 
I will look into this again and report it to you (or others who want to do the same).
 
Thanks again
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2009 at 1:58am
Hi,
 
I guess you exporting it somehow wrong :)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.