Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Skin Framework
  New Posts New Posts RSS Feed - Skin Issue with Command Buttons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skin Issue with Command Buttons

 Post Reply Post Reply
Author
Message
shagge22 View Drop Down
Newbie
Newbie
Avatar

Joined: 21 November 2006
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote shagge22 Quote  Post ReplyReply Direct Link To This Post Topic: Skin Issue with Command Buttons
    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...

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: 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
Back to Top
shagge22 View Drop Down
Newbie
Newbie
Avatar

Joined: 21 November 2006
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote shagge22 Quote  Post ReplyReply Direct Link To This Post 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.
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: 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: DynButton.zip
 
may be it is something already changed... Do you have 10.3.1 version ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
shagge22 View Drop Down
Newbie
Newbie
Avatar

Joined: 21 November 2006
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote shagge22 Quote  Post ReplyReply Direct Link To This Post Posted: 29 November 2006 at 9:15am

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

I have version 10.3
Back to Top
shagge22 View Drop Down
Newbie
Newbie
Avatar

Joined: 21 November 2006
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote shagge22 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
blkn View Drop Down
Newbie
Newbie
Avatar

Joined: 07 November 2006
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote blkn Quote  Post ReplyReply Direct Link To This Post 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 uploads/20070110_090700_Testvista.zip
 
Regards
Bala
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 January 2007 at 10:05am
Hello,
Did you register ocx ? What ocx version do you have?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
blkn View Drop Down
Newbie
Newbie
Avatar

Joined: 07 November 2006
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote blkn Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2007 at 12:13am
Yes, we registered the ocx.
 
Version:CodeJock.10.3.1
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: 11 January 2007 at 2:26am
Hi,
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.188 seconds.