32 lines
991 B
C#
32 lines
991 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Test_CustomMessageBox
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
public Form1()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
// Bild öffnen
|
|
FileStream imageStream = new FileStream(@"H:\Programmieren\Git-Repository\VisualStudio\2017\_TEST\Test_CustomMessageBox\Daten\Icons\Information.png", FileMode.Open, FileAccess.Read);
|
|
|
|
|
|
private void buttonOpenMessageBox_Click(object sender, EventArgs e)
|
|
{
|
|
MessageBox.Show("Mitteilungstext", "Titel", MessageBoxButtons.OK, Image.FromStream(imageStream), new MessageBox());
|
|
MessageBox.Show("Mitteilungstext", "Richtige Antwort", MessageBoxButtons.YesNo, Image.FromStream(imageStream), new MessageBox());
|
|
}
|
|
}
|
|
}
|