|
Now I'm confused, I just created a simple program to duplicate what you're doing and got some really bizarre behaviour. If running without the VS debugger attached it works fine, with the debugger attached it won't update the textbox, just as your experiencing.
If you're interested my code is here[^], all there is is a small dataset (one table, one column), a form which has a combo box for selecting the serial port, a button to open / close the port and a textbox which is bound to the dataset. I didn't create a seperate class like you did but experienced the same problem.
But it works fine without the debugger
|
|
|
|
|
Holy Bible Batman you're right!!!! Arrgggh! I didn't test your code but just tried it on my own and it works... thanks to you and your tenacious approach. And not one delegate or generic in sight!
My workmate says that if your over our neck of the woods sometime (NZ) we owe you a beer. Thanks very much Ed, you've been a real help on a prob that had me completely stumped.
|
|
|
|
|
Hmm, might take you up on that offer if I ever go down that way. Confused though, you're in the States (according to bio) and you work in New Zealand?
If it is the States I should hopefully be going from the 19th of April to 7th May, but that'll be Houston (7 days), San Antonio (7 days) and New York (4) days. But most of the time will be spent shooting I think, World Championships being the reason for the trip.
Glad to have been of help.
|
|
|
|
|
Ooops well, I guess I didn't update the default profile. I'm actually from NZ and live in NZ! So, we will have to have that beer another time! Shooting eh??! World champs! I guess you are competing, well if you dead eye with the pistola as you are with code you're bound to do well!
Thanks again for you help, I really appreciated the time you spent. Good luck!
|
|
|
|
|
TheTinSoldier wrote: dead eye with the pistola
Nah, bigger & better :->
The world champs are for Sporting which is a form of Clay Pigeon Shooting == Shotgun
Haven't shot a pistol in years, my other shooting involves Air-Rifling (High-powered[^], i.e. it requires a firearms certificate here in Britain) with a bit of rifling, .22, .243 & .303.
|
|
|
|
|
Now that sounds like fun! I was talking to my brother over the weekend about shooting guns and I must admit that I reakon is would be a real blast - pun intended. I've shot a .22 and a slug gun when I was a kid but that's about it. I've still to check off the shotgun! It's got to be on the list of things to do at least once! Well anyway Ed, good luck and bring back some silverware!
|
|
|
|
|
TheTinSoldier wrote: good luck and bring back some silverware!
Thanks, I've finally been given the go-ahead by the doctors so I'm definitely off to America now , just wish I'd changed my gun before I went (I've been trying out a friend's gun and been shooting better with it)
|
|
|
|
|
Hello,
I would like to add a window to my application which pops up while the application is loading. It also disappears once the application is loaded. I am sure you know what I am taking about. This is what we get with all comercial window applications. I am not sure what it is called or how to go about it.
I truly appriciate your help in this matter.
Khoramdin
-- modified at 18:26 Tuesday 13th February, 2007
|
|
|
|
|
What you are talking about is a splash window.
There are a lot of examples out there, now you can search for them.
---
single minded; short sighted; long gone;
|
|
|
|
|
There are two ways to implement them and one of the ways is very wrong. Splash screens must be in a seperate thread from the main application if they are to be effective, unless they are just eye candy.
File Not Found
|
|
|
|
|
if i model robot in 3d max than can i do real time simulaton on XAML?i mean i want to control robot arm that is modelled in 3d max etc.angle variables will be in visual c#.my mechanic robot arm's any axesses are rotated than simulation will be rotated too.XAML can do it???.when i make this steps so can i do this simulation?
1)modelling my robot arm in 3d max or like this programme.
2)get angle variables from visual c#.
3)use these angle variables in XAML and rotates robot arm.
Are these steps true?
|
|
|
|
|
When you use the ObsoleteAttribute it generates a nice compiler warning when implementers use an obsolete method.
I would like to be able to create my own attribute that, if placed on a method and then referenced in a similar fashion, generates a customer compiler warning, or even error.
Ie.
[MyAttribute]
public class Foo{}
public void SomeMethod(){
Foo foo = new Foo();
}
Would generate my own compiler error or warning.
File Not Found
|
|
|
|
|
Looking at the code for the Obselete attribute under Reflector there's nothing special inside it but I was wondering if you inherited from it. It's sealed sorry, can't do that.
|
|
|
|
|
Plus I want custom warnings as well. Theres got to be some way for an attribute constructor to detect if the runtime is a compiler and then register a warning with it but I do not know. Web searches have been fruitless and I have been lazy
File Not Found
|
|
|
|
|
I know, it would be interesting to know how to do this so I did some Googling and nada. The only way I can think of is possibly building an add-in but that'd only work for VS and is no where near as elegant or reliable. I shall keep looking though.
|
|
|
|
|
Is there a way to control Voltage output of a USB Port. I'm trying to connect a custom made circuit through USB and send power on request to it.
|
|
|
|
|
I don't know but if you can the answer would be here http://www.usb.org/developers/docs/
File Not Found
|
|
|
|
|
AFAIK a USB can only supply a maximum of 5V anyway and I think it's fairly constant, that's why big devices such as printers have to be plugged into the mains.
|
|
|
|
|
Yeah... 5V is plenty ...however, I need to know if I can trigger the supply voltage on and off somehow. I don't need the USB to supply me with any power, but just act as a switch. I haven't had much time to research this, thanks for the replies so far.
|
|
|
|
|
I'm pretty sure that the power is supplied constantly in most cases, it'd probably be wiser to use the data line and when it's on transmit 0xff continuously and when you want off transmit 0x00.
|
|
|
|
|
Interesting. If I recall correctly the Data lines supply 3.3V when transmitting and 0 when not ? If so that's great. Now I have to find away to communicate with the USB Port itself via code. Thanks for the replies.
|
|
|
|
|
Might want to take a look at #UsbLib[^].
|
|
|
|
|
|
What is GetHashCode method for? More importantly what is HashCode and why would we need it ? Thanks in advance.
|
|
|
|
|
From MSDN[^]:
A hash function is used to quickly generate a number (hash code) that corresponds to the value of an object. Hash functions are usually specific to each Type and must use at least one of the instance fields as input. A hash function must have the following properties:
- If two objects compare as equal, the GetHashCode method for each object must return the same value. However, if two objects do not compare as equal, the GetHashCode methods for the two object do not have to return different values.
- The GetHashCode method for an object must consistently return the same hash code as long as there is no modification to the object state that determines the return value of the object's Equals method. Note that this is true only for the current execution of an application, and that a different hash code can be returned if the application is run again.
For the best performance, a hash function must generate a random distribution for all input.
/ravi
|
|
|
|