|
Hi,
if you get cross-thread exceptions, something is wrong in your app.
Going back to 1.x or setting CheckCrossThread=false are two ways to
hide the symptoms, they dont cure the disease.
The cross-thread exceptions 2.0 and later are given are extra symptoms
to make you aware there is a disease which you should fix.
the right way is with Control.InvokeRequired and Control.Invoke;
yuou normally have two choices:
- make the delegate and the else part point to the same method;
- make the delegate point to the method it is in (this is kind of a
recursive call, but the second time around InvokeRequired will be false
hence the else part will execute).
|
|
|
|
|
Hi thanks for the reply,but the problem i am facing is that i was initially working with windows application ,now i want same method to implemented in webservice .but in webservice i am not getting invoke properties..Hope u understand my problem.Since i am not getting the invoke properties, i am not able to check that condition..
Any way to play with it.
Regards
DilipRam
|
|
|
|
|
Hello experts,
I'm applying some finishing touches to one of my applications.
The exe's icon was selected via the project's properties, on the "Application" section, where it says "Icon:".
Now, if I would create a shortcut to some file, and attempt to change its icon, pointing the icon selection dialog to my exe, the dialog would display the program's icon.
Same goes for any other icon sucking program...
I'm guessing that the program's icon is embedded in a specific section of the exe, which later gets scanned by the icon selection dialog.
How can I embed icons to the exe so they would also be in the same section?
Thanks in advance,
Shy.
|
|
|
|
|
Take a look at the last entry in this[^] discussion.
|
|
|
|
|
Thanks, but it did not work for me...
However, I've found my own solution.
After compiling the exe file, you open it in VS, either by selecting it via File > Open > File, or by clicking the small "Show all files" icon on the top of the solution explorer, navigating (still in the solution explorer) to the exe file, and double clicking it.
In the new opened tab it is possible to import the icon into the already compiled exe.
Of course it has to be done EVERY TIME the exe is recompiled, which is quite annoying...
So I'm thinking of learning how to use Post-Build Events...
Maybe I could make VS import the icon automatically every time...
Well... I hope this post will help others achieve the same goal.
I intend to write a small article about this, and maybe combine it with another subject. Hope I'll have the time...
Regards,
Shy.
|
|
|
|
|
Ok I've found out how to do it
- File | New
- Select Native Resource Template
- Import icons etc you want
- File | Save As (make sure 32-bit resource (*.res) is selected in the File Type combo)
- Save the file somewhere
- Open up the properties pages of your Project, change the radio button by the Application icon to Resource File
- Browse & select the resource file.
- Voila!
This should probably be put into an article at some point since there's no where sensible where this is explained (that I came across)... If I've got time over the weekend I'll do it, unless you want to?
|
|
|
|
|
|
shyagam wrote: Go ahead and write the article...
Done (needed something to make me fall asleep ).
|
|
|
|
|
Hehe... Cool!
You even got the screen shots and all...
Voted 5 for the article of course!
Well... I guess that now, after solving the problem, I can start coding again and compensate for all of the day time I've lost.
Another sleepless night...
Regards,
Shy.
|
|
|
|
|
shyagam wrote: Voted 5 for the article of course!
Thank you
shyagam wrote: You even got the screen shots and all...
Well I had to pad out the article...
|
|
|
|
|
can sum1 kindly lemme know how shouldi make a snooker game in C#??
all kinda tips and tricks..
do share plz..
i need them for my project
waiting anxiously
umair
|
|
|
|
|
First step - learn C#
Second step - learn DirectX ( probably )
Third step - learn some physics
Fourth step - write the code
Your question is far too broad, all you can hope to get are broad answers. You'd do better to tell us what you do know, what you're looking to learn about, etc. Even then, really, the best way to get help is to write some code, and ask questions about specific issues.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
And cut down the textspeak, too
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Oh, that goes without saying.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am curious to see if people that textspeak alot on these forums are at a computer or posting messages through a pda...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I suspect at a PC, but just used to communicating that way.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It could be just a force of habit kind of thing.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I think it's two things:
1 - force of habit, as you say
2 - young people have always found new ways to express themselves, so that us old folks can't understand them.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: us old folks can't understand them
Yep. Us old guys who talk about Twisted Sister and when I Wanna Rock was out on video :->
Christian Graus wrote: young people have always found new ways to express themselves
Our way of expressing ourselves to them is a simple or
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I think most of them are not english-natives, and use/used IRC too much.
|
|
|
|
|
Those are also possibilities.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Zoltan Balazs wrote: and use/used IRC too much.
anyone talking like that would be driven off by the natives where I hang out in IRC.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
Christian Graus wrote: 2 - young people have always found new ways to express themselves, so that us old folks can't understand them.
Which is ofc stupid when they need adult assistance. OTOH I can believe it readily enough remembering how much trouble I had getting through to my brother that even if his friends all emailed back and forth in smsspeak (which was doubly sad since he didn't have a cell at the time) without capitals or punctuation it's not an acceptable style to use if trying to get advice from a college prof on a science fair project. I (think I) finally did get through to him and he's generally used something resembling English when emailing me since but getting past 'all my friends do it this way' was maddening.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
well.. i know hell more bout C#
probably not bout directx and i dont think its needed!
i know physics..
i know i have to write code..
but i just dont know how to start.. where to start from?
how to move out images? i mean.. all dat crap!!
|
|
|
|
|
Hi Chumairr
You hell know more about C# , so we won't get any more programming posts. But, if you want tricks and tips about writing pool / snooker software - this is a good site to start with.
Good luck!!
http://www3.sympatico.ca/eric.perreault/tipshtml.html[^]
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|