|
Schoolmelk wrote: but I Can't get it to work
You'll have to be more specific.
Are you checking the return values of any of your calls?
/ravi
|
|
|
|
|
yes I get all things I need it goes wrong with the sendmessage / postmessage part those return 0.
|
|
|
|
|
You may want to check the value returned by GetLastError() to see what went wrong. If you're running on Vista, a value of 5 indicates "Access denied".
/ravi
|
|
|
|
|
GetLastError() returns 0. Is there no other way to send keystrokes to a minimized window? I don't think it is possible anymore to use sendmessage to msn live convo's
|
|
|
|
|
Hmm, that would lead me to believe the message is getting through. Perhaps DirectUIHWND is not the correct target window?
/ravi
|
|
|
|
|
Must be.
I used Spy+ to detect where my key input was send to while typing. These all where send to DirectUIHWND . Also when I check if my commands with PostMessage and SendMessage came trough and yes they did but won't show up in the edit box.
|
|
|
|
|
If I have a class as below:
public class Employee
{
private Boss _boss;
public Boss Manager
{
get { return _boss;}
}
}
Although the property "Manager" is read only, however a programmer can still do this:
_employee.Manager = null;
How do I ensure programmers can access the Manager object but not allow them to set the reference to null?
|
|
|
|
|
That shouldn't be possible. Your property name is different in the class (Mananger) than in the assignment (Manager), perhaps you have another property or public field called Manager?
|
|
|
|
|
Just a typo. They should both be Manager.
CodingYoshi
Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
|
|
|
|
|
Ok, but still this shouldn't be possible. Made a little test:
static void Main() {
Employee e = new Employee();
e.Manager = null;
}
public class Employee {
private string _boss;
public string Manager {
get { return _boss; }
}
}
And the compiler said:
Property or indexer 'Test.Employee.Mananger' cannot be assigned to -- it is read only
Just in case, select the _employee.Manager = null; and right click on the Manager word. Then from the menu, select "Go to definition". Does it end up to the place you posted?
|
|
|
|
|
Great, thanks.
CodingYoshi
Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
|
|
|
|
|
|
i want to catch the exception for the network failure what is the exception for this ?
|
|
|
|
|
There is no single exception. There can be a mariad of problems causing different exceptions at different stages of connecting and executing a query.
|
|
|
|
|
yrkl wrote: what is the exception for this ?
Did you try this one?[^]
|
|
|
|
|
Network failures usually get TCP exceptions. Usually when I want to test a network failure adequately I yank the cable in debug mode.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.
|
|
|
|
|
Definitely; there's no data like emperical data.
|
|
|
|
|
I'm working on a program for some of my coworkers that take inventory with hand held scanners. I've been able to download the text file from the scanner and play around with that, but now I'm to the part where the users need to be able to view, edit, and update the records because sometimes the data isn't always accurate. I'm trying to set this up where the records are saved in an excel file. Using an OleDB data adapter I can access the xls file and place it nicely into the gridview, and I'm sure with a little bit of elbow grease I'll be able to wire up the events to update and save the modifiled cells back. My question here is, is there a better way to do this? For example, is there a way in which I can just start excel.exe and embed it into my windows form instead of using OleDB?
Thanks everyone!
"You're damned if you do, and you're damned if you dont" - Bart Simpson
|
|
|
|
|
Might you not use some sort of database at the back end instead of Excel?
Regards,
Rob Philpott.
|
|
|
|
|
Hi Rob,
I thought of just using a SQL server at first, but one of my objectives is to give the users the ability to export everything to an excel document. That's why I figured It would make the most sense to just read and write straight to the xls file rather than first importing everything into SQL to then turn around, read it all back out and then write it to the xls.
I think what I will eventually do is just use System.Diagnostic.Process to start up excel opening the file after I've done what I need to do with it.
"You're damned if you do, and you're damned if you dont" - Bart Simpson
|
|
|
|
|
Excel makes for a lousy database. There's a limited number of rows you can put into an Excel sheet, and there is also the constraint of memory. You may eventually find out you made a mistake by going with Excel.
|
|
|
|
|
Hi Dave,
Ah, I was unaware of the row limitations. Thanks for the warning. To make sure I don't cramp my programs room for growth I've decided to go with a SQL database and just add a button to allow the users to export the gridview to excel.
"You're damned if you do, and you're damned if you dont" - Bart Simpson
|
|
|
|
|
Most of the times, "Export to Excel" as a requirement is made by persons who have no understanding of technical issues. Which is a bonus for programmers in this case, it is trivial to export to CSV and 99.99% of end-users don't know the difference and those that do don't care. With that issue out of the way embed into SQL Express, it will make your life easier.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.
|
|
|
|
|
Greetings all,
I was curious if anyone knew how one would go about graphing data recieved from a serial port via rs232 in real time. I would just like to have a 2d line graph that would update upon every byte recieved from the serial port. The graph can have a static range as well, say from 0-255.
Any help would greatly be appreciated.
|
|
|
|
|