|
You don't want to set the language to french, english, chinese via a menu option or something?
|
|
|
|
|
No..i do want to set the language using a combobox. See when i select a language from a combobox from my application, i have to change the application UI language also(i have idea how to do that using ResourceManager and Satellite assemblies)but along with that i also want to change the OS language also.
|
|
|
|
|
Jyoti.Patil wrote: along with that i also want to change the OS language also.
Ok that is much clearer, but unfortunately I can't help you there...
|
|
|
|
|
Hello all,
Finally i got the answer for my question after a lot of R & D.
To change the language of the WinCE device user just has to change the two keys in the device registry.
RegistryKey regKey = Registry.CurrentUser.OpenSubKey("MUI", true);
if (regKey != null)
{
regKey.SetValue("CurLang", 1031); // 1031 is for German
regKey.Flush();
regKey.Close();
}
regKey = Registry.LocalMachine.OpenSubKey(@"nls\overrides", true);
if(regKey != null)
{
regKey.SetValue("LCID", 1031);
regKey.Flush();
regKey.Close();
}
and then add the code to restart the device. Without restarting the language change will not get reflected.
Thanks.
|
|
|
|
|
cool thanks for the info !
|
|
|
|
|
Hello. I need to create a service the will simply log all of the downloads that are perfromed with the built in IE downloader. I have no idea where to start though. Please adwise if possible. Thank you.
Assume that I know C#, VS, .NET.
Max V. Pavlov
|
|
|
|
|
I'm searching for technology, that enables to define GUI in text file (xml, properties or sth). The definition will be read at runtime, and GUI will be generated and shown. Changes in definition file will affect on program appearance (for example: adding new field in form definition in file - will affect in form appearance after next application start - without recompilation of all application
Can anyone help me ?
|
|
|
|
|
|
|
Hi All,
I make the reports in my program using crystal report, I design it using the stored procedure the problem is in the procedure which have if condition or execute statement the fields does not appear in the design of the crystal report.
merwa
|
|
|
|
|
I have an application. it has two forms. first form - mainForm is big and some images are loading into mainForm. second form - loginForm should be showed while mainForm is invisible is loading.
loginForm has a label that has "Loading...".
all is working but this label on the loginForm is not visible few seconds and I guess apllication is not response, but then all is ok. label is visible and formLogin to. after loading of maiForm is complete , loginForm should be hide..
can I fix waiting of showing of the label on the formLogin? is there somethig like "Application.ProcessMessagess" in Delphi?
thanx!
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Application.DoEvents.
Getting your init to happen on another thread, is even better.
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 )
|
|
|
|
|
Thanx!
I tryed - but it doesnt work
it is my loginForm
public partial class frmLoading : Form
{
private int pointCount = 0;
private int iterationsCount = 0;
public frmLoading()
{
InitializeComponent();
}
private void frmLoading_Load(object sender, EventArgs e)
{
Application.DoEvents();
}
private void frmLoading_Shown(object sender, EventArgs e)
{
Application.DoEvents();
tmrProcess.Enabled = true;
}
private void tmrProcess_Tick(object sender, EventArgs e)
{
Application.DoEvents();
if (iterationsCount <= 2)
{
if (pointCount <= 10)
{
lblLoadingText.Text += ".";
pointCount++;
tmrProcess.Enabled = true;
}
else
{
lblLoadingText.Text = "Loading";
iterationsCount++;
pointCount = 0;
}
}
}
}
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Hello,
tradakad wrote: private void tmrProcess_Tick(object sender, EventArgs e)
{
Application.DoEvents();
if (iterationsCount <= 2)
{
if (pointCount <= 10)
{
lblLoadingText.Text += ".";
pointCount++;
tmrProcess.Enabled = true;
}
else
{
lblLoadingText.Text = "Loading";
iterationsCount++;
pointCount = 0;
}
}
}
You should call the DoEvents at the end of the code!
tradakad wrote: private void frmLoading_Shown(object sender, EventArgs e)
{
Application.DoEvents();
tradakad wrote: private void frmLoading_Load(object sender, EventArgs e)
{
Application.DoEvents();
}
I don't think that this is neccessary!
Apart from that, you are using the Forms.Timer which is running in the GUI Thread.
So the Timer is influenced from the action in you thread and might be throwing the Tick event not as expected (delayed)!
You could use a System.Threading or System.Timers Timer, which are running in an own thread.
Therefore you would have to invoke the Form if you want to change the Text, from the elapsed event for example!
All the best,
Martin
|
|
|
|
|
I tryed this.
private int pointCount = 0;
private int iterationsCount = 0;
public System.Timers.Timer tmrLoading = new System.Timers.Timer();
public frmLoading()
{
InitializeComponent();
}
private void frmLoading_Load(object sender, EventArgs e)
{
tmrLoading.Interval = 100;
}
private void frmLoading_Shown(object sender, EventArgs e)
{
tmrLoading.Start();
tmrLoading.Elapsed +=new System.Timers.ElapsedEventHandler(tmrLoading_Elapsed);
}
void tmrLoading_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
Application.DoEvents();
if (iterationsCount <= 2)
{
if (pointCount <= 10)
{
this.lblLoadingText.Text += ".";
pointCount++;
tmrLoading.Start();
}
else
{
this.lblLoadingText.Text = "Loading";
iterationsCount++;
pointCount = 0;
}
}
//throw new Exception("The method or operation is not implemented.");
}
but i had an error in this row
- this.lblLoadingText.Text += ".";
"Cross-thread operation not valid: Control 'lblLoadingText' accessed from a thread other than the thread it was created on"
what i do incorrect?
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Like I said, you have to invoke the method.
Invoke() is a member of control.
this.Invoke ... when this is your Form
All the best,
Martin
|
|
|
|
|
Hello,
I would add a method which sets the Text, and check there if Invoke is required.
private delegate void SetLoadingTextDelegate(string actText, bool append);
privat void SetLoadingText(string actText, bool append)
{
if(InvokeRequired)
{
Invoke(new SetLoadingTextDelegate(EnableTimer), new object[] {actText, append});
return;
}
if(append)
{
this.lblLoadingText.Text += actText;
}
else
{
this.lblLoadingText.Text = actText;
}
}
void tmrLoading_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
if (iterationsCount <= 2)
{
if (pointCount <= 10)
{
SetLoadingText(".", true);
pointCount++;
tmrLoading.Start();
}
else
{
SetLoadingText("Loading", false);
iterationsCount++;
pointCount = 0;
}
}
Application.DoEvents();
}
Hope it helps!
All the best,
Martin
|
|
|
|
|
aha.. i tryed to use property but not method...
ok. i'll it to. thanx!
but why thys code dont work?
public partial class frmLoading : Form
{
private int pointCount = 0;
// private int iterationsCount = 0;
private System.Timers.Timer tmrLoad = new System.Timers.Timer();
public frmLoading()
{
InitializeComponent();
}
private void frmLoading_Shown(object sender, EventArgs e)
{
tmrLoad.Interval = 1000;
ChangeLabelText();
}
private void ChangeLabelText()
{
for (; ; )
{
if (pointCount <= 10)
{
lblLoadingText.Text += ".";
tmrLoad.Start();
pointCount++;
Application.DoEvents();
}
else
{
lblLoadingText.Text = "Loading";
iterationsCount++;
pointCount = 0;
}
}
}
}
main form --------------------
private void frmMain_Load(object sender, EventArgs e)
{
this.Visible = false;
}
private void frmMain_Shown(object sender, EventArgs e)
{
frm.Visible = true;
LoadSettings();
LoadImages();
LoadControlsPositions();
frm.Dispose();
this.Visible = true;
}
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Sorry, I have no idea what you try to do here!
What is the timer doing here? You haven't added a eventhandler forthe timer.
All the best,
Martin
|
|
|
|
|
ok. timer can go to hell
I want that main form is invisible while images are loading. so I do this:
private void frmMain_Load(object sender, EventArgs e)
{
this.Visible = false;
}
right?
and after images are loading - form must be showed. so
private void frmMain_Shown(object sender, EventArgs e)
{
LoadSettings();
LoadImages();
LoadControlsPositions();
this.Visible = true;
}
right?
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Like Christian said at the beginning, you should use "Application.DoEvents();".
private void frmMain_Load(object sender, EventArgs e)
{
this.Visible = false;
Application.DoEvents();
}
tradakad wrote: private void frmMain_Shown(object sender, EventArgs e)
{
LoadSettings();
LoadImages();
LoadControlsPositions();
this.Visible = true;
}
Again, DoEvents. But which event are you connected too?
All the best,
Martin
|
|
|
|
|
Martin# wrote: Again, DoEvents. But which event are you connected too?
while main from is hiding - i show loadingForm
private void frmMain_Shown(object sender, EventArgs e)
{
frm.Visible = true;
Application.DoEvents();
LoadSettings();
LoadImages();
LoadControlsPositions();
frm.Dispose();
this.Visible = true;
}
and if dont write Application.DoEvents(); label ot the loading form is not visible
when LoadControlsPositions(); is complete - i kill frm and show the main form again..
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
I see.. sorry. I had to do this
private void frmMain_Load(object sender, EventArgs e)
{
this.Visible = false;
frm.Visible = true;
Application.DoEvents();
}
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
hello i want edit row in datagrid so after clicking edit button update and cancel linkbuttons is coming what i want is after clicking update linkbutton data is not updating .
iam using vs.net2003 and asp.net 1.1
iam sending code please see and give me idea
<pre>
private void DataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
String connection = "uid=sa; password=sa123; database=usermanagement; server=c113";
SqlConnection con= new SqlConnection (connection);
//SqlCommand cmd=new SqlCommand ("select * from tbl_user_management
SqlDataAdapter da=new SqlDataAdapter ("select * from tbl_user_management",con);
con.Open ();
DataSet ds=new DataSet ();
da .Update(ds);
DataGrid1.EditItemIndex = -1;
DataGrid1.DataBind ();
}
</pre>
srinivas
sri
|
|
|
|
|
The following line of code:
this.lblImportFile.Font = new System.Drawing.Font("Tahoma", 8.25F);
is throwing the following exception:
{"Exception has been thrown by the target of an invocation." }
and I have no idea why. does anybody have any ideas?
|
|
|
|