|
OK,
I think the problem you are having is caused by doing the ErrorForm stuff on a thread
that is not the main thread. When you do that on .NET 1.1 the app may hang, or the GUI
may fail to behave normally at any time; when you do that on .NET >= 2.0 you will get
an InvalidOperationException mentioning a "cross-thread-violation".
What you need to do is make sure the GUI-related code (that includes everything concerning
ErrorForm) to execute on the GUI thread; that is exactly the purpose of the
Control.InvokeRequired property and the Control.Invoke() method. I also would consider
creating the ErrorForm only once at app initialization, and populating and showing then
hiding it when appropriate (through Invoke).
As I said before, a more recent .NET version helps you in recognizing this kind of
faulty situation long before it causes trouble.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
do you think is that why the memory is not freeing up? do you think this is whats causing the whole thing? each time i go from title to title detail it increases the memory by around 5mb and even when i go back it doesn't free the memory up.
|
|
|
|
|
I don't know about your memory situation; I do know any app that violates the "every control
should only be accessed by the thread that created it" rule will behave badly, it may
freeze the GUI, hang completely, or (for a while) seem to function normally; whatever the
symptoms, it can not be trusted.
If you violate the rule, first thing to do is fix it. Everything else that remains has
to be handled thereafter.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hiii
need to know how can i disable some combination of keys using vb2005
example ctrl+shift+y while my program is running
but there is a tool i used in my program use this shortcut(ctrl+shift+y) ?????????????
thank you
|
|
|
|
|
I'm not really sure about this but try looking in to using the event of KeyPress on you form.
in C# you'd get teh event with something like this.KeyPress+=new K...
|
|
|
|
|
thank you Mr Rocky71
I did but in vain , i do not know what is the problem
thank you
|
|
|
|
|
I want to learn how to make an application like Shaderman in which we have blocks representing code and which we link together with lines. How are these block build? How are the lines being drawn? Did they use graphics 2d in C# to make the blocks and lines? Where could I find information?
|
|
|
|
|
You can get the code here[^]. Enjoy.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
You're removing all the fun now...
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Have you taken a look at what it's written in? Python - I figured that was mockery enough right there.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
OK, we're all set for another batch of jokes on rabbits, knights who say nih,
shrubberies, Castle of Anthrax, etc.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
"What is your favorite color?"
|
|
|
|
|
I'm not sure, but it aint ColorControlPaint.DarkDark(Color.White)
PS: trying to keep this a programmer's forum
-- modified at 10:21 Thursday 16th August, 2007
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
As long as it's not Spam. It can be "Ham, Jam and Spamalot."
And on that note, I say Aurevior for a week - I'll catch you all when I get back from France.
But remember:
Your father was a hamster and your mother smells of elderberries. Now go away before I taunt you some more.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi!
i am working in a project of Notepad In C# window Form.
i have an some problem:
1. when i set the property of RichtextBox ScrollBar to Forced Both then horizontal scroll bar is not visible, like in Microsoft Notepad Appear.
2 i have set the richtext box dock property to be Fill but when i write text in richtext box the text after the end of Richtextbox wdth appear in the next line, while i want to appear it one line until an enter is being press, also horizontal scroll bar not appear.
3. The staus bar panel is change the postion when i mazimize the windows, how it can be control.
help me!
sorry for bad english.
Regards
|
|
|
|
|
Hi
1+2. set RTB.WordWrap=false;
3. set status.Dock
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
3. not working, panel could not resize
|
|
|
|
|
Hi friends
I have requirement like this.
Let's assume if one form contains more than one data grid which is used to populate different data's.
To identify the grid contents we can use grid caption.
Instead of using the grid caption show the Images in top left corner of data grid.
If any one come across this requirement.
Let me know how you were succeed this requirement
charles
|
|
|
|
|
Hi friends
I have requirement like this.
Let's assume if one form contains more than one data grid which is used to populate different data's.
To identify the grid contents we can use grid caption.
Instead of using the grid caption show the Images in top left corner of data grid.
If any one come across this requirement.
Let me know how you were succeed this requirement
Thanks
Charles A
charles
|
|
|
|
|
I have a winApplication which has a form.
In that form I have a sql data adapter which contains 4 command for select,update,delete,insert.
When I execute insert command, with passing 9 parameters values, by use of executenonguery function I receive "procedure or function "procedure name" has too many argument specified" error massage at line of executing.
What should I do? I don't know what's happend there cause I check every parameters by breakpoint and saw that every parameters were passed!
|
|
|
|
|
You have asked this question already[^]
I have given you suggestions already, including to post the code so we can see it.
isiran wrote: What should I do? I don't know what's happend there cause I check every parameters by breakpoint and saw that every parameters were passed!
And I've told you already that it is obvious that every paramter is passed because the error message tells you that "too many" parameters have been passed. This suggests that you are passing more parameters than was expected.
You have to help us to help you. We can't guess what is in your code. You have to show us.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Colin Angus Mackay wrote: This suggests that you are passing more parameters than was expected.
Attempting to bribe the SQL Server?
|
|
|
|
|
the problem is simple, youre passing more arguments then ur supposed to so double chk on the number of parameters ur passing. and post the code when u have such problems
|
|
|
|
|
Can anyone please let me know what is the difference between a service with "Allow service to interact with Desktop" checkbox checked and unchecked ?
|
|
|
|
|
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1002276&SiteID=1
|
|
|
|