Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello i wanted re-ask my question with my codes.
i could add my picture to my clipboard and then i tested it i can paste it into paint file or imagebox. but i could not paste that picture into c1editor. can anyone help me or suggest any code about that? here is my code:


C#
try
            {
                string n = "";
                n = ((yzPicture)((Button)sender).Tag).picId.ToString().Trim();
                string constring = ConfigurationManager.AppSettings["DMGYayinPicConStr"];
                SqlConnection conDB = new SqlConnection(constring);
                SqlCommand cmd = new SqlCommand("[dbo].[sp_PreviewPicture]", conDB);
                cmd.CommandType = CommandType.StoredProcedure;
                SqlParameter paramId = new SqlParameter();
                paramId.ParameterName = "@id";
                paramId.Value = Convert.ToInt32(n);
                cmd.Parameters.Add(paramId);
                SqlParameter paramType = new SqlParameter();
                paramType.ParameterName = "@type";
                paramType.Value = 2;
                cmd.Parameters.Add(paramType);
                conDB.Open();
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                SqlCommandBuilder cbd = new SqlCommandBuilder(da);
                DataSet ds = new DataSet();
                da.Fill(ds);
                conDB.Close();
                byte[] imgbt = (byte[])(ds.Tables[0].Rows[0]["preview"]);
                MemoryStream ms = new MemoryStream(imgbt);
                Clipboard.SetImage(Image.FromStream(ms));
                this.txtEditor.Paste();//this is my c1editor... the problem is it does not support images i guess.
}


Thanks for helping, Best Regards.
Posted
Comments
Richard MacCutchan 2-Apr-15 11:19am    
Where does this editor come from?
Sergey Alexandrovich Kryukov 2-Apr-15 11:31am    
If I'm not much mistaken, it could be ComponentOne's component.
It means, commercial and proprietary.
The inquirer can be advised to bug their customer service insistently, instead of asking us...
—SA
Richard MacCutchan 2-Apr-15 11:36am    
I am always baffled why people come here with their queries, instead of trying the forums that these third-party companies set up to support their products.
Sergey Alexandrovich Kryukov 2-Apr-15 11:39am    
Isn't that because we are still nicer than them? :-)
—SA
Member 11557708 3-Apr-15 3:56am    
Ahah :D i already asked in c1 forums, but i don't think they could find a solution for that yet :D Some similar problems stay unanswered yet.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900