|
thanks for you reply,i get the screen by my program
Bitmap bmp = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Graphics gp = Graphics.FromImage(bmp);
gp.CopyFromScreen(0, 0, 0, 0, new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height));
ms = new MemoryStream();
Image im = bmp.GetThumbnailImage(Screen.PrimaryScreen.Bounds.Width / 10, Screen.PrimaryScreen.Bounds.Height / 10, null, IntPtr.Zero);
bmp = new Bitmap(im);
bmp.Save(ms, ImageFormat.Jpeg);
by = ms.GetBuffer();
return by;
i just copy the code from the internet,it can not work for getting cursor of mouse,so i want to draw a picture around the cursor.
i am the first time to ask for help in English,and receive you help so quick ,i am very happy ,thanks a lot!
i just a green hand in programing and English.
Please bear with me
|
|
|
|
|
I'm not sure this does remotely what you want. Yes, the first three lines gets you the screen, and if you used Cursor.Position ( from memory ), you could draw onto that bitmap. But that bitmap is a COPY of the screen, it's not the actual screen.
Why do you need a thumbnail of the screen ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Here I can not access your blog,Do not know how's going on。
|
|
|
|
|
A little background.
I have created a stored procedure in sql server.
That will generate a ##temp table,
then when the stored procedure is complete with generating the table and filling the table with the data for the report,
it will drop the ##temp table.
I want to generate a Crystal Report and or Microsoft Reporting Services Report. The report will need to be generate from scratch in code. Which comes to the part I need help with.
The table will be a minimum of 2 columns to the maximum amount of columns sql server tables will allow. The First 2 Columns are Hard Coded as:
JobNumber int,
[Job Name] [nvarchar](100)
All the other fields are INT. Because the number columns in the report are not static number of columns. I do not know how to generate the report in code.
In the past I would create a xsd and fill the xsd and pre-design the report before with the fields in the xsd. Please I know this is a lot to ask but can someone please give me relevant resources (Websites, Samples, Detailed, Explanation) to research to learn how to accommodate this scenario.
I need to know how to create this report, and In the report I need the column names as well (The column names I think I can handle). I can populate a data grid on the form but I am not sure that that is the right way to do this.
|
|
|
|
|
Hi, we know if there is try-catch in place for an exception, it'll be caught and handled then when the exception occurs.
But how this magic happens? How C#/compiler implements this exception handling feature at low level?
Thanks.
|
|
|
|
|
|
Don't get at all
|
|
|
|
|
Do you really want to know?
Have you read ECMA-335?
Anyway, MSIL contains high level constructs for things such as exception handling, and the JIT compiler and runtime do the actual magic. What kind of magic that is, well, I could find that out for you, but you could also mess around with some exception handling code and look at the disassembly window. The C# compiler doesn't really have anything to do with the actual implementation of the exception mechanisms, in MSIL it's still a .try block and some catch/finally/filter (can choose to have the catch ignore the exception)/fault (executes when an exception was thrown but does not catch it) blocks, no stack-walking code is generated by the C# compiler
Note: I apologize in advance for all mistakes I've made in this post
|
|
|
|
|
|
Hi all,
I have a simple serial port application in which I am listening to serial port and displaying all the data which is received to a richtextbox. My Question is;
When i build the application and run in "Debug" configuration I get "The I/O operation has been aborted because of either a thread exit or an application request " exception at serialPort.ReadExisting() transaction.
However when I build the application in "Release" Configuration I never see this exception.
In my opinion there is no reason for the exception, but unfortunately I get it in debug mode. Any ideas?
Kind Regards
zafer
|
|
|
|
|
A debug version has debug code in it. I can only assume it's interfering with your code. I've found with C# in the past I can set breakpoints in a release version.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Dunno. Read up on the Exception; it may be like cross-thread Exceptions that get thrown in debug mode but not in release mode.
|
|
|
|
|
hi
how i can connect crystall report to oracle 10g in C# (VS2008) ?
thank's in advance
|
|
|
|
|
Dear Sirs,
I can't figure out the difference between Control.Validated and Control.Validating . I see the difference is that one's called, then the other's called. Here is the code I found in Control :
if (this.NotifyValidating())
{
return true;
}
if (bulkValidation || NativeWindow.WndProcShouldBeDebuggable)
{
this.NotifyValidated();
} So it looks like Validating can cancel the Validated event's scheduled run by setting the Cancel field of the EventArgs , but is that the only difference? Of what use is that? Thanks.
In Christ,
Aaron Laws
http://ProCure.com
|
|
|
|
|
Rather than guessing what each event does why not take the time to actually read the documentation?
control.validated[^]
control.validating[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Dear Mr. Nischalke,
Yeah, I read that, I just can't figure out what the use might be.
In Christ,
Aaron Laws
http://ProCure.com
|
|
|
|
|
It's painfully clear. When you validate, there's an event you can catch to do further validation and thus reject it. When it's been validated, there's an event so you can know if it passed or not.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You are going to have a very difficult time in this field if something so simple throws you off.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
One must always be vigilent so as to not become too qualified ...
|
|
|
|
|
HA! Who is in danger of being too qualified?
In Christ,
Aaron Laws
http://ProCure.com
|
|
|
|
|
Well, if you think about what the words mean, validating can be cancelled as it's called during the validation process. Validated is called after.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Dear Sirs,
Thanks for your sharp responses. It didn't throw me off, but it seemed a bit redundant, that's all. The clarity is indeed blinding as to what happens, but the intent is still - to me - less than clear. I'm beginning to see why this might be necessary, but I still can't think of an example. A specific example could be great, if you please.
In Christ,
Aaron Laws
http://ProCure.com
|
|
|
|
|
I need to know which library or class to use to record and play .wav files in C#
please mention if the library needs to be downloaded, added or it's already inside visual studio 2005/2008
If it's a class,if it is a C# class or I need to implement it or copy its code
Thanks in advance
|
|
|
|
|
|
I do reading and writing from/to a socket. But both are done asynchronously...I've noticed whenever my application is running, the taskmanager systray icon shows 100%, and it so happens tht my app is responsible for this too...
|
|
|
|