Error 1 No overload for 'Form1_Paint' matches delegate 'System.Windows.Forms.PaintEventHandler' C:\Documents and Settings\Administrator\Local Settings\Application Data\Temporary Projects\paint test 2\Form1.Designer.cs 41 27 paint test 2
what is to overload, and how do i do this?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace paint_test_2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public string teXt;
private void Form1_Load(object sender, EventArgs e)
{
string file_name = "c:\\temp\\test.txt";
{
System.IO.StreamReader objReader;
objReader = new System.IO.StreamReader(file_name);
//textBox1.Text = objReader.ReadToEnd();
teXt = objReader.ReadToEnd();
objReader.Close();
}
}
private void Form1_Paint(Graphics g, string text, int scroll, float text_width)
{
int count = (int)(this.ClientSize.Width / text_width + .5f) + 1;
int sc = (int)(scroll % text_width);
for (int i = 0; i < count; i++)
{
g.DrawString(teXt, this.Font, Brushes.Black, i * text_width - sc, 0);
}
}
}
}

New Topic/Question
Reply



MultiQuote




|