在VB上 [英] On VB

查看:38
本文介绍了在VB上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当代码调用任何通用对话框控件时,VB应用程序都会自动关闭,尤其是在安装了MS Office Enterprise Edition 2007的情况下.

The VB application is automatically getting closed whenever the code is invoking any common dialoge control especially when the MS office Enterprise edition 2007 is installed. Please help if somebody has any solution.

推荐答案

您好,

欢迎来到MSDN论坛! >
如果没有足够的上下文信息,则无法复制此问题.如果您在此处发布相关的源代码会更好.

例如以下代码示例可以正常工作:调用OpenFileDialog在VB.NET中打开文件.

Hi,

Welcome to MSDN forums!

This issue cannot be repro without enough context information. It would be better if you post your related source code here.

e.g. The following code sample works fine: Call OpenFileDialog to open a file in VB.NET.

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim OpenFileDialog1 As New OpenFileDialog()
        OpenFileDialog1.InitialDirectory = "C:\"
        OpenFileDialog1.Filter = "wmv files (*.wmv)|*.wmv|All files (*.*)|*.*"
        If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
            MessageBox.Show(OpenFileDialog1.FileName)
            Process.Start(OpenFileDialog1.FileName)
        End If
    End Sub

End Class


最好的问候,
谢马丁(Martin Xie)


Best regards,
Martin Xie


这篇关于在VB上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆