Print Page | Close Window

FileNameOrResource Argument

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Active-X COM Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=238
Printed Date: 22 November 2024 at 12:53pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: FileNameOrResource Argument
Posted By: robs
Subject: FileNameOrResource Argument
Date Posted: 13 November 2003 at 9:43am
Does anyone know if the LoadDesignerBars method only excepts references to files (.xcb) or does it also except a reference to a resource of some type?



Replies:
Posted By: downtowntoby
Date Posted: 13 November 2003 at 3:10pm

To add xcb file to resource:

Rightclick on command bars and choose properties.

Select your xcb file. 

Call CommandBars.LoadDesignerBars without parameters.



Posted By: robs
Date Posted: 13 November 2003 at 9:30pm

Thanks for your input downtowntoby. I realized that feature, but didn't consider it to be a "resource". I think that using the property page of the ocx to load the .xcb file just throws that info in the registry as binary. I was hoping that "resource" meant some kind of resource file who's file format could be customized (not using Designer Studio).

I think a better name for the argument would be "FileName" since that's the only type the method accepts.

Thanks again.



Posted By: Kelbob
Date Posted: 20 April 2005 at 4:31am

1. Add your xcb file in the project.

2. Set the properties to embedded resource

3. Use the fololling code

ResourceManager res = new ResourceManager(typeof(MainForm)) ;

// Load Commandbars

CommandBars.LoadDesignerBars(res.GetObject"MainForm.xcb") ,this) ;

where main form is the .. er.. the main form of the application

Hope this helps

JK

 




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