Print Page | Close Window

Skin Issue with Command Buttons

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=5627
Printed Date: 30 January 2025 at 11:55pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Skin Issue with Command Buttons
Posted By: shagge22
Subject: Skin Issue with Command Buttons
Date Posted: 28 November 2006 at 11:32am

I am using Skinframework Version 10.3 inside my VB6 application. I have a command button that is a control array. When a new button or buttons are added they are not skinned. The buttons are added at run time. See the screen shot provided. Thanks...




Replies:
Posted By: Oleg
Date Posted: 28 November 2006 at 1:26pm
Hello,
 
How you add it?
 
I created new project, added this code:
 
Private Sub Command1_Click()
    Set cmdObject = Form1.Controls.Add("VB.CommandButton", "cmdOne")
   cmdObject.Visible = True
   cmdObject.Caption = "Dynamic CommandButton"
End Sub
Private Sub Form_Load()
SkinFramework1.LoadSkin "Vista.cjstyles", ""
SkinFramework1.ApplyWindow Me.hWnd
End Sub
 
 
seems it works.


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


Posted By: shagge22
Date Posted: 28 November 2006 at 2:11pm

I have one button (cmd_process(0)) on the form. The extra buttons get added based on the number of items in a type def (WFCurrentChoices).

  For iWrk = 0 To UBound(WFCurrentChoices)
      'check to see if we are on the first item
       If iWrk = 0 Then
             .cmd_Process(0).Caption = WFCurrentChoices(iWrk).Label
       Else
              Load .cmd_Process(iWrk)
              'move the button
               .cmd_Process(iWrk).Move .cmd_Process(iWrk - 1).left,
               .cmd_Process(iWrk - 1).top + 480, .cmd_Process(iWrk - 1).Width,
               .cmd_Process(iWrk - 1).Height
               .cmd_Process(iWrk).Caption = WFCurrentChoices(iWrk).Label
               .cmd_Process(iWrk).Visible = True
       End If
  Next iWrk
 
I like to put one button on the form, so I do not have to create and handle all the command button events.


Posted By: Oleg
Date Posted: 29 November 2006 at 12:53am
Hi,
 
This code also works for me:
 
Ca n you download attachment and check if it works for you: https://forum.codejock.com/uploads/20061129_005312_DynButton.zip - DynButton.zip
 
may be it is something already changed... Do you have 10.3.1 version ?


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


Posted By: shagge22
Date Posted: 29 November 2006 at 9:15am

Thank you for the download. I will give it a try.

I have version 10.3


Posted By: shagge22
Date Posted: 29 November 2006 at 9:23am
I discovered the issue. When I first started using the skin control I was putting the control on every form. I have since removed the control on all the forms but my main form, except I had a skin control still on the form that gets called before the buttons get loaded. I removed the control and it works fine now. Thanks for all your help.


Posted By: blkn
Date Posted: 10 January 2007 at 9:07am

Unable to Execute the application in windows vista, it throws the following error

 
 
 
Source file of the project https://forum.codejock.com/uploads/20070110_090700_Testvista.zip - uploads/20070110_090700_Testvista.zip
 
Regards
Bala


Posted By: Oleg
Date Posted: 10 January 2007 at 10:05am
Hello,
Did you register ocx ? What ocx version do you have?


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


Posted By: blkn
Date Posted: 11 January 2007 at 12:13am
Yes, we registered the ocx.
 
Version:CodeJock.10.3.1


Posted By: Oleg
Date Posted: 11 January 2007 at 2:26am
Hi,
See answer on next thread - https://forum.codejock.com/forum_posts.asp?TID=5627 - https://forum.codejock.com/forum_posts.asp?TID=5627


-------------
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