I have a custom collection that I built that contains strings, doubles and datetimes. When I try and retrieve that collection from the server I get the following error:
"The type BarCollection in Assembly, Version=1.0.1106.204, Culture=neutral, PublicKeyToken=null is not marked as serializable."
I've derived from CollectionBase and implemented my Add and an indexer (strongly typed). The collection contains a structure that contains the aforementioned strings, doubles and datetimes. I've declared it as [Serializable].
Thanks for the suggestions, however, I figured out the problem. Yes, BarData had to be marked as serializable, but even though BarCollection is derived from CollectionBase which is supposedly already serialized, I still have to add the [Serializable] attribute above that class as well.
This is probably something that is glaringly obvious to anyone that knows anything about remoting ... but did I mention that this is the first day that I've tried it?
whats the easyest way too adjust a track bar value from 1 too 100, into a double starting at 1.0 and working its way down to .0001 (for form opacity).
i have it working with a huge switch, but i want a cleaner way to take the int value of say 100 too the double value of .0001
could you try butting your listbox on a seperate thread and abort the thread ? or maybe try putting the update in a while statement with a bool.... ie.
it would be a pain too do it with the while statement though cause it would stay in it until the update tells it not too. i would try threads.
;//do my update
I am trying to validate the row when the list changes to a different row. This triggers the RowChanging event from the dataset. If I create the ListBox on another thread, when I abort the thread, surely I would lose the list box as well, and would have to recreate it and restore it to it's current state.
15 minute project has now managed to waste the best part of a day!!
This looked so simple when I read the docs. LOL, should have known better by now!
i have a encryption program with the encryption method....the recursive file search method..all running on a string... when the user clicks stop..... it cancels the threads ..and the results that were found before the thread stopped are still in the list box... then when the user clicks the search button agian i tell the program too recreated the thread agian and it startes over
any time you abort a thread you have to reintialize it ie
make a private void just for your threads so you can call on then and get them reintialized when ever needed.
i have never used a datagrid before (isnt that what you are using? cant remeber) but this has always worked for listboxes atleast.
But you are in control of starting the thread. What I want to do is in response to a users click on the listbox, which will be triggered from an incoming windows message (WM_MOUSE_DOWN or what ever) via the forms message loop that is running on the forms main thread, therefor my thread of execution would never make it onto my thread.
what happens is, Manufacturer and ProductName get replaced as they should, but version just gets "v" without the version number after it. I also tried just "[Version]" but that didn't work either. Am I doing something wrong or can you not write the version into the name?
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
Okay I am trying to simulate the login screen that XP uses. Each opacid login box will be it's own form so i can control the opacity. The background form will be the MDI container for all the login forms.
But I don't want the border ARRGGGG around the entire MDI container!!!
Wonder how to make a rubber band drawing with GDI+ in C#.
Have used SetROP2( R2_XORPEN ) in C++ before, but that little function seemes to be gone in GDI+.
Have tried to use interop with GDI, but there are quite a few functions that needs to imported and beeing lazy I want to know if there is a simpler way.