Give
the demonstration for the various Dialog Box avail with C# Smart Device
Application.
Nagpur University MCA V Semester, C#.Net, Embedded System Programming, Nagpur University Practical MCA V
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace dialogbox
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnmessage_Click(object sender, EventArgs e)
{
MessageBox.Show("this is message box dialog box ");
}
private void btnopen_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
openFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
string FileName = openFileDialog.FileName;
textBox1.Text = FileName;
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void btnsave_Click(object sender, EventArgs e)
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
saveFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
string FileName = saveFileDialog.FileName;
}
}
}
}
SEM
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace dialogbox
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnmessage_Click(object sender, EventArgs e)
{
MessageBox.Show("this is message box dialog box ");
}
private void btnopen_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
openFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
string FileName = openFileDialog.FileName;
textBox1.Text = FileName;
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void btnsave_Click(object sender, EventArgs e)
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
saveFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
string FileName = saveFileDialog.FileName;
}
}
}
}
SEM
Give
the demonstration for the various Dialog Box avail with C# Smart Device
Application.
Nagpur University MCA V Semester, C#.Net, Embedded System Programming, Nagpur University Practical MCA V SEM
Give
the demonstration for the various Dialog Box avail with C# Smart Device
Application.
Nagpur University MCA V Semester, C#.Net, Embedded System Programming, Nagpur University Practical MCA V SEM
No comments:
Post a Comment