|
You're looking at it in the wrong way. The normal approach is to have the main thread do all the GUI stuff, and delegate all long-winding computations (including Thread.Sleep) to other threads. That is the way to keep your app responsive no matter what.
|
|
|
|
|
That idea crossed my mind once and I will probably end up doing it, but still, any unexpected window lag will still result in mouse being frozen which is very very bad.
For the sake of learning, I'm still interested in how to achieve my first suggestion.
Is there any other way to make sure there is no risk of unresponsive mouse when hooking it?
|
|
|
|
|
There is an old application developed in Vista with icon for application and main form. However in windows 7 that icon is not displayed when the application is in task bar.
Чесноков
|
|
|
|
|
I'd expect the form-icon on the taskbar. Can you give us some more clues? Is there no icon at all, or are you seeing some kind of default-icon? What version of Weven are you running?
I are Troll
|
|
|
|
|
The default icon is in there, as though no icon was attached to application.
Though in a ALT+TAB windows switch dialog the icon is correct.
Windows 7 home premium.
Чесноков
|
|
|
|
|
Chesnokov Yuriy wrote: Though in a ALT+TAB windows switch dialog the icon is correct.
That's the application's icon. Sounds like your form doesn't have a custom icon, or it might not have loaded correctly.
How about creating a test-application? A small app that displays a form. Assign an icon (to the form!), compile it, and try it on Weven HP.
I are Troll
|
|
|
|
|
I need to enable that old VS2008 created application and converted to VS2010 to work in windows 7.
Any new application is displaying its icon correctly by all means
Чесноков
|
|
|
|
|
In the original app, is the icon set over the designer, or is it assigned from code?
I are Troll
|
|
|
|
|
from designer, project properties, application icon
Чесноков
|
|
|
|
|
That would only change the applications' icon. The form has it's own icon, and that's what's being displayed in the taskbar.
If it's not set, the default icon will appear.
I are Troll
|
|
|
|
|
The icon was also set in the Form->Icon property. I reassigned it again however and it appeared then.
Чесноков
|
|
|
|
|
Hi,
I'm doing a course of C#/ASP.
Getting my head around c# syntax is relatively straight forward
But the framework is set up with a namespace + class for every eventuality.
Once you know the class, then there are a set of static and dynamic methods that you use to do whatever you want to do.
How do most people get their heads around it. Is it about frequent use ? Clever spreadsheets or summary books?
All thoughts appreciated ?
Thanks
|
|
|
|
|
No. Just Google. Look for: MSDN classname.
Most often the first hit is the MSDN documentation page on the class you want, and it lists the namespace, as well as the DLL you need to reference.
|
|
|
|
|
Object Browser. If there is something you expect exists but you don't know the name of it, add some references to the most likely System assemblies and just use the object browser. That way you also see a lot of other classes along the way which may stick in your memory for the next time.
|
|
|
|
|
Seriously, I just search on the internet for the namespace of the class I am working with.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Smon the Vidd wrote: How do most people get their heads around it.
They don't. One doesn't learn "all the classes" in the framework by heart. Not only would it be a lot, it wouldn't be efficient.
Learn the basics and research specific tasks that you want to implement. Whether it's writing a file, or manipulating a stream, you'd guess that you'd need something from the IO namespace. If you didn't, you'd find it with a quick Google, or on MSDN.
Then you'd need to be able to translate that documentation to the context of your code. That's why you'd need to learn the basics.
Smon the Vidd wrote: Is it about frequent use ? Clever spreadsheets or summary books?
By doing, and hanging around on this site
I are Troll
|
|
|
|
|
for C# express visual studio 2008
i have SQL server local database and
i want connect this database to my windows control..
like textbox , combobox , listbox etc..
i want perform following operation like
insert , update, delete,
movefirst, movelast, moveprevious, movlast
please explain how can i do step by step...
from creating database to distribute
give me sample
thanks ...
jignesh
|
|
|
|
|
I think you're better of googling for a tutorial or on article on this matter than asking about it here.
|
|
|
|
|
Keep the data access methods away from the GUI.
|
|
|
|
|
PLEASE HELP,
All of the sudden, EVERY control on my winform has gone.
All of the files and source code are still there for all controls, and the program compiles and runs, but every single control, other than the menu bar have gone.
I have tried to reseach on the net, but I cant seem to find out what is going on.
Please does anyone know what I may have done.
Thank you
Steve
|
|
|
|
|
stephen.darling wrote: Please does anyone know what I may have done.
No. I trust you're capable of unthinkable things.
Here is a suggestion (after you have made a backup just in case):
- open your main (or only?) Form in Visual Designer
- click the Form
- watch for the Properties pane, it should now show the properties of that Form
- on top of it is a ComboBox listing all the Controls (and Components) that sit on that Form; pick one, say a pretty large one, maybe ECGdisplay
- now the Properties pane shows its properties, which you can edit by clicking and typing all inside the properties pane.
- check the Visible property, check the Size property, check the Location property
- if that doesn't help, check you didn't accidentally cover up everything with a huge object, say a Panel: click somewhere and watch what the ComboBox now shows.
Happy hunting!
BTW: when a reply is pretty good/pretty bad, it wouldn't hurt if you voted it up/down. That is how people get their reputation updated after all.
|
|
|
|
|
Hi Luc,
Well that didnt help (God only knows what Iv managed to do )
Thank you anyway, and as for the voting, forgive me, I didnt realise.
Ill do that from now on.
Thank you
Steve
|
|
|
|
|
stephen.darling wrote: that didnt help
That is not very informative.
Are the controls still listed in the ComboBox? if so, it must be some minor detail.
If not, all may be lost indeed. Unless you have more than one Form (maybe accidentally) and are looking at the wrong one.
You could close VS and restart it.
Or even close VS and reboot.
If it was a bug in VS, that would probably solve it.
It it was you doing something very wrong, that would most certainly further reduce your chances.
|
|
|
|
|
I have restarted VS, all is the same.
I have only one main form, with 2 picturebox controls, a tab control, main menu bar, status bar, and my ecg display.
The main menu and status bar are still there.
All the code appears to be unchanges, and the program compiles without any errors.
All of the controls are listed in the form.resx.cs file, and I tried to add this.addcontroll code manualy like was sugested after searching on the net but this just raised may errors so I deleted the lines.
This has me realy baffled, it happened suddenly and I had not placed any control or code, I simply ran the program.
Steve
|
|
|
|
|
If you're in Belgium right now, you get up real early man...
V.
|
|
|
|