|
i want to write an C/S based software which could capture the screen on a
remote pc and send it back.
now i can use the Win32 function to capture the screen.However,the data is too
large to pass the network(intenet).and it uses much CPU time.
i want to find a better way to capture the screen,to send the screen data with
low cost. i think that is what the PcAnywhere do on this issue.PcAnywhere can
capture the sceen many times in a second and send them back to the client ,and moreover, costs little CPU resource.
How does it work ??????
can u show me the way ?
|
|
|
|
|
I'm interesting in this question too....
can u "show me the money"(starcraft) ?
|
|
|
|
|
Actually, software such as that uses a virtual screen buffer in which the drawing is "redirected" to the remote (local for the viewer) terminal. It does not use an entire screenshot (at least, not for Remote Desktop).
I'm not sure were you could find additional information other than googling, but the Windows DDK (device development kit) might contain some more information.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
thanks for ur advices. then i have two questions:
1.how to compare the changes in an area ? in a 80*60 block(1/100 of 800*600),it is impossible to
detect every point. So how to get the changed area efficiently ?
2.i try to find another way on google,but there are filled of lots of softwares instead of source code samples or articles.i dont know how do they work at all.
and if DDK works,can u show me some information ?
|
|
|
|
|
Another idea is for your server app on the remote machine could monitor the desktop image for changes, comparing the current image to the last. Then when an area that has changed has been detected, send just the changes to the client on your side.
RageInTheMachine9532
|
|
|
|
|
First of all, please delete the previous my message. I made a mistake. Thanks a lot.
Question: Japanese Input Issue on a column item:
By using "click" and "click" actions (not Double click) in a TreeListView control, English can be inputted in a column, but Japanese can not be. Please show me an easy and simple way which I should do to be able to use Japanese. But in the TreeListView source, of course, Japanese can be used like the bellow,
TreeListViewItem itemA = new TreeListViewItem("JAPANESE WORD " + Enum.GetName(typeof(Drives), k), 0);
OP: Japanese Windows XP Pro.
Application: Studio.Net 2003
I am extremely happy to meet the TreeListView program written by Mr. Thomas Caudal. I have two handicaps, when asking my question, a non-native speaker of English and a non-programmer. I have been starting to study VC#, so the beginner of any programming. I can not completely understand the code. So, would you like to explain about this issue by using easy English for a beginner? Thanks a lot, if someone answer me about this question.
|
|
|
|
|
If your question is about a specific article it should be sent to the forum specific to that article. You should post your question to the forum on http://www.codeproject.com/cs/miscctrl/treelistview.asp[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
|
|
|
|
|
Thank you for giving the good information about that.
Y Baba
|
|
|
|
|
When i want query in a database for some data... I find there's two ways. the first one is give a definition of selectcommand,then ExecuteNonQuery. Sometimes we use dataset.. Is there any distinctions of these two ways?
thanks for help!
|
|
|
|
|
DataSet is for when you want to many more things than that , if you want one time access , one record returned use ExecuteNonQuery . Use Dataset when you want disconnected many insert/update/delete/read from your database.
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|
|
ExecuteNonQuery will not return any data. How can you execute a query with ExecuteNonQuery ? That is for maintenance or updata/insert/delete tasks when you don't need a result back from the database.
ExecuteDataReader or ExecuteScalar do return data. The former returns a Data Reader object which you can use to access the records, and the latter returns a single value (If your query generates more than one value the single value returned will be the first field on the first row)
If you are using a dataset you can disconnect from the data source - This is useful for mobile applications, for instance. With a dataset you copy the data into your application and work on the copy (this increases the memory overhead).
A rule-of-thumb that I use is that if the data is a one-time use or I will be constantly connected to the database I use a data reader. If I am going to disconnect from the database I use a dataset. In general I prefer to use a data reader because the memory overhead is less and often it is faster to send a query to the database than filter an existing dataset because the database is designed to be queried efficiently, a dataset it not.
Does this help?
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
|
|
|
|
|
Thanks for your particular answer It helps me a lot
|
|
|
|
|
This is a bit confusing, I've seen the using keyword used both before and after the Namespace.
using System;
using System.Data;
namespace MyCompany
{
public MyClass {}
}
as well as
namespace MyCompany
{
using System;
using System.Data;
public MyClass {}
}
I've used both and cannot find a difference in actual performance. Is this something that is purely for personal choice or is there some sore of advantage to using one over the other.
|
|
|
|
|
it makes not different most of the time. however if you have more than one namespace in your file it makes different.
namespace MyCompany
{
using System.Data;
}
namespace OtherCompany
{
... can't use System.Data directly here.
}
|
|
|
|
|
Sweet thanx. I don't know why I've adopted putting them inside the namespace, I was happy with them outside and then suddenly I decided to put them in for no apparent reason .
|
|
|
|
|
Not that you are or aren't suggesting the practice of having more than one namespace in a single class file, but I'd have to say...DON'T!!!
You should never have more than one namespace within a class file. Honestly, you should never have more than one class in a class file. This is why it's referred to as a class file.
Of course, this is just an ideal. But, sticking to it will lessen problems in the future...trust me.
Michael Flanakin
Web Log
|
|
|
|
|
|
v3ct0r wrote:
I've used both and cannot find a difference in actual performance
Its not a performance thing. using is mearly telling the compiler that you will be using stuff from other namespaces implicitly (i.e. without having to give a fully qualified name like System.Data.SqlClient.SqlConnection )
If there is any performance gains to be had it will only be at compile time and not during runtime.
The other reply you got explains the rest, so I won't repeat it.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
|
|
|
|
|
As you've seen from everyone else's comments, you can put your using statements in or outside of the namespace declaration. Now, to caveat that, I'd like to highly suggest that you put them outside of it. Most code that you see should have the using statements at the top of the class file, so I'd just stick with this standard. As if industry use wasn't enough, it's actually Microsoft's suggested method.
Flexibility is nice, but there are times when you should choose standards over that flexibility. I think that this is one of those times.
Michael Flanakin
Web Log
|
|
|
|
|
Thank you. I agree with you, I'll be pulling my using statements to the top of the page.
Funny thing however, Microsoft had a Direct X 9 sample that had the using statments inside the namespace, this is actually where I picked it up from. Perhaps there was a specific purpose that I overlooked.
Anyway, thanks everyone else as well.
|
|
|
|
|
I'm sure this is a case of every developer has their way. What "Microsoft" suggests isn't always the same as what their developers do.
Michael Flanakin
Web Log
|
|
|
|
|
Ok, simple question, but I can't for the life of me figure out WHY this is happening.
I have a simple (right now anyway) Button-style control derived from System.Windows.Forms.Control. I have two custom properties and both have the DesignerSerializationVisibility attribute set to Visible. This *seems* to work (although I can't figure out why setting it to Content seems to make them NOT persist) However when I drop a few of these buttons on to a form, at first all is good - they look correct in design-mode, etc. As soon as I save and compile/run it though at least one of the controls (always the last one for some reason) disappears in design-mode. When the application is run, all is fine and all buttons are shown but coming back to design-mode yet again that last button is gone.
When I look through the windows-form-generator code in the form itself, I see that it IS setting the location and size of all the buttons correctly, yet when I highlight the *problem-disappearing* button in the form's property editor, it gets focused and is in the very upper-left of the form with a size and location both of 0,0.
Any ideas just what I'm seeing/doing here? Its driving me nuts!!!!
Thanks!!
|
|
|
|
|
I recently took a crappy C# test and wasn't sure about the correct answer to four of the questions (below). If you know the correct answer to any of them (no guessing please), please tell me and I'd also like a brief explanation if possible.
1. What is the purpose of the definite assignment in C#:
A. You must initialize every variable in a program
B. You must assign a value to every variable in a program
C. You must at least assign a zero to every variable in a program
D. You must assign a value to a variable before you use it
2. Which of the following statements is FALSE:
A. On disk, assemblies are Portable Executable files.
B. Assemblies are loaded on demand.
C. Assemblies will not be loaded if not needed.
D. Assemblies are always loaded.
3. There are two kinds of attributes in C#:
A. instrinsic and custom
B. internal and external
C. getters and setters
D. push and pop
4. Which of the following statements is FALSE:
A. Reflection can be used to examine the contents of an assembly.
B. Reflection can be used to find the types associated with a module.
C. Reflection can be used to find the events associated with a type.
D. Reflection can be used to find the types base class.
E. Reflection can be used to find the types associated with a namespace.
Thanks!
Alvaro
Give a man a fish, he owes you one fish. Teach a man to fish, you give up your monopoly on fisheries.
|
|
|
|
|
No offense meant, but I don't think anyone will help you here, nor should they. If you have specific questions regarding C# we'd be glad to offer help, but we won't do your homework for you.
---------------------------
He who knows that enough is enough will always have enough.
-Lao Tsu
|
|
|
|
|
Judah H. wrote:
but we won't do your homework for you.
He is older than that to have homework.
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|