|
Endien wrote: 3 key point here to solve the problem
No, the key points are to keep the GUI/main thread free, never to block it, and to hire as many other team players as you need, no more, no less.
The exact type of your additional team player is of minor importance. BackgroundWorker is slightly harder to set up, but offers advantages for reporting progress, completion, and exceptions.
|
|
|
|
|
Hello...
How can I get the Length of a column of an sql table from my C# code....
In my application I am using databound controls. I want to know the length of the field in UI.
any help would be appreciated...
Thanks
Sebastian
|
|
|
|
|
|
See this[^] recent thread.
|
|
|
|
|
|
When I install the Code Project search toolbar, its background color is the default color for the Windows os it's running in -- that is, gray for XP, blue for Vista. I have made my own toolbar with a toolstrip in a Band Object, and everything works fine, except that I cannot get the background color to be the default. I can make a bitmap for the background, but if someone changes their theme my toolbar will then be the wrong color.
Susan
|
|
|
|
|
System.Drawing.SystemColors.WindowFrame Maybe ?
SystemColors Members[^]
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
I tried WindowFrame, and a whole bunch of others, none of which look like the color of the toolbars in Vista, which is my development operating system.
|
|
|
|
|
Well i'm out of ideas ..... Is it just the transparency of the toolbar that is making the colours differant? or is the colour just way off?
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
The color is way off -- but I'm not sure I understand what you mean by the transparency of the toolbar.
|
|
|
|
|
Well on Vista & 7 the toolbars have a slight transparency to them (Areo) which could mess with the colour.
Just a thought, have you tried enabling themes. I can't remeber where but I recal that being an issue with something I was working on awhile ago. I can't remember the object or actual property but I do remeber it was a problem. Might not help ... but you never know.
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
Thanks for the tip. I did some research and found the "Application.EnableVisualStyles" method. I called it from the constructor of my toolbar, and after I called it I displayed "Application.RenderWithVisualStyles", the value of which was true. However, my toolbar and its controls are still gray. Do you know how I should be setting the background color to work with EnableVisualStyles?
Susan
|
|
|
|
|
Now I have the controls painting in default Vista style, but the toolstrip itself is not.
|
|
|
|
|
I want to know what's the best way to make a windows form application in C# to connect people for online meeting? and what are tools available; for that?
|
|
|
|
|
The best way would be to design a client/server conferencing system that can handle duplex communication of audio, video and text, membership, authentication, and perhaps encryption. Some technologies you may want to examine are WCF, RIA services and Silverlight.
This is a non-trivial endeavour - your question is too open ended to provide a direct answer.
/ravi
|
|
|
|
|
Maybe use WebBrowser and Google Buzz?
|
|
|
|
|
I want to know how can I place the current time using analog clock on my windows form?
|
|
|
|
|
What are you talking about?
Nevertheless, there are a lot of analog clocks here on the CP. A couple of links:
Yet Another Analog Clock[^]
Analog Clock Control[^]
If you search for articles using the search word "analog clock", you will get 6 pages of links. There are A LOT - some good looking, others less good looking...
|
|
|
|
|
i was trying to do it my self
|
|
|
|
|
OK, I misunderstood. But then you ought to post a more concrete question ("My problem is this...") instead of "How do I make an analog clock control"
The answer to the last question will always be "find an article and see how it's done there", because nobody is going to write a novel containing full explanations of what you should do.
If you have a specific, broken down problem, however... That's something people can help you with.
|
|
|
|
|
Hi,
I have the following files which was working fine until last night when I went and deleted all the commented old codes to clear the file from unwanted lines but suddenly I am getting now the following many errors and I don't know where is the issue.. Please help...
This the full file:
patient_entry.cs[^]
and these are the errors:
Error 3 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 380 17 Cure
Error 4 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 383 34 Cure
Error 5 Identifier expected C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 383 91 Cure
Error 6 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 389 31 Cure
Error 7 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 393 31 Cure
Error 8 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 397 28 Cure
Error 9 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 399 52 Cure
Error 10 Identifier expected C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 400 86 Cure
Error 11 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 407 50 Cure
Error 12 Identifier expected C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 418 52 Cure
Error 13 Identifier expected C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 418 168 Cure
Error 14 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 442 17 Cure
Error 15 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 445 34 Cure
Error 16 Identifier expected C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 445 91 Cure
Error 17 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 451 31 Cure
Error 18 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 455 31 Cure
Error 19 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 459 28 Cure
Error 20 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 461 52 Cure
Error 21 Identifier expected C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 462 86 Cure
Error 22 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 469 51 Cure
Error 23 Expected class, delegate, enum, interface, or struct C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 470 51 Cure
Error 24 Identifier expected C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 481 52 Cure
Error 25 Identifier expected C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 481 169 Cure
Error 26 Type or namespace definition, or end-of-file expected C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 502 9 Cure
Error 27 Invalid expression term ':' C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 373 24 Cure
Error 28 Syntax error, '(' expected C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 373 24 Cure
Error 29 ; expected C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 373 25 Cure
Error 30 The name 'get_person' does not exist in the current context C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 325 29 Cure
Error 31 The name 'get_person' does not exist in the current context C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 337 29 Cure
Error 32 No enclosing loop out of which to break or continue C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 372 21 Cure
Error 33 Only assignment, call, increment, decrement, and new object expressions can be used as a statement C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 373 17 Cure
Error 34 No enclosing loop out of which to break or continue C:\Users\Jassim\Documents\Visual Studio 2008\Projects\Cure\Cure\patient_entry.cs 376 21 Cure
|
|
|
|
|
You forgot an opening curly brace at line 215, causing a cascade of "scopes that were closed too early"
213:
214: bahrain_smartcard_error = bahrain_smartcard_data.ReadIDCard(BahrainAPI.BahrainData.Fields.EnglishName, ref bahrain_smartcard_Name);
215: if (bahrain_smartcard_error != 0) <big>{</big> MessageBox.Show(bahrain_smartcard_error.ToString()); }
Or remove the useless closing brace at the end of that line.
|
|
|
|
|
Hi,
I'm not going to download anything.
My advice is: concentrate on the first error. It tells me you probably opened a namespace, and provided some data members or methods, while not having opened a class/struct/whatever yet.
|
|
|
|
|
Other than comments, looks like you have removed some code from the following section -
catch (Exception exp)
{
MessageBox.Show("Error updating smartcard data!!" + Environment.NewLine + exp.Message + Environment.NewLine + "Please try again or enter data manually", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
public_var.create_event("System", "Error updating smartcard data!!", exp, EventLogEntryType.Error, 1000, true);
return;
}
finally
{
if (sql_reader != null) sql_reader.Close();
if (sql_connection != null)
{
if (sql_connection.State == ConnectionState.Open)
sql_connection.Close();
}
}
lblReadSmartCard.Visible = false;
lblReadSmartCard.Refresh();
progressReadSmartCard.Visible = false;
progressReadSmartCard.Refresh();
My signature "sucks" today
|
|
|
|
|
Hey
My application uses directshow to playback videos. If a video is playing and the user minimizes and then brings the window back on screen the video disapears. Does anyone have any idea of what could be causing this?
Thanks
|
|
|
|
|