|
Thanks, I will give this a try
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
Glad to help you.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Had to make some small modifications, but this worked perfectly for what i needed. Thanks alot
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
You are welcome
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hi,
I have some class libraries, which I dont want the client to use.
How can we secure our dll in such a way that if someone else adds our dll to his project then it gives some error or may e do not allow to add it.
Or is tehre any other way by whihc we need not send the DLL in the setup.
|
|
|
|
|
the problem is if you make it so that your client can't use it, then neither can you. You can implement some security by requiring a certain key be passed in to your method calls, and you can protect against reflection and disassembly by Obfuscating your dll.
You can use Dotfuscator Community Edition included with VS2005/8 to do that for you.
Hope this helps!
Greg
|
|
|
|
|
The problem:
Among data stored in dataset are strings with Croatian characters (Windows CE, code page 1250).
First I've used simple method for writing data to xml.
someDataTable.WriteXml(someStream);
At first glance it was perfect, but when xml file was opened with Wordpad and some domestic application which uses ton of legacy code written in C++ (MFC) Croatian characters weren't correctly displayed, well haven't been displayed at all (windings-like characters and "hieroglyphs").
So I decided other approach, to store data as xml to memory stream and then to turn data to string...
someDataTable.WriteXml(someMemoryStream);
byte[] buffer = someMemoryStream.GetBuffer();
File.WriteAllText(xmlPathName, Encoding.UTF8.GetString(buffer), Encoding.UTF8);
The result was that all text/xml editors I had available were displaying strings correctly, but above mentioned application didn't.
What else can I do? Fiddling over legacy code is last option I'll try (for 3 years I'm working with .Net almost exclusively, my C++ experience was gained in college and in some side educational projects .
|
|
|
|
|
Hi all,
can somebody help me to say WebBrowser component not to load multimedia stuff like pictures, music, etc .. ?
Why? I'm developing aplication which is used usually in the field, so only slow connection to internet via mobile phone is available. Cancelling loading pictures will increase the speed of browsing the web pages....
Thank You in advance
|
|
|
|
|
Is this going to be connecting to sites that you have control over? Certain sites have text only versions that you may be able to use.
|
|
|
|
|
Unfortunatelly not. I'd like to du quick browsing within my application without loading multimedia stuff.
Any idea?
|
|
|
|
|
I have a problem deserializing a structure on the server side while I can deserialize it fine on the client side. Not sure why. Comments please
Client code (MyTxBuff is a structure of mixed data types):
if (SendStruct(ref MyTxBuff, ref dataArray) == true)
{
Stream stm = tcpclnt.GetStream();
stm.Write(dataArray, 0, dataArray.Length);
Console.Write("sent fine");
// deserialize
// dataArray is in the stream stm
// define another stream that contains the dataArray buffer.
Stream stream2 = new MemoryStream(dataArray);
// now define a formatter
IFormatter formatter = new BinaryFormatter();
// but create first a structure to hold the deserialized data
TxBuffer1 myTx1 = new TxBuffer1();
// deserialize the stream
myTx1 = (TxBuffer1)formatter.Deserialize(stream2);
On the client sied, myTX reads the expected values.
On the Server side I receive dataArray values into bytesRead array (identical values on client and server). I use the same de-serialization code on the server side but I get exception. Bot data arrays are of the same dimensions. The server code is :
byte[] bytesRead = new byte[1024];
int k = Socket1.Receive(bytesRead);
// deserialize
// define another stream that contains the bytesRead buffer.
Stream stream2 = new MemoryStream(bytesRead);
// now define a formatter
IFormatter formatter = new BinaryFormatter();
// but create first a structure to hold the deserialized data
TxBuffer1 myTx1 = new TxBuffer1();
// deserialize the stream
myTx1 = (TxBuffer1)formatter.Deserialize(stream2);
|
|
|
|
|
Attached to the serialized data is the name/version of
the assembly that defines the type of the serialized data.
The system attempts to use that same assembly to get the
type info required to deserialize the data into an object
of the same type.
You can make the same assembly available on both ends
or use a SerializationBinder[^] on the deserializing end.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
modified on Wednesday, September 3, 2008 11:39 AM
|
|
|
|
|
Father class how to use the special sub-category type (such as sub-class form the TableAdapter of a table), the current idea is adding traversal of all the things on the form(such as traversing all controls on the form), if found what I need, I want to transform the type and use it as the class I want. But now i can not change the object I found into the type I needed. Thanks a lot.
Code is as follows:
private void findcontrol (Control.ControlCollection controls)
(
foreach (Control ctrl in controls) / / This traversal of a similar type of controls or components
(
if (ctrl.GetType (). Name == "customers TableAdapter") / / form on a table, the TableAdapter
(
/ / Ctrl-type into the TableAdapter customers to use
/ / Cases, TableAdapter.Update (customers DataTable);
/ / Ctrl like to, as with customers TableAdapter
)
findcontrol (ctrl.Controls);
)
)
modified on Monday, September 1, 2008 9:01 PM
|
|
|
|
|
Again, don't cross post. Geeze.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
sorry again.i really didn`t know which part should this question belong to so .. .But i wouldn`t cross post next time.
|
|
|
|
|
Hi guys
Just curious
How do I get the base score in Windows Vista within C# or any other app?
Been searching the web but no luck.
Thanks
|
|
|
|
|
Hi,
I'm an absolute newb at this - I'm writing software for a psychology experiment (in vb.net) and I need to have an event triggered by when the subject speaks. I don't need anything fancy (I think), just something that will detect when the amplitude of the sound coming from the microphone is above some threshold. Any ideas?
I'm really green - all the previous programming I've done has been by copy-and-paste from websites and tweaking it to get it to work, so if anyone can point me to an online bit of source-code I'd be very grateful.
Thanks!
Mark
|
|
|
|
|
My VS 2005 app will work with .NET 3.0, but defaults to .NET 2.0 if that is present. How can I make it so that it will use the latest version of .NET wherever possible, and will only revert to .NET 2.0 as a last resort?
Thanks!
|
|
|
|
|
You could upgrade to VS2008 and recompile against .NET 3.0 or change the supportedRuntime[^] element in your app.config.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Thanks for your reply! But I don't want to take away Framework 2.0 support, I just want it to prefer the newer framework when both are present. Maybe I should explain more about why I want this:
Our software benefits from 64-bit features, but we noticed than on many 64-bit customer machines, it was actually running in 32-bit mode. The reason for this was that even though their Vista 64-bit was coming with .NET 3.0 installed, at some point some other software was installing .NET 2.0 86x, and our software was suddenly defaulting to using that instead. It would be nice if we could keep our .NET 2.0 support, but still have our software prefer 3.0 when present so that it had a higher chance of running as a 64-bit app on 64-bit systems.
|
|
|
|
|
You can add multiple supportedRuntime elements. The order they are listed determines the preferred order.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Thank you very much for pointing that out. I have one more question that I wasn't able to find the answer to: Say I add elements for supporting .NET 3.5, 3.0, and 2.0, then some time after we release the app computers begin circulating that only have .NET 4.0 installed on them. Will our application lose its ability to use other versions of the framework because of the presence of these explicit supportedRuntime elements, or will it still be able to use whatever version is found as a last-case resort as it does at the moment?
Thanks again!
|
|
|
|
|
Winkles wrote: Will our application lose its ability to use other versions of the framework because of the presence of these explicit supportedRuntime elements, or will it still be able to use whatever version is found as a last-case resort as it does at the moment?
I'm not 100% sure about this, but I believe that will be the case. You would want to try and do some testing to confirm that, however.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Is their actually a problem with a .NET 2.0 not being upgraded if it was built as a .NET 2.0 application?
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
I have written three groups of classes that implement custom columns and editable cells in a DataGridView. GridMaskedEdit implements a masked edit control, GridNumericCell implements a custom numeric text box based on the framework's TextBox, and GridDate implements a custom date control hosted in a UserControl.
Imagine if a standard DataGridTextBoxColumn and one of each of these is added to a DataGridView. Add a couple of blank rows. Increase the height of one of the rows.
Enter the DataGridTextBox column and begin to edit: the carat positions itself in the left middle. When you leave the cell, the text remains aligned in the left middle.
Enter the GridNumeric column and begin to edit: the carat positions itself to the right middle (where it belongs.) When you leave the cell, the text remains align in the right middle.
Enter the GridDate column and begin to edit. The date control's editing interface appears docked to the top of the cell and is bordered in light blue (the control highlight color?) When you leave the cell, the control disappears and the text is repositioned to the left middle.
Enter the MaskedEdit column and begin to edit. The same thing that happens in the GridDate column happens here: the edit control is drawn at the top of the cell and is bordered in light blue. When you leave the cell, the control disappears and the text is repositioned to the left middle.
Basically, I want the date and masked edit controls to appear without a border, in the same middle position where the text will go. I have compared all the code for these three column/cell/control groups, and it is all the same. Commenting out the alignment code in the GridNumeric set (the only meaningful difference between it and the others) only changes the alignment of the text: it still appears with no border and centered vertically.
This kind of project seems very common, as CodeProject has lots of examples. Any suggestions on where to look for a solution?
|
|
|
|