|
Hi,
I have a RichTextBox and i want to do something when the user press on the RichTextBox with the combination of the keys : ctrl + 'C'.
I created this event :
private void m_richTextBox1_KeyUp(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyData== Keys.C)
{
}
} but when the user press on the keys it's recognize only the 'ctrl' key and not the char 'C'.
What is the problem and what should i do?
10X.
|
|
|
|
|
In either KeyDown or KeyUp
if (e.KeyCode == Keys.C && e.Modifiers == Keys.Control)
{
}
|
|
|
|
|
|
Hi
Is there any way to write addons (plug-ins) for Crystal report using C#? That has to basically read data from that report.
Thanks
|
|
|
|
|
Hi all
I have aroblem: I want to save is ms access, datatable, but all lines are marked as new, and all the sta is re insert to the db!
when I debug I see the row state is added!(even if it is not true!!)
what can I do??
|
|
|
|
|
And what, exactly, does this have to do with C#?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
the code is in c#
foreach (DataRow Row in ds.Tables["Tasks"].Rows)
{
switch (Row.RowState)
{
case DataRowState.Added :
..................
DataRowState.Added - is always true, thats the problem
|
|
|
|
|
hi guys
i captured an image
ok
then i want to repeat this image to three times
and the all four images are saved in one file
that file in a jpg format
my code is
Graphics g1 = pictureBox1.CreateGraphics();
Image MyImage = new Bitmap(pictureBox1.ClientRectangle.Width, pictureBox1.ClientRectangle.Height, g1);
Graphics g2 = Graphics.FromImage(MyImage);
IntPtr dc1 = g1.GetHdc();
IntPtr dc2 = g2.GetHdc();
BitBlt(dc2, 0, 0, pictureBox1.ClientRectangle.Width, pictureBox1.ClientRectangle.Height, dc1, 0, 0, 13369376);
MyImage.Clone();
g1.ReleaseHdc(dc1);
g2.ReleaseHdc(dc2);
MyImage.Save(@"c:\PrintPage.jpg", ImageFormat.Jpeg);
thanks,
Mohamed El-Wehishy
|
|
|
|
|
Hi,
this is what I would try (not tested), and it doesn't use a PictureBox:
Bitmap bmIn=(Bitmap)Image.FromFile(sourceFile);
Bitmap bmOut=new Bitmap(4*bmIn.Width, bmIn.Height);
Graphics grOut=Graphics.FromImage(bmOut);
for(int i=0; i<4; i++) grOut.DrawImage(bmIn, bmIn.Width*i, 0);
bmOut.Save(destinationFile, ImageFormat.Jpeg);
grOut.Dispose();
bmIn.Dispose();
bmOut.Dispose();
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
thanks very much my friend
it is done
thanks
Mohamed El-Wehishy
|
|
|
|
|
you're welcome.
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hi All,
I have to burn CD using C# window application with the progress bar can any one tell me how to start and do this.
Thanks,
Amit Patel
|
|
|
|
|
|
Hi
on system shutdown can i uninstall a installed setup of c# applicaton?
|
|
|
|
|
hey... dont repost...
I think you cannot uninstall during system shutdown. Windows wait for ... seconds to shutdown all application, if the application cannot be end, then it will be killed.
|
|
|
|
|
sorry for reposting
is there any other means by which i can do it plz help me
|
|
|
|
|
the answer is no. you must find another way to uninstall your application.
|
|
|
|
|
You could set registry entries to remove the application on a windows startup.
you would run your app.
set the registry entries (runonce)
on restart the runonce would take effect and remove your app during windows startup.
|
|
|
|
|
Hi..i'm write following pl sql procedure to save data record.i have created a table called SETUP_TAB. i want to add to data from a datagridview in a form.can anyone please tell me how to do it.
PROCEDURE Insert___ (
id_ OUT VARCHAR2,
version_ OUT VARCHAR2,
rec_ IN OUT SETUP_TAB%ROWTYPE,
attribute_ IN OUT VARCHAR2 )
i have write following C# code also.but it gives "Invalid parameter binding" exception.
OracleConnection conn = new OracleConnection();
String str = "Data source=****;user ID=****;Password=****;";
conn.ConnectionString = str;
OracleCommand cmd = new OracleCommand("PROJX_INTEGRATION_SETUP.Insert___",conn);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter datarow = new OracleParameter();
datarow.ParameterName = "newrec_";
datarow.OracleDbType = OracleDbType.Raw;
datarow.Direction = ParameterDirection.InputOutput;
datarow.Value = this.dataGridView1.Rows[0];
cmd.Parameters.Add(datarow);
OracleParameter attr = new OracleParameter();
attr.ParameterName = "attr_";
attr.OracleDbType = OracleDbType.Varchar2;
attr.Direction = ParameterDirection.InputOutput;
cmd.Parameters.Add(attr);
OracleParameter o1 = new OracleParameter();
o1.ParameterName = "objid_";
o1.OracleDbType = OracleDbType.Varchar2;
o1.Direction = ParameterDirection.Output;
cmd.Parameters.Add(o1);
OracleParameter o2 = new OracleParameter();
o2.ParameterName = "objversion_";
o2.OracleDbType = OracleDbType.Varchar2;
o2.Direction = ParameterDirection.Output;
cmd.Parameters.Add(o2);
try
{
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
}
catch (OracleException ex)
{
MessageBox.Show(ex.Message, "Oracle Exception");
}
|
|
|
|
|
Parameter names in your procedure and OracleParameter instance should match. Also you need to preserve the order in which parameters are added.
|
|
|
|
|
thank you for reply my post.i have done that in your way.but still it gives following exception.
"Invalid parameter binding
Parameter name: rec_"
here is my modified code.
OracleParameter rec_ = new OracleParameter();
rec_.ParameterName = "rec_";
rec_.OracleDbType = OracleDbType.Raw;
rec_.Direction = ParameterDirection.InputOutput;
rec_.Value = this.dataGridView1.Rows[0];
cmd.Parameters.Add(rec_);
|
|
|
|
|
As I said, parameters should be in the order which they have written in the procedure. So first id_ then version_ etc should come. rec_ should be the 3rd parameter.
|
|
|
|
|
yes..i have done that way..but still it gives same result.
PROCEDURE Insert___ (
id_ OUT VARCHAR2,
version_ OUT VARCHAR2,
rec_ IN OUT PROJX_INTEGRATION_SETUP_TAB%ROWTYPE,
attribute_ IN OUT VARCHAR2 )
===========================================================
OracleParameter id_ = new OracleParameter();
id_.ParameterName = "id_";
id_.OracleDbType = OracleDbType.Varchar2;
id_.Direction = ParameterDirection.Output;
cmd.Parameters.Add(id_);
OracleParameter version_ = new OracleParameter();
version_.ParameterName = "version_";
version_.OracleDbType = OracleDbType.Varchar2;
version_.Direction = ParameterDirection.Output;
cmd.Parameters.Add(version_);
OracleParameter rec_ = new OracleParameter();
rec_.ParameterName = "rec_";
rec_.OracleDbType = OracleDbType.Raw;
rec_.Direction = ParameterDirection.InputOutput;
rec_.Value = this.dataGridView1.Rows[0];
cmd.Parameters.Add(rec_);
OracleParameter attribute_ = new OracleParameter();
attribute_.ParameterName = "attribute_";
attribute_.OracleDbType = OracleDbType.Varchar2;
attribute_.Direction = ParameterDirection.InputOutput;
cmd.Parameters.Add(attribute_);
|
|
|
|
|
I have sorted out my problem.thanks for all , special thank for "navaneeth" ...
|
|
|
|
|
I am creating a windows application which take database configurations from user and save in an xml. I need some code help which will do the following task:
When the user press finish button:
1. It should create a web service which will be able to read data according to the database configuration.
2. Start the web service automatically
3. Configure the IIS server.
4. save the server address into a xml file which will be used by other to consume this service.
All the above points should be done in a single finish button click.
How can I do that. I need some guideline and sample code for that.
|
|
|
|