|
hi, you can use the SHAppBarMessage API for that, just do a search on codeproject and theres an article on it somewhere. It will let you get the RECT structure of the taskbar.
|
|
|
|
|
Hey dude.
sorry but I can't find anything by that name.. :/
Could you be so kind to fetch it for me ?
- Up The Irons, Morten Kristensen
|
|
|
|
|
Here you go, its mostly about something else, but theres a part about getting the size of the taskbar if i remember correctly.
http://www.codeproject.com/csharp/csdoesshell3.asp
Dan
|
|
|
|
|
Every 30 seconds or so, I need my application to persist state, just in case the power goes off or something like that. What's the best method based upon this time frame? For example:
- Save to an XML configuration file.
- Save to registry.
- Save to binary file (serialize object?)
- Something better?
Thank you.
Sammy
"A good friend, is like a good book: the inside is better than the cover..."
|
|
|
|
|
Don't save to the registry with .NET applications. It's not a good practice for many reasons, especially deployment issues. Other than that, save to whatever file format you want. Binary serialiation is faster than XML, but XML gives you the ability to easily customize the state while the program is not running.
One other way - albeit more difficult - would be to implement a custom BindingManagerBase derivative that uses a file as a backing store and bind the properties of controls you want persisted. When they change, the binding manager is updated and your derivative class could save state immediately. This way, you don't have to poll and don't have to keep a timer, which is relatively inefficient since the state of your application might not have changed. See the documentation for the BindingManagerBase and Control.DataBindings in the .NET Framework SDK for more information.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Another consideration for your design should be:
What happens if the power goes out WHILE the state is being saved?
If your app is that critical, you might want to consider a UPS and monitor that for a power outage so your app can save it's state one last time before the power REALLY goes out.
RageInTheMachine9532
|
|
|
|
|
Okay, it's not THAT critical
Thanks!
Sammy
"A good friend, is like a good book: the inside is better than the cover..."
|
|
|
|
|
Hello,
As I build MDI App, Form Activated event of each child form fires once at loading but never again. I want to know why this is happening. As earlier when same application was not MDI App Activated event of each form fires every time when form get focus.
Thanks for ur support
Inpreet Singh
|
|
|
|
|
Hello,
As I build MDI App Form Activated event of each child form fires once at loading but never again. I want to know why this is happening.
Thanks for ur support
|
|
|
|
|
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
|
|
|
|