|
Hard to say what is actually causing the owned forms to go behind the owner one. You could try handle the Deactivate event of one of your owned forms and see what the call stack looks like.
SkyWalker
|
|
|
|
|
hi,
i tried to handle activate, deactivate, set focus, focus lost, position changed (as much as possible without entering a infinte loop). no efect. the callstack, and also the messages seen with windows spy, looks ok. it is something ouside my code, most likely soemwhere deep in .net framework...
thank you,
calin
|
|
|
|
|
Hey
I need to detect when the content of the screen has changed i.e. a window has been opened or a tooltip pops up or basically any change from one snapshot of a screen to the next. The first way I have considered doing this is periodically taking a screen shot in code and then comparing the bitmaps for differences but this could lead to missing screen changes if my interval of snapshots is too large.
However this is inneficient and possibly very slow. Does any one know if there is some sort of OS event I can request notify me if the screen content changes and better yet which area of the screen has changed?
Although this is in the C# section pointers to any C++ resources would also be very helpful.
Thanks
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|
|
|
Hey
Thanks for your help , that looks like a step in the right direction. The other method I have found just incase somebody is interested is here:
http://msdn.microsoft.com/en-us/library/ms644991(VS.85).aspx[^]
Sorry for the none .NET post but it looks like this method could be of help to anyone looking to do something similar to what I want.
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|
|
Glad to help you
|
|
|
|
|
Hi,
I need to make a trend graph(dynamic datas) in my c# dotnet application. Could anyone help me.
|
|
|
|
|
Take a look at this article[^].
It's a great free charting library.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi All,
I have a CSV file with two Columns, the first Column has quotes and in between those quotes there is a comma, how do I make my application not read the comma in between the quotes but read the second data in the second column?
Please can you assist me please!!
Regards,
Ndeza
|
|
|
|
|
|
|
I want to retrieve all data members names (fields names) for my custom class and put those names in a list of strings. Is this possible?
Any example with source code would be highly appreciated!
Regards, matixsc.
|
|
|
|
|
|
Thank you Giorgi, but, could you be more specific and give me an example?
|
|
|
|
|
I gave you a link to documentation. Did you have a look at it? There is an example.
|
|
|
|
|
Hi Giorgy,
The link you gave me is about registry (Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^]),as far as I can figure it out.
Sorry, but I can't see the answer to my question in this article.
I'll give you more details about my question.
Suppose I have a class Person:
class Person
{
string FirstName;
string LastName;
int Age;
...Some methods
}
All I want is to get those fields names (FirstName, LastName and Age) and put them in a list of strings.
Also, if it's possible to get default values for those fields that would be great(to me) to know too!
Best Regards, matixsc
<div class="ForumMod">modified on Tuesday, November 4, 2008 7:07 AM</div>
|
|
|
|
|
matixsc wrote: The link you gave me is about registry (Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^]),as far as I can figure it out.
Sorry, but I can't see the answer to my question in this article.
That's the link in his signature, click the link ABOVE his signature.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thank you everyone! I think this should help.
|
|
|
|
|
I have a string containing Chinese character (double byte), how can I tell if this string are in Chinese characters?
S Wong
|
|
|
|
|
Strings are always in Unicode, so you will have to probably get the UnicodeCategory for each character, and check that.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Thanks for the hint, leppie
I used the following code to solve the problem as my string is either
in English or Chinese only:
string cde = "some double byte characters";
char ch = cde[0];
UnicodeCategory cat = char.GetUnicodeCategory(ch);
if (cat ==UnicodeCategory.OtherLetter)
// Chinese character logic
else
// English character logic
S Wong
|
|
|
|
|
Hi.
I get this error in the name of the tiopic.
Details JIT debugger:
System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at Studenti_Ure.frmUrce.button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\milos\My Documents\Visual Studio 2008\Projects\Studenti-Ure\Studenti-Ure\Form1.cs:line 147
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I have a .mdb access database with two tables ("ure" and "uporabniki).
The code in C# looks like this:
string strSQL = "INSERT INTO ure(username,mesec,dan,ure,minute,komentar) VALUES('{0}', '{1}', '{2}', '{3}', '{4}', '{5}')";
strSQL = string.Format(strSQL, login.uporabnik, dateStart.Value.Month.ToString(), dateStart.Value.Day.ToString(), cas.Hours.ToString(), cas.Minutes.ToString(), textBox1.Text);
OleDbConnection povezava = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\users1.mdb");
povezava.Open();
OleDbCommand cmd = new OleDbCommand(strSQL, povezava);
cmd.ExecuteNonQuery();
MessageBox.Show("Uspesno potrjene ure!");
povezava.Close();
- login.uporabnik is a string from another form.
- as you can see ive tried without {} and the result is the same
- is there a problem with sql code? tried with diffrent space positions and stuff?
Anyway... i just want to add some data in almost all the columns. Im a newbie with working with DB in C# so i turn to you - the experts.
Thanks for your answers infront.
Matjaž
Força Barça!
|
|
|
|
|
You insert command will break if any of the values you are inserting contains ' (or any other character that needs to be escaped). It is always better to use parametrized queries instead of string concentration because:
1. You will prevent program from sql injection attacks. SQL Injection Attacks and Some Tips on How to Prevent Them[^]
2. You will avoid issues with special characters that need escaping.
3. Performance will increase.
And the code will be easier to read and understand.
|
|
|
|
|
Hi Giorgi,
His connection string is @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\users1.mdb" , this @ symbol points his Data Source to C:\\users1.mdb , can this causes any exception? Because the correct path is C:\users1.mdb
When you're alone in the Dark, Fear will protect you...
|
|
|
|
|
I am not sure about that as he has no problem opening connection. But he does have problems with update statement.
|
|
|
|