Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > General Discussion
  New Posts New Posts RSS Feed - FileNameOrResource Argument
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

FileNameOrResource Argument

 Post Reply Post Reply
Author
Message
robs View Drop Down
Groupie
Groupie


Joined: 09 November 2003
Status: Offline
Points: 84
Post Options Post Options   Thanks (0) Thanks(0)   Quote robs Quote  Post ReplyReply Direct Link To This Post Topic: FileNameOrResource Argument
    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?
Back to Top
downtowntoby View Drop Down
Newbie
Newbie


Joined: 09 November 2003
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote downtowntoby Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
robs View Drop Down
Groupie
Groupie


Joined: 09 November 2003
Status: Offline
Points: 84
Post Options Post Options   Thanks (0) Thanks(0)   Quote robs Quote  Post ReplyReply Direct Link To This Post 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.



Edited by robs
Back to Top
Kelbob View Drop Down
Newbie
Newbie


Joined: 06 April 2005
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kelbob Quote  Post ReplyReply Direct Link To This Post 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

 

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.172 seconds.