![]() |
Skin Issue with Command Buttons |
Post Reply ![]() |
Author | |
shagge22 ![]() Newbie ![]() ![]() Joined: 21 November 2006 Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() 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... |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
shagge22 ![]() Newbie ![]() ![]() Joined: 21 November 2006 Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
This code also works for me:
Ca n you download attachment and check if it works for you: DynButton.zip
may be it is something already changed... Do you have 10.3.1 version ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
shagge22 ![]() Newbie ![]() ![]() Joined: 21 November 2006 Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
Thank you for the download. I will give it a try. I have version 10.3
|
|
![]() |
|
shagge22 ![]() Newbie ![]() ![]() Joined: 21 November 2006 Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
blkn ![]() Newbie ![]() ![]() Joined: 07 November 2006 Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() |
Unable to Execute the application in windows vista, it throws the following error ![]() Source file of the project uploads/20070110_090700_Testvista.zip
Regards
Bala
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
Did you register ocx ? What ocx version do you have?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
blkn ![]() Newbie ![]() ![]() Joined: 07 November 2006 Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() |
Yes, we registered the ocx.
Version:CodeJock.10.3.1
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
See answer on next thread - https://forum.codejock.com/forum_posts.asp?TID=5627
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |