using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Imaging; using System.Linq; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; namespace eee { public partial class Form1 : Form { [DllImport("dll_pack.dll")] static extern IntPtr test(); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { pictureBox0.SizeMode = PictureBoxSizeMode.Zoom; pictureBox1.SizeMode = PictureBoxSizeMode.Zoom; pictureBox2.SizeMode = PictureBoxSizeMode.Zoom; pictureBox3.SizeMode = PictureBoxSizeMode.Zoom; pictureBox4.SizeMode = PictureBoxSizeMode.Zoom; //Bitmap b = new Bitmap(366, 275, PixelFormat.Format8bppIndexed); //BitmapData d = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.ReadOnly, PixelFormat.Format8bppIndexed); //test(); //b.UnlockBits(d); Bitmap a = new Bitmap(960, 1280, 2 * 960, PixelFormat.Format8bppIndexed, test()); pictureBox0.Image = a; } } }