|
yes, a lot of non-GUI stuff can be designed: timers, BackgroundWorkers, SerialPorts, ...
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Thanks, I didnt put it in the form_load event, instead put it in the start event and now my program works. LOL I can't believe I didn't realize that my tick event was never executed. THANK YOU VERY MUCH!
Edit:
I had to add a timer1.Tick -= this.timer1_Tick; on pause & restart though and I had to disable pressing restart on pause. Oh well, at least the program works. Thx
modified on Monday, June 22, 2009 2:09 AM
|
|
|
|
|
Hi,
do you have a timer1.Start(); statement somewhere, and are you sure it gets executed?
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
I'm sure that there have been a thousand questions on this topic, but here goes...
I have an application that uses the System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces() to retreive each friendly interface name on a machine with multiple adapters. Later, depending on other choices, the application needs to start UDP multicasting. For this I need to be able to find the IP address of the interface chosen. As I said, all I have is the friendly adpter name. How can retreive the IP address(es) of the NIC starting only the adapter name?
Raven
|
|
|
|
|
Hi to all.
Some of programs create thumbnail for its files
like Corel, Adobe reader, AutoCad, and some of weak pictures(like files that have error on download ) that have thumbnail
I want to catch file's windows thumbnail
please help me
|
|
|
|
|
there's a thumbs.db file in the folder, they are in there. Assuming you mean the thumbnail you see in Windows Explorer.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Are they if you set Windows to not cache it? Also there aren't going to be these files created on read-only media, so I guess there muse be some API for that...
Jan
|
|
|
|
|
Do you know how can I get the corresponding project of a custom component at design time?
For example: a custom list box resides in a form which belongs to a project. I need to access that project, from inside of the listbox, at design time.
Thank you.
Bogdan.
|
|
|
|
|
What do you mean, 'access the project' ? The csproj file is not there, nor can you change it's settings in the compiled dll. If you want the name of the project, if it happens to be the name of the main namespace, as is the default, you can get the name via reflection, but, given that it never changes, I assume this is not what you mean ( plus, I can't think of any reason to want to do this )
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
I'm currently working on a project were I want to be able to extract information from the currently displayed page in a browser control, and also be able to change whats displayed on the page, or add information by my self.
Is there anyone that can point me in the right direction were to start if I want to be able to manipulate the content on the page?
I know HTML and some DOM, now it's just how i can access the code behind to collect data and to change it on the page.
Thanks in advanced.
modified on Tuesday, June 23, 2009 9:42 AM
|
|
|
|
|
Okay, I think that I understand the issues affecting C# equality testing (including numerical precision, type conversions, boxing etc) - e.g. http://blogs.msdn.com/jmstall/archive/2005/03/09/390135.aspx[^] - but I don't understand the statement in MSDN (http://msdn.microsoft.com/en-gb/library/bsc2ak47.aspx[^]):
x.Equals(x) returns true, except in cases that involve floating-point types. See IEC 60559:1989, Binary Floating-point Arithmetic for Microprocessor Systems.
Can anyone please explain? How can this sometimes evaluate to false?
(I couldn't find anything interesting re: IEC 60559:1989 - still Googling though.)
P.S.
double d = Double.NaN;
d.Equals(d);
"...there's what people want to hear, there's what people want to believe, there's everything else, THEN there's the truth!" - New York D.A., The International
|
|
|
|
|
Hi,
the MSDN documentation on Object.Equals says:
This method can be overridden by a derived class.... The following statements must be true for all implementations of the Equals method...
x.Equals(x) returns true, except in cases that involve floating-point types. See IEC 60559:1989, Binary Floating-point Arithmetic for Microprocessor Systems.
so all it says is xfloat.Equals(xfloat) is ALLOWED to return false; it just leaves the Equals() result for floats undefined.
The IEC standard isn't available for free, so I can't check this, however I assume they call the result of x==x undefined, hence hardware that implements IEC 60559:1989, and software running on such hardware, would find it difficult to enforce x.Equals(x) returns true.
The fundamental reason is it does not make sense at all to test two floats for equality; by their very nature, float values are either close to each other (difference less than epsilon), or they are not. Zero does not exist in nature.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Luc Pattyn wrote: Zero does not exist in nature.
Shhhhhhhhhhhhhh, please don't tell it to Zero. It assumes its existance having the same dignity of 1, 2, pi and so on.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hmmmm, pie
I are troll
|
|
|
|
|
I think that the standard states that NaN may be treated as not being equal to NaN - which seems fair as operations resulting in NaN are NOT returning an an actual numerical value. .NET does however treat them as equal when using Equals() but not when using ==.
I can't see how x.Equals(x) can evaluate to false for real numbers (whatever the implementation) when the 2 operands are references to the same object.
Do you think that MSDN is really just saying not to rely on it - even when referencing the same object? (If so it would be useful if they stated thay some other comparison should be used with reference to Epsilon.)
"...there's what people want to hear, there's what people want to believe, there's everything else, THEN there's the truth!" - New York D.A., The International
|
|
|
|
|
As I said, MSDN requires an inherited Equals to return true for x.Equals(x) unless x is of type float/double, in which case there is no such requirement at all.
Your point on one NaN not being equal to another NaN is absolutely valid; anyway, x.Equals(y) is not supposed to first check if x and y refer to the same object. So if they both refer to the same float variable and that happens to be NaN, then is really should return wouldn't be wrong to return false!
AFAIK the same argument applies to plus and minus infinity, one infinity does not equal another.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
modified on Sunday, June 21, 2009 2:14 PM
|
|
|
|
|
Hey everyone,
Any idea why one of my fields in a crystal report totally disappear from the report during runtime?? Everything related to that field, the header lable, the data field, and even the summary field!! All the other fields are just fine and were created just like this one by dragging them from the database field tree.
Many thanks!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hey,
Just found the answer and it was stupid.. I accidentally misspelled the field name when filling the dataset that it was never filled with the other fields, now it's fine!
Thanks for reading.
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi,
Is there a way to determine that a custom Visual Studio component has been deleted from a form at design time?
I am currently working on such a component.
online
|
|
|
|
|
The only two things that occur to me are:
1) It might (that's a very big might) be possible to override the OnControlRemoved method of your Form, test for DesignMode and then check if the ControlEventArgs.Control is your control. I'm not even sure that the method gets called at Design time, you'd have to check that for yourself. You would also conceivably have to do this for every container control on the Form.
2) Another possibility is to override the Dispose method of your control, or write a Destructor , and handle things there. Again, you'd have to test for DesignMode.
These two options may be either impossible or unfeasable. I'm pretty sure that others will tell me if I have it totally wrong, but that is where I would start investigating if it were my project.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thank you for the reply.
I need a design time solution, independent of the container form.
Trying the second solution didn't work. The Dispose is called also when the form is closed during the design time.
Bogdan.
|
|
|
|
|
Good Morning Fellow Coders;
I have a treeView that I have developed over the years. It has all the things that I need it to do in most of my apps including the ability for the user to persist it to a file on the hard drive.
The problem is that I use it in many apps that I write but, as I adapt it to different apps it can only open files for a the app it was compiled in.
My questions is this.
How do I re-use it and keep the ability to open any of these files from any app I use it in?
Do I create a stand-alone project for just the tree then change the namespace or do I have to make a control out of it?
Any thoughts will be appreciated...
tia
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Rafone wrote: How do I re-use it and keep the ability to open any of these files from any app I use it in?
You redesign it with extensibility points.
In your example, saving and retrieving the tree state from a file and you having different file formats for various applications, you would add the ability of being able to query in all ways necessary the state and structure of the tree. Another class is responsible for persisting this to where ever you need it (file, database, whereever). If you have multiple ways of storing it you have multiple classes responsible for persisting the information. Single responsiblity principle.
|
|
|
|
|
Let me see if I can clarify.
Right now I use it in a couple of apps. If I try to open one of the files made from myApp in myApp2 I get an exception...
"Unable to find assembly 'myApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."}
All I have done was to copy my tree.cs file from myApp to myApp2 and changed the namespace so it will work in myApp2.
So...is this because the namespace's are different? If so can I just reference the myApp namespace in myApp2 and use the tree components from myApp?
tia
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Hi,
as long as you included a reference to your DLL, you can refer to its public types, either using the full name (mySpace.mySubspace...MyClass) or using a using statement (using mySpace.mySubspace; ) and a short name (MyClass instance=new MyClass()).
There is no need to modify namespace names, they exist to help you keep things apart (avoid name clashes), not to make your job more difficult.
PS: the types need to be public, VS often creates classes without attributes, just prefix "public".
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|