Winform中直接打开指定文件

mac2022-06-30  30

        private void barButtonItemHelp_ItemClick(object sender, ItemClickEventArgs e)        {            string v_OpenFilePath = @"C:/Program Files/TJWTCS/天津抄表软使用说明文档V1.0.doc";

            //先判断文件是否存在,不存在则提示            if (!System.IO.File.Exists(v_OpenFilePath))            {                MessageBox.Show("安装根目录下帮助文件不存在!", "操作提示");                return;            }            //存在则打开            System.Diagnostics.Process.Start(v_OpenFilePath);

        }

转载于:https://www.cnblogs.com/deepwishly/archive/2010/07/11/2551228.html

相关资源:winform打开一个新程序 - - 博客频道
最新回复(0)