|
Why do you make the user enter the number twice? The only time this behavior is needed is when it's a password, and the user can't visually verify that they're entering the right thing.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
The operators enter a new serial number every two to three minutes all day long. Normally this is done with a barcode scanner but if the label is damaged they need to enter it with the keyboard. This serial number is written to EEPROM on the PCB under test. If they get it wrong, the board will have to go back through the programing cycle. The extra time, to enter it twice every so often, is worth avoiding the programing cycle. Additionally, the mistake might not be discovered until the board is installed in the final product. (Lots of wasted time...)
Greg
|
|
|
|
|
|
Hi folks
I'm trying to get the javascript variable in the HTML page loaded in WebBrowser control through IHTMLDocument2 interface. In VB6 it was simple: "WebBrowserInstance.Document.parentWindow.variableName".
But, I stuck in MSHTML interfaces.
Could somebody help me with that?
Thanks
|
|
|
|
|
You may get variable in this way :
IHTMLDocument2 document2 = (IHTMLDocument2)axWebBrowser1.Document;<br />
object variable= document2.parentWindow.GetType().InvokeMember ("variableName", <br />
BindingFlags.GetProperty, <br />
null, <br />
document2.parentWindow, <br />
new Object [] {});
The snippet below shows how to set the variable
document2.parentWindow.GetType().InvokeMember ("variableName", <br />
BindingFlags.SetProperty, <br />
null, <br />
document2.parentWindow, <br />
new Object [] {"New value"});
DevIntelligence.com - My blog for .Net Developers
|
|
|
|
|
Does anybody know a good hashcode algorithm to generate unique codes?
What if you have two objects and their properties are equal? How would a hashcode be unique then?
Here, I am making an assumption that the hashcode is created using the properties of the control.
So I guess the real question is: Is there a way to generate a unique hashcode that doesn't rely on the properties of the object?
Thanks
Eric
|
|
|
|
|
Create a hashcode from the reference pointer.
---
b { font-weight: normal; }
|
|
|
|
|
Does the hashcode need to be unique/same across sessions? What're you using it for: uniqueness testing or sorting? If you don't need cross session consistancy or can save the code somehow, and are only using it for uniqueness testing: just give each object a guid.
|
|
|
|
|
If you need a unique hashcode that doesn't depend on the properties try the timestamp instead or you can use guid instead of calculating them on your own.
Greetings,
Ingo
|
|
|
|
|
Be aware that if comparison of instances return true , like in:
obj1.Equal(obj2) == true
then they must return the same hashcode.
obj1.Hahscode() == obj2.hashcode()
So, if you implement your own hashcode that is unique for every instance, make sure to override the Equal method to always return false .
If you don't do that, your class won't be usable in Arrays and Hashtables.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Thanks for all the suggestions.
Much appreciated.
Eric
|
|
|
|
|
Hello,
Lets say I built my app on a machine that has Excel 2003 installed. So, the interop assembly created was built off of 2003.
Now, I have a few questions on what would happen if I ran the following code on a machine that had, lets say, both Excel 2000 and Excel 2003 installed.
using Microsoft.Office.Interop.Excel;
...
ApplicationClass app = new ApplicationClass();
MessageBox.Show(app.Version);
app.Quit();
...
1. If the user has both Excel 2000 and Excel 2003 installed, which one will be started? Will it always start the latest version?
2. If no Excel is installed at all, would app be null after the call to new ApplicationClass() or would that call not even be able to run?
Thanks.
|
|
|
|
|
I'm trying to compile a little C# program with the commandline csc compiler. I'm using the [DLLImport()] attribute, so I need the System.Runtime.InteropServices namespace, right? Problem is, csc wants to know what assembly it's from (there's no DLL named System.Runtime.InteropServices.dll). I need it for the /r: switch for csc.exe. Anyone?
|
|
|
|
|
Mscorlib.dll
---
b { font-weight: normal; }
|
|
|
|
|
I saw that one mentioned in the MSDN article for the attribute, but, when I use it, csc gives me the following error (the same as if I had not used it)...
[file and location]: error CS0246: The type or namespace name 'DLLImport' could not be found (are you missing a using directive or an assembly reference?)
Am I misspelling something?
By the way, I appreciate the help. Thank you!
|
|
|
|
|
Ok, I see what I did. I accidentally capitalized the two L's in "DLLImport". Now that I feel like a complete moron, I'll back out of here now. Thank you very much for the help! This place rocks!
|
|
|
|
|
Hi,
I'm working on a control contains two listviews which are arranged vertically.
I would like to synchronise them to make them appear like just one listview.
(they "view" are set to detail, columnStyle is set to "none" for one and to "Clickable" for the other one.)
I had allready synchronized the width changing of columns but I can find a way of managing the scrollbar.
I would like scrollbar doesn't appear in one listview and would be manage with the other one.
Is there anyone who can help me please ?
Sincerly
|
|
|
|
|
I'm using class Net.Socket to establish internet connection. Everything is OK, but I can't close the connection.
Methods .ShutDown(...) and .Close() do not help me - the connection is still alive, after calling these methods.
My code:
/////////////////////////////////////////////
_sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPAddress address = hosts.AddressList[0];
IPEndPoint ipep = new IPEndPoint(address, port);
try
{
_sock.Connect(ipep);
}
catch(Exception sockex)//(SocketException sockex)
{
}
// CLOSING
_sock.Blocking = false;
_sock.Shutdown(SocketShutdown.Both);
_sock.Close();
|
|
|
|
|
I would think Close should. Did you try Disconnect?
Rather than swallowing exceptions, you might rather use a finally block:
try
{
_sock.Connect(...);
}
finally
{
_sock.Close();
}
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
|
Hello Everyone,
I am wondering if it is possible to use F9, F10, F11, & F12 as a shortcut key in my web application. I know that IE reserves some of them, but the client would find it useful if we could apply them for the application purpose rather than using Alt+Character.
Has anyone accomplished this without using a 3rd party add-in product?
Thanks for the thoughts-in advance.
SD
|
|
|
|
|
Hey,
i was just wondering, how do i make a menubar like the one in Skype ? (http://www.skype.com/i/screenshots/step1_windows.png[^] - The top one with icons)
It seems like it is just regular buttons, they have used which gets the outline when the mouse is moved over.
But i cant find out how to remove the outline from the buttons when the mouse is not over.
The 3 styles i have all have a outline (standard in .Net 2.0), and doesnt look like the ones in Skype.
Also is the Seperator which is used a standard item ? or is it something they have made themself ?
Martin
|
|
|
|
|
Hmm ...
Actually it is not only Skype that have that type of buttons ... also Internet Explorer, Outlook and more uses that type of buttons...
It is just like normal buttons with a Image attached but they dont have the outline, only when the mouse moves over...
I guess they are probably already a part of the .NET 2.0 Framework ...
But how are they made ? what are they called ? i simply cant find out ...
Can anyone help me ?
What should i look for, for creating buttons like that ?
|
|
|
|
|
Hi everybody!
I've got a problem: (C# 2005)
I'm writing an applitcation that menage a database. I want to use the timestamp method to make the update to the database. I've alreay added to each relation in my database a column with a timestamp value. I know i must modify the text of the update command in the table adapter but i dont know how...
please help me!
thank you in advance
Enrico
VentoEngine corp.
Program your life ^^
|
|
|
|
|
I installed VS2005 very recently. Where is the DataAdapter( all types sql,ole) object which usually shows up under the Data tab in the ToolBox in VS2005. Any help or links would be greatly appreciated.
Thanks
VPMahank.
|
|
|
|