|
Hi,
i created windows form .when i try to move any other application over my form like a calc form the cpu utilisation moves to 100%. why is this happening? and how i can eliminate that?
Regards,
Nags.
bgfhrtydgfdhfghhdf
|
|
|
|
|
What's in the form?
Standards are great! Everybody should have one!
|
|
|
|
|
Without knowing what your form was doing, there's not a lot of help that I can give. Saying that however, the first thought that came to my head was that you are possibly doing a lot of repainting in your form being triggered from the Paint event.
|
|
|
|
|
Hi,
I have created two different satellite assemblies corresponding to two languages specific resource files -english and french.I am calling these assemblies on the basis of the language selected from the combobox and changing the label text.Please refer to the code below:-
private void comboBox1_SelectedValueChanged(object sender, EventArgs e)
{
try
{
ResourceManager rm = null;
if (comboBox1.Text == "English")
{
rm = new ResourceManager("Satellite.en-US", Assembly.GetExecutingAssembly());
label1.Text = rm.GetString("String1");
}
else if (comboBox1.Text == "French")
{
rm = new ResourceManager("Satellite.fr-FR", Assembly.GetExecutingAssembly());
label1.Text = rm.GetString("String1");
}
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
}
}
The above code works fine and the label text is getting changed according the language selected.But I don't want to do this: rm = new ResourceManager("Satellite.en-US", Assembly.GetExecutingAssembly());
I want, .NET to detect the current culture of the system and refer the required dll.If the current culture is french then .NET should refer the french dll automatically.Is there any way to do this task.Actually in future if any new language is added then there is no need to add anything in the code.
|
|
|
|
|
You can to that.
<br />
ResourceManager rm = new ResourceManager(<br />
"Satellite"+System.Globalization.CultureInfo.CurrentCulture.Name,<br />
Assembly.GetExecutingAssembly()<br />
);<br />
Nassos
GanDad
|
|
|
|
|
Thanks for your reply.Now i need to assigned ResourceManager instance only once.
modified on Wednesday, December 05, 2007 5:26:42 AM
|
|
|
|
|
Going little ahead with the same topic(Satellite assembly),i have to upgrade my code.
I have initialize resource manager as:-
ResourceManager rm = new ResourceManager("Satellite." + System.Globalization.CultureInfo.CurrentCulture.Name, Assembly.GetExecutingAssembly());
From the above code the application automatically detects the current culture of the system.Depending on the current culture I am setting the labels text on a form like this:-
private void button1_Click(object sender, EventArgs e)
{
SetText(this);
}
void SetText(Control ctl)
{
string text = rm.GetString(ctl.Name);
if (text != null)
ctl.Text = text;
foreach (Control ctl1 in ctl.Controls)
{
SetText(ctl1);
}
}
I am trying to find out a way by which my application set the Labels text itself when ever the system language changes. I mean i want to get rid of SetText() method written above.Is there any way by which I don't have to write any method like SetText() for setting all my controls text.If you have any idea then please let me know.
Thanks.
|
|
|
|
|
I have a customized propertygrid derived from base propertygrid. Dropdown properties are populated using the following code -
objPropertyView.Item.Add(objProperty.Label, _strDefault, _bIsEdit, objProperty.Category, objProperty.Help, true, objProperty.Id, ControlConstants.CONTROL);
objPropertyView.Item[objPropertyView.Item.Count - 1].ValueMember = objTable.Columns[ControlConstants.VALUE].ToString();
objPropertyView.Item[objPropertyView.Item.Count - 1].DisplayMember = objTable.Columns[ControlConstants.TEXT].ToString();
objPropertyView.Item[objPropertyView.Item.Count - 1].Datasource = objTable;
Now when i press Down key using keyboard for that dropdown ,i am unable to get the next item. Keypress/KeyDown/KeyUp events nor mouse events are raising. How can i move to the next item in dropdown using down /up arrow of keyboard.
Any help please..
|
|
|
|
|
how to run client/server program in c#.net using windows application
plz send any link or coding
|
|
|
|
|
You have posted the same question several times before. I gave you a link, and several hints. I told you to look into MSDN at the Socket class...you have examples there. There were others that gave you hints and code to get started. If you cannot even start a project with all the help you got, then, as Pete said you should try a career review before it's not too late.
I will use Google before asking dumb questions
|
|
|
|
|
Here[^] you go. Glad to be of service.
|
|
|
|
|
Nice one...5 from me
I will use Google before asking dumb questions
|
|
|
|
|
Pete O`Hanlon wrote: Glad to be of service.
Too good. One more '5' vote.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Cruel and unusual. I love it!
|
|
|
|
|
Sharing your network? When they get flooded with CP questions, to whom will you outsource?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
My math teacher in high school used to taunt "burger flippers".
The class average was 53%.
|
|
|
|
|
hi there,
i want to print a picture but i want to make it 50% transparent,
any idea how?
Becoming Programmer...
|
|
|
|
|
This[^] article has some handy hints on transparency.
|
|
|
|
|
amazing!!, this article is amazing...!! where was it!!! XD
thanks Pete O'Hanlon
Becoming Programmer...
|
|
|
|
|
Thanks for answering my previous thread friends.by the way let me explain the problem clearly.
I have an aspx file in which the background is image and i want to include a label on that image background in which i want to get the values in that label from the database.when i export this aspx file to pdf the image background gets lost and iam getting only the label which i incuded newly.i want to export it completely into pdf without any data lost,and i want to implement that in coding(c#) for the betterment.the one way came into my mind is that the aspx file is converted into image file and then exported as pdf format.is that possible through c# coding.explain me if there is any other ways to implement it.
pintoo
|
|
|
|
|
Please don't cross post. It's rude and it makes it difficult for people to collaborate on a solution.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
How can I run following command through c#?
RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\PROFES~1\RunTime\10\00\Intel32\Ctor.dll,LaunchSetup "C:\Program Files\InstallShield Installation Information\{F0A37341-D692-11D4-A984-009027EC0A9C}\SETUP.exe" -l0x9 -removeonly
Chaos, panic and disorder - my work here is done.
|
|
|
|
|
Process.Start(@"RunDll32 C:\PROGRA~1\COMMON~1\INSTAL~1\PROFES~1\RunTime\10\00\Intel32\Ctor.dll,LaunchSetup \"C:\Program Files\InstallShield Installation Information\{F0A37341-D692-11D4-A984-009027EC0A9C}\SETUP.exe\" -l0x9 -removeonly");
Hope it helps.
I will use Google before asking dumb questions
|
|
|
|
|
Hi
I have 2 forms in my C# windows application. I type a value in a textbox in form1 and want to populate the results in a datagridview in form2 but its not getting populated. In form2 i have a datagridview and text boxes whose values are binded from db.
Thanx
csanda
|
|
|
|
|
What is the question here?
I will use Google before asking dumb questions
|
|
|
|