Results 1 to 2 of 2

Thread: [2008] My.Application.Info problem when using plugins

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2002
    Location
    Lexington, SC
    Posts
    586

    [2008] My.Application.Info problem when using plugins

    I'm trying to code a project that can accept plugins. I've got my interface set up and working and was trying to create a template project for my plugins. I figured it would be easier instead of setting a variable like myName = "Plugin" to just call My.Application.Info.Title (and other properites there)

    Now the problem is apparently the plugin is picking up the application.info of my main program when I load it via the interface. My Plugin Title is TestPlugin, and my main app is CS Accounting, when I have the property in plugin coded like this

    Code:
    ReadOnly Property Name() As String Implements IPluginInterface.IPlugin.IPluginInterface.Name
         Get
              Return My.Application.Info.Title
         End Get
    End Property
    it returns CS Accounting. Is there a way to get it return its own Title instead of the main application title?

    Thanks!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2008] My.Application.Info problem when using plugins

    The plugin isn't the application. The EXE is the application and that code is correctly returning the EXE name. If you want something from the current assembly then you can use Reflection to go via the ExecutingAssembly but it would be simply for each plugin to simply return a hard-coded value.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width