I'm in search for a Visual Studio 2010 Photo Gallery website or project I can customize to my needs. It does not need to be free. I would be most grateful for any links/hints/etc leading to sites offering such contents.
My C# knowledge is limited.
i have project that need to reference a mathlab dll, but this dll is wroking only on 64 bit systems, because i build the dll in my 64 bit pc, when i try to run this project in 32 bit pc i get an error, but when i run the project with the dll which is built in 32 pc it works fine. so my problem is how can i add the reference at run time depending on the system(32/64), so then i don't want to keep two separate projects.
and is there any way that i can add the reference that can be selected at runtime, but the doubt i'm having is i need a reference (one of them 32 dll or 64 dll) to build the project.
Assuming you have two native code DLLs, one with 32-bit code, the other 64-bit code, there are basically two ways AFAIK:
force your app to always run in 32-bit mode using shortcut properties. Or build your managed app for "x86"; it will always require the 32-bit DLL.
build your managed app for "Any CPU". It will get launched as 64-bit whenever possible, and then it will need all-64-bit DLLs. As you normally don't explicitly load native DLLs from managed code, the best way to cope would be to have two prototypes and a stub for every native method, like so (note different DLL names!):
I am using C# 2010 and I have an access database that connects to my form and I have 7 tables in it, all tables have the same fields but show different information (its an front end user application that connects to a database that has information on shellfish and each table is a different family but contains same field headings such as common name, size of shell, shape of shell, distribution etc...).
What I would like to is have two list boxes on my form, one to choose the table and second to choose information on the first column of the table as the first column is the common name of the species you are looking for, which is different depending on the table chosen, and when you choose one, it loads the information into the correct textboxes. How would I do this? Haven't worked with creating front end database applications for about 4 years and getting a little rusty. Thanks in advance.
You can still do it the same way you did it 4 years ago using ADO.NET.
If this is not legacy data, by that I mean you can change the structure without breaking other applications, merging this data into one table will make life a lot easier. Create a Family table with Id and Name fields. Then create another table called Shellfish with all the same fields and include a FamilyId field. Then insert the records from the other tables. You can do this by creating queries in Access. The reason I suggest this is because it will make developing your UI a lot easier. Normalising the data schema will make a huge difference.
Also is there any requirement for the data to be stored in Access? Access has an upgrade wizard which will make it easy to convert to a SQL Express database. This will enable you to use Entity Framework which will make development quicker if you don't include the learning curve.
Once you have done that, filling your ComboBoxes, ListBoxes, TextBoxes etc., will be a piece of cake.
If it is a legacy system you are probably resigned to cutting a lot of code in your Data Access Layer to replicate what I have mentioned above using ADO.NET.
I have a progress bar on my first form (first form you see when application loads). What I want to happen is when the form opens for the progress bar to go up 10 every second until it gets to its maximum value of 100, stop and stay at maximum value then enable a button which is disabled.
Code on form load:
Timer time1 = new Timer();
time1.Interval = 10;
time1.Tick += new EventHandler(timer1_Tick);
Code on timer tick:
progressBar1.Value += 1;
Now the problem with this code, I get an error because the progress bar tries to go 1 higher than its maximum value and I can't figure how to get the progress bar to stop trying to go higher when its at its maximum value. I am not sure where to put the button enable code since there is something I am doing wrong here.
Next I have another button that when clicked I want it to close the form and open another form. I don't want the form to hide when closed but exit the form completly, but putting form1.close (); it won't work as its my first form, the whole app just exits. What should I do?
10 milliseconds, yes that's what I meant, I wanted the progress bar to go up 1 every 10 milliseconds until it hit the maximum value then stop, btu the timer stop isn't working. The timer doesn't appear to stop, or I think the way I have the code, its won't stop as it trying to go one higher than the maximum value of the progress bar and not stopping when it gets to maximum value. I just was not sure where to put the timer stop code so that the timer would stop when progress bar gets to its maximum value, I think this way it will stop when it gets one over its maximum value, which it can't do.
In a combobox when it's dropped down you can let the list scroll down by moving the mouse below the combo box. The problem is that this moves much too fast when the combo box is populated by a large number of items.
There is no property or method to do slow down the scrolling.
How many is "a large number of items"?? Putting a large number of items into a Combo is not a good idea. It makes finding items difficult for the user. Try limiting the number of items with filtering first.
A large number of items is a couple of hundred, eg the items for sale in a company
Yikes - talk about a nightmare to navigate through. This is where the customer has no idea what they're doing. He'll be screaming when he has a thousand items to sell and it takes too long to find each one to fill out an order.
Filtering by category is definitely the way to go. Though, you could still give the option to remove the filters and let him destroy the usability of his UI anyway.
Yes, I was going to suggest that. A dropedit combo with autocomplete would be the correct WPF/WinForms solution, in my opinion, and you can emulate that quite well on the web too (like the Gmail address picker).
Dropedit combo = combo you can also type into. In WinForms I think it is the default? (DropDownStyle = DropDown.) I don't believe there is an autocompleting one in the framework, but it's simple enough to catch TextChanged and update the list.