vb.net - 从另一个 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
解决方案
推荐阅读
- jquery - 在Highcharts中,当图表发生变化时,如何随图表一起移动注释?
- python - 一旦我的函数嵌套并相互引用,我的元组返回 NoneType 错误,为什么?
- java - Tomcat数据库连接池高吞吐速度慢
- html - 你怎么称呼这些滚动效果,我如何在 Wordpress 中做到这一点?
- checkbox - 如何使用 Bootstrap 在表格中居中自定义复选框
- python - 使用脚本获取 pymysql 的回溯
- node.js - 我只是想用简单的方式连接react和socket io,但是连接不上
- html - @media(最大宽度或最小宽度)用于视频
- python - 使用 WSGI 在烧瓶中找不到 MYSQL
- jquery - 编写时JQuery DatePicker在日期/月份/年份之间跳转