首页 > 解决方案 > 从另一个 exe 中提取 my.setting.whatever

问题描述

使用 vb.net 我使用以下代码从另一个 exe 中提取图像。

我的问题是,是否也可以使用类似的方法从另一个 exe 中提取设置值?

Try
Dim ExternalAssembly As Assembly = Assembly.LoadFile(Application.StartupPath & "/" & PluginPath)
Dim TargetPlugin As String = IO.Path.GetFileNameWithoutExtension(Application.StartupPath & "/" & PluginPath)
Dim ExternalResourceManager As Resources.ResourceManager

ExternalResourceManager = New Resources.ResourceManager(TargetPlugin & ".resources", ExternalAssembly)

If ExternalResourceManager.GetObject("MyStringRefrenceName") = Nothing Then
.Image = My.Resources.ResourceManager.GetString("MyStringRefrenceName").testing 'or is it value?

消息框(MyStringRefrenceName)

End If

 Catch ex As Exception

Msgbox("failed")

End Try

标签: vb.netexedata-extractionmy.settings

解决方案


推荐阅读