Print Page | Close Window

SOLVED: How to set Font of Form at runtime

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=13586
Printed Date: 04 May 2024 at 5:23pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED: How to set Font of Form at runtime
Posted By: Aaron
Subject: SOLVED: How to set Font of Form at runtime
Date 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....



Replies:
Posted By: Oleg
Date 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


Posted By: Aaron
Date 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....


Posted By: Oleg
Date 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


Posted By: Aaron
Date 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....


Posted By: Oleg
Date 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


Posted By: Aaron
Date 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....


Posted By: Oleg
Date Posted: 06 March 2009 at 1:47pm
Hi,
 
yes, you need fix all paths inside ini file.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Aaron
Date 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....


Posted By: Oleg
Date 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


Posted By: Aaron
Date 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....


Posted By: Oleg
Date Posted: 09 March 2009 at 3:24am
Hi,
 
Here sample: https://forum.codejock.com/uploads/20090309_032441_Skins.zip - Skins.zip


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Aaron
Date 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....


Posted By: Oleg
Date Posted: 10 March 2009 at 1:58am
Hi,
 
I guess you exporting it somehow wrong :)


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net