|
form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click
Dim f2 As New Form2
Dim dr As DialogResult = f2.ShowDialog()
MessageBox.Show(dr)
End Sub
Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click
Dim sfd As New SaveFileDialog()
sfd.CheckFileExists = True
Dim dr As DialogResult = sfd.ShowDialog()
MessageBox.Show(dr)
End Sub
End Class
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2();
DialogResult dr = f2.ShowDialog();
MessageBox.Show(dr.ToString());
}
}
}
namespace WindowsFormsApplication1
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.CheckFileExists = true;
DialogResult dr = sfd.ShowDialog();
MessageBox.Show(dr.ToString());
}
}
}
VBもC# も上書き存在確認のダイアログメッセージが普通に出たけど、こーゆーことではなくて?
|