Print Page | Close Window

Border Disappears

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=4244
Printed Date: 29 April 2024 at 7:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Border Disappears
Posted By: Krenshau
Subject: Border Disappears
Date Posted: 18 May 2006 at 3:18pm

I recently started using the skins in visual basic 6.0. I basically used the code from the example to try to use it. I am also using the commandbar control to create the menu and the toolbar.

I added the skin code after the creation of the menu and toolbar. However, when I load the form it starts up, then a second into it the border at the top disappears. I stepped thru the code and it looked like the commandbar resize is readjusting the file menu and toolbar to cover the top border, but I took out the code and it still did it.

below is my code. Should I do something different since I am using the command bar with the skin? It is hard to know what to do without a tutorial or manual.

Thank you for the help.

Private Sub Form_Load()
On Error GoTo ErrorHandler

CommandBarsGlobalSettings.App = App

Dim Control As CommandBarControl
Dim ControlFile As CommandBarPopup
Dim ControlView As CommandBarPopup
Dim ControlHelp As CommandBarPopup
Dim ControlAbout As CommandBarPopup

Dim ToolBar As CommandBar

Dim StatusBar As StatusBar

    ' START MENU BAR CODE

Set ControlFile = CommandBars.ActiveMenuBar.CONTROLS.Add(xtpControlPopup, 0, "&File")
    With ControlFile.CommandBar.CONTROLS
        .Add xtpControlButton, ID_PROGRAM_CLOSE, "Close Program"
    End With
   
Set ControlView = CommandBars.ActiveMenuBar.CONTROLS.Add(xtpControlPopup, 0, "&View")
    With ControlView.CommandBar.CONTROLS
        .Add xtpControlButton, ID_VIEW_TOD, "View Tip of the Day"
    End With
   
Set ControlHelp = CommandBars.ActiveMenuBar.CONTROLS.Add(xtpControlPopup, 0, "&Help")
    With ControlHelp.CommandBar.CONTROLS
        .Add xtpControlButton, ID_GET_LIVE_HELP, "Get Live Help"
    End With
   
Set ControlAbout = CommandBars.ActiveMenuBar.CONTROLS.Add(xtpControlPopup, 0, "&About")
    With ControlAbout.CommandBar.CONTROLS
        .Add xtpControlButton, ID_ABOUT_PEP2006, "About PEP 2006"
    End With
   
    ' START TOOL BAR CODE
   
Set ToolBar = CommandBars.Add("Report Bar", xtpBarTop)
   
    ADDBUTTON ToolBar.CONTROLS, xtpControlButton, ID_COVER_SCREEN, "View Start Screen", True, "View Start Screen"
   
    ADDBUTTON ToolBar.CONTROLS, xtpControlButton, ID_OBSV_REPORT, "Teacher Observation Report", True, "Go to Teacher Observation Report"
   
    ADDBUTTON ToolBar.CONTROLS, xtpControlButton, ID_TPAI_REPORT, "Teacher Performance Appraisal Report", True, "Go to Teacher Performance Appraisal Report"
   
    ADDBUTTON ToolBar.CONTROLS, xtpControlButton, ID_SNAP_REPORT, "SnapShot Report", True, "Go to SnapShot Report"
   
    ADDBUTTON ToolBar.CONTROLS, xtpControlButton, ID_PREOBSV_REPORT, "Pre-Observation Report", True, "Got to Pre-Observation Report"
   
    ToolBar.EnableDocking xtpFlagHideWrap
   
    CommandBars.VisualTheme = xtpThemeWhidbey
   
    CommandBars.ActiveMenuBar.ModifyStyle XTP_CBRS_GRIPPER, 0
    CommandBars.ActiveMenuBar.EnableDocking xtpFlagStretched
   
    CommandBars.EnableCustomization False
   
    ' SET ICONS
   
    Set CommandBars.Icons = frmMain.ImageManager.Icons
        CommandBars.Options.UseDisabledIcons = True
        UseDisabledIcons = True
        CommandBars.Options.SetIconSize False, 16, 16

    ' START STATUS BAR CODE

Set StatusBar = CommandBars.StatusBar
    StatusBar.Visible = True
   
    StatusBar.AddPane 0
    StatusBar.AddPane ID_INDICATOR_CAPS
    StatusBar.AddPane ID_INDICATOR_NUM
    StatusBar.AddPane ID_INDICATOR_SCRL
   
    frmMain.TabControl.CurrTab = 0
   
    ' START SKIN CODE
   
    frmMain.SkinFramework.LoadSkin App.Path & "\WinXP.Royale.cjstyles", "NormalRoyale.ini" <TRIED BOTH WITH AND WITHOUT INI REFERENCE
    frmMain.SkinFramework.ApplyWindow frmMain.hWnd
    frmMain.SkinFramework.ApplyOptions = frmMain.SkinFramework.ApplyOptions Or xtpSkinApplyMetrics

Exit Sub
ErrorHandler:
ErrorAlert.ErrorAlert Err.Number, Err.Description, "frmMain.Form_Load"
End Sub




Replies:
Posted By: Oleg
Date Posted: 18 May 2006 at 4:34pm

Hello,

Can you attach whole project to check.

 



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


Posted By: Krenshau
Date Posted: 18 May 2006 at 5:23pm

Yes, here it is.

Thank you for looking into this.



Posted By: Krenshau
Date Posted: 18 May 2006 at 5:33pm

OK, I am not sure why, but I closed VB down to create the zip file. Now I have opened it back up and ran it and it no longer does it. I have no idea why it didn't work but does now.

Thank you for your help. Unless you find something, I will just make a new post if it happens again.



Posted By: Oleg
Date Posted: 19 May 2006 at 9:57am

Glad it resolved. :)



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


Posted By: Krenshau
Date Posted: 24 May 2006 at 1:59pm

I was able to reproduce this problem. If I use the Visual Basic 6 MDI skin demo supplied with the program and uncheck the Apply Frame Skin check box it duplicates the problem.

 

Thank you.



Posted By: Oleg
Date Posted: 24 May 2006 at 4:56pm

Hi,

Can you attach screenshot what you see?



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


Posted By: Krenshau
Date Posted: 24 May 2006 at 6:27pm
Here you go.


Posted By: Oleg
Date Posted: 25 May 2006 at 12:38pm

Hi,

Hmm.. May be it was fixed already , I can't reproduce with current project.

Just wait 10.2 vresion, and don't change Apply option :)



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