vb.net - Visual Basic,使应用程序仅在特定文件夹中打开
问题描述
有没有一种方法可以让 Visual Basic .net 应用程序仅在它位于特定文件夹/路径中或者它包含文件夹内的某个元素时才打开?谢谢。
解决方案
简单,加载事件:
If not Application.StartupPath() = "C:\" then
Application.Exit()
End if
推荐阅读
- c# - InvalidOperationException:传递到 ViewDataDictionary 的模型项的类型为“WebApplication1.Models.Socios”
- hyperlink - DAX 跟随超链接 - Power BI
- python - 返回一个新字典,其中包含三个字典中的所有键值对
- mysql - 并非所有参数都在使用 dataframe.to_sql 的 SQL 语句中使用
- javascript - 本地数据库中的 Google Vision 视觉搜索
- r - 从R中的字符串中提取日期
- amazon-web-services - 更改 docker 图像的默认目录(使用 docker snap)
- java - Java 中每个函数之前的 AutoCheck
- google-compute-engine - 扳手负载性能非常低
- spring-boot - Spring Boot Reactor Netty 线程池