Click here to Skip to main content
14,387,927 members
   

C#

 
GeneralRe: is any threat (as in sql injection) possible in building a 'RowFilter for a 'DataView Pin
Richard Deeming18-Oct-19 4:56
mveRichard Deeming18-Oct-19 4:56 
GeneralRe: is any threat (as in sql injection) possible in building a 'RowFilter for a 'DataView Pin
Luc Pattyn18-Oct-19 5:05
sitebuilderLuc Pattyn18-Oct-19 5:05 
GeneralRe: is any threat (as in sql injection) possible in building a 'RowFilter for a 'DataView Pin
BillWoodruff18-Oct-19 5:09
mveBillWoodruff18-Oct-19 5:09 
GeneralRe: is any threat (as in sql injection) possible in building a 'RowFilter for a 'DataView Pin
Luc Pattyn18-Oct-19 5:19
sitebuilderLuc Pattyn18-Oct-19 5:19 
GeneralRe: is any threat (as in sql injection) possible in building a 'RowFilter for a 'DataView Pin
BillWoodruff18-Oct-19 4:54
mveBillWoodruff18-Oct-19 4:54 
AnswerRe: is any threat (as in sql injection) possible in building a 'RowFilter for a 'DataView Pin
Bernhard Hiller20-Oct-19 23:35
MemberBernhard Hiller20-Oct-19 23:35 
GeneralRe: is any threat (as in sql injection) possible in building a 'RowFilter for a 'DataView Pin
BillWoodruff21-Oct-19 2:01
mveBillWoodruff21-Oct-19 2:01 
QuestionCan I convert EventArgs type to PaintEventArgs type ? Pin
Member 245846717-Oct-19 18:42
MemberMember 245846717-Oct-19 18:42 
I want to convert EventArgs type to PaintEventArgs type, cast button_click to form_paint, how do I write code ? You see my error code
namespace DrawText_Random
{
    public partial class Form2 : Form
    {        
        public Form2()
        {
            InitializeComponent();
            //progressBar1.Visible = false;
            progressBar1.Minimum = 0;
            progressBar1.Maximum = 100;

            this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form9_Paint);

        }

        int valueforShadowedTextPaint = 0;
        private void btnDrawText_Click(object sender, EventArgs e) //PaintEventArgs e
        {
            progressBar1.Value = 0;
            this.timer1.Interval = 100;
            this.timer1.Enabled = true;            

        }

        private void ShadowedTextPaint(PaintEventArgs e, int num) 
        {            
            // Set up the font
            Font fnt = new Font("Calibri", 296, FontStyle.Bold | FontStyle.Italic, GraphicsUnit.Point);

            // Get the Form's Graphics object
            Graphics g = e.Graphics;

            // Draw background text
            g.DrawString(num.ToString(), fnt, Brushes.DarkGray, 244, 104);

            // Draw main text slightly offset from shadow text
            g.DrawString(num.ToString(), fnt, Brushes.Aqua, 240, 100);

        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (progressBar1.Value < 100)
            {
                PaintEventArgs g = (PaintEventArgs)e;//Error here: Unable to cast object of type 'System.Windows.Forms.MouseEventArgs' to type 'System.Windows.Forms.PaintEventArgs'.
                Random rd = new Random();
                Random rd = new Random();
                int Number = rd.Next(0, 999);               
                //This place must call ShadowedTextPaint (...) function to jump continuously 
                ShadowedTextPaint(e, Number);                
                progressBar1.Value++;
            }
            else
            {
                this.Invalidate(); 
                this.timer1.Enabled = false;
            }
        }

    }
}

AnswerRe: Can I convert EventArgs type to PaintEventArgs type ? Pin
OriginalGriff17-Oct-19 21:09
mveOriginalGriff17-Oct-19 21:09 
GeneralRe: Can I convert EventArgs type to PaintEventArgs type ? Pin
Member 245846717-Oct-19 23:14
MemberMember 245846717-Oct-19 23:14 
GeneralRe: Can I convert EventArgs type to PaintEventArgs type ? Pin
OriginalGriff17-Oct-19 23:36
mveOriginalGriff17-Oct-19 23:36 
GeneralRe: Can I convert EventArgs type to PaintEventArgs type ? Pin
Member 245846721-Oct-19 18:03
MemberMember 245846721-Oct-19 18:03 
QuestionUpdating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
jkirkerx17-Oct-19 13:50
professionaljkirkerx17-Oct-19 13:50 
AnswerRe: Updating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
Luc Pattyn17-Oct-19 17:09
sitebuilderLuc Pattyn17-Oct-19 17:09 
GeneralRe: Updating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
jkirkerx18-Oct-19 7:27
professionaljkirkerx18-Oct-19 7:27 
AnswerRe: Updating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
Richard Deeming18-Oct-19 2:44
mveRichard Deeming18-Oct-19 2:44 
AnswerRe: Updating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
Richard Deeming18-Oct-19 3:02
mveRichard Deeming18-Oct-19 3:02 
GeneralRe: Updating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
jkirkerx18-Oct-19 7:41
professionaljkirkerx18-Oct-19 7:41 
AnswerI don't get this with IndexOf not finding the record Pin
jkirkerx18-Oct-19 9:24
professionaljkirkerx18-Oct-19 9:24 
SuggestionNeed help wind form code Pin
AlexJo198516-Oct-19 23:11
MemberAlexJo198516-Oct-19 23:11 
GeneralRe: Need help wind form code Pin
lw@zi 17-Oct-19 0:17
professional lw@zi 17-Oct-19 0:17 
GeneralRe: Need help wind form code Pin
Luc Pattyn17-Oct-19 16:41
sitebuilderLuc Pattyn17-Oct-19 16:41 
AnswerRe: Need help wind form code Pin
Richard Deeming18-Oct-19 2:32
mveRichard Deeming18-Oct-19 2:32 
GeneralRe: Need help wind form code Pin
Luc Pattyn18-Oct-19 2:44
sitebuilderLuc Pattyn18-Oct-19 2:44 
GeneralRe: Need help wind form code Pin
Richard Deeming18-Oct-19 4:03
mveRichard Deeming18-Oct-19 4:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.