Click here to Skip to main content
15,888,273 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# PictureBox remove image Pin
Mohan Baro20-Dec-16 18:10
Mohan Baro20-Dec-16 18:10 
GeneralRe: C# PictureBox remove image Pin
Pavlex420-Dec-16 20:11
Pavlex420-Dec-16 20:11 
SuggestionRe: C# PictureBox remove image Pin
Ralf Meier20-Dec-16 21:19
mveRalf Meier20-Dec-16 21:19 
GeneralRe: C# PictureBox remove image Pin
Pavlex420-Dec-16 21:24
Pavlex420-Dec-16 21:24 
GeneralRe: C# PictureBox remove image Pin
Ralf Meier21-Dec-16 1:18
mveRalf Meier21-Dec-16 1:18 
GeneralRe: C# PictureBox remove image Pin
Pavlex421-Dec-16 8:21
Pavlex421-Dec-16 8:21 
GeneralRe: C# PictureBox remove image Pin
Ralf Meier21-Dec-16 22:58
mveRalf Meier21-Dec-16 22:58 
QuestionSpecified cast is not valid. i can't understand error Pin
Member 1289974620-Dec-16 2:07
Member 1289974620-Dec-16 2:07 
C#
public void FillCompVouType()
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                con = new SqlConnection(cs.sourceConn1);
                con.Open();
                scmd = new SqlCommand("Select Distinct VouType From Table_name Where Colum=1 order by VouType", con);
                SqlDataReader DR = default(SqlDataReader);

                vochcombox.Items.Clear();
                DR = scmd.ExecuteReader();
                foreach (int VouType in DR)
                {
                    vochcombox.Items.Add(VouType);
                }
                while (DR.Read())
                {
                    this.vochcombox.Items.Add(DR.GetOrdinal("VouType"));
                }
                DR.Close();
                con.Close();
                this.Cursor = Cursors.Default;

            }
            catch (Exception ex)
            {
                this.Cursor = Cursors.Default;
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                if (con.State == ConnectionState.Open)
                {
                    con.Close();
                }
            }
        }

AnswerRe: Specified cast is not valid. i can't understand error Pin
OriginalGriff20-Dec-16 2:30
mveOriginalGriff20-Dec-16 2:30 
GeneralRe: Specified cast is not valid. i can't understand error Pin
Member 1289974620-Dec-16 2:34
Member 1289974620-Dec-16 2:34 
GeneralRe: Specified cast is not valid. i can't understand error Pin
Ralf Meier20-Dec-16 2:38
mveRalf Meier20-Dec-16 2:38 
AnswerRe: Specified cast is not valid. i can't understand error Pin
Ralf Meier20-Dec-16 2:36
mveRalf Meier20-Dec-16 2:36 
GeneralRe: Specified cast is not valid. i can't understand error Pin
Member 1289974620-Dec-16 2:44
Member 1289974620-Dec-16 2:44 
AnswerRe: Specified cast is not valid. i can't understand error Pin
Richard Deeming20-Dec-16 2:45
mveRichard Deeming20-Dec-16 2:45 
AnswerRe: Specified cast is not valid. i can't understand error Pin
Nelson Costa Inácio21-Dec-16 5:54
Nelson Costa Inácio21-Dec-16 5:54 
QuestionIs there anything wrong with passing state via argument? Pin
TheOnlyRealTodd20-Dec-16 0:12
professionalTheOnlyRealTodd20-Dec-16 0:12 
AnswerRe: Is there anything wrong with passing state via argument? Pin
Afzaal Ahmad Zeeshan20-Dec-16 0:39
professionalAfzaal Ahmad Zeeshan20-Dec-16 0:39 
GeneralRe: Is there anything wrong with passing state via argument? Pin
TheOnlyRealTodd20-Dec-16 17:56
professionalTheOnlyRealTodd20-Dec-16 17:56 
Questioni get an error (non-invocable member-- can't be used like a method) any help? Pin
Member 1289974619-Dec-16 23:21
Member 1289974619-Dec-16 23:21 
AnswerRe: i get an error (non-invocable member-- can't be used like a method) any help? Pin
Afzaal Ahmad Zeeshan19-Dec-16 23:32
professionalAfzaal Ahmad Zeeshan19-Dec-16 23:32 
GeneralRe: i get an error (non-invocable member-- can't be used like a method) any help? Pin
Member 1289974619-Dec-16 23:42
Member 1289974619-Dec-16 23:42 
GeneralRe: i get an error (non-invocable member-- can't be used like a method) any help? Pin
Afzaal Ahmad Zeeshan19-Dec-16 23:45
professionalAfzaal Ahmad Zeeshan19-Dec-16 23:45 
GeneralRe: i get an error (non-invocable member-- can't be used like a method) any help? Pin
OriginalGriff19-Dec-16 23:55
mveOriginalGriff19-Dec-16 23:55 
GeneralRe: i get an error (non-invocable member-- can't be used like a method) any help? Pin
Afzaal Ahmad Zeeshan20-Dec-16 0:00
professionalAfzaal Ahmad Zeeshan20-Dec-16 0:00 
GeneralRe: i get an error (non-invocable member-- can't be used like a method) any help? Pin
Member 1289974620-Dec-16 2:01
Member 1289974620-Dec-16 2:01 

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.