|
Hi
Does anyone know why Excel Crashes at startup
after c# app calls Clipboard.Clear();
even app exits
thanks
|
|
|
|
|
I can clear the clipboard (with Clipboard.Clear) and successfully launch Excel 2007.
I suggest you check your facts.
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hi Luc Pattyn
Thanks for your info.
I tried 3 machines with vista ultimate sp2 / Excel 2007 all of them fail to launch.
|
|
|
|
|
if your app clears the clipboard and then fails to launch Excel, seems to me you have made some mistake.
Can't help lacking any additional information or code.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Thanks Luc Pattyn
I found interesting scenario that crashes vs2005 c# IDE
public Form1()
{
InitializeComponent();
Clipboard.Clear(); // crashes vs IDE
}
|
|
|
|
|
Delven Foo wrote: Clipboard.Clear(); // crashes vs IDE
I have not used the clipboard in C#, but in C++/Win32 you need to use the OpenClipboard() call to get access before changing anything. This is because the clipboard is a systemwide resource so you need to avoid conflicts with other processes.
|
|
|
|
|
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
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.
|
|
|
|