|
Screen coordinates to window coordinates: Control.PointToClient
Window coordinates to screen coordinates: Control.PointToScreen
So you need this:
<br />
windowRelativePosition = ctl.PointToClient( ctl.MousePosition );<br />
_____________________________________________________________________________
I don't expect too much, all I want is your vote for Halbsichtigkeit.
|
|
|
|
|
Just Perfect!! Thanks!
_____________________________
...and justice for all
APe
|
|
|
|
|
I want Code for Repeter Control
suresh babu.k
|
|
|
|
|
|
|
|
|
|
J4amieC wrote: Talking to yourself is the first sign of madness.
Especially if it's a dialog...
---
b { font-weight: normal; }
|
|
|
|
|
|
Hi One & All
This is Naren
I m very new to this environment.c an u give me any idea about how to create message board in c#.Reply may come in recursive with regsrding thread
Thanking u
please help me
|
|
|
|
|
Hi Naren. If by 'this environment' you mean C#, then what have you used before ? Basically I am asking what experience you have that makes you ready to write a message board in C# ? There are free message boards written in C#, in fact I think some exist as CP articles. You should perhaps look at those.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I need to send the Array from C# to ActiveX control which has the following prototype
void CSimpleAdditionAtxCtrl::VarMethod(VARIANT* VarParam)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
}
In C# i have tried with the following code it says Type Mismatch please tell me whats wrong with my following code.
string[] myIntArray = new string[5];
myIntArray[0] = "Sample";
object obj = (object) myIntArray;
objActiveX.VarMethod(ref obj);
|
|
|
|
|
fghfghfghfghfghgh
suresh babu.k
|
|
|
|
|
Hello friends
Could you plz tell me why we check for IsPostBack ?
Yogesh_T
|
|
|
|
|
To find out if the request is caused by a postback.
As that answer is so obvious, I think that you really wanted to ask why we execute different code for pages that are created from a postback and those that aren't.
The answer to this is that some server controls keep state when they are recreated after a postback. A listbox for an example has to be filled with items the first time the page is loaded, but after a postback the items will be recreated automatically. If we would add the items to the listbox every time the page is loaded, you would get duplicates od the items.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for the reply,I think last time also u replied me.
I am fresher in .NET & working on it.
wana to see your profile if you dont mind
Thank you
Yogesh_T
|
|
|
|
|
Hi guys,
How can you hardcode the combo box to accept only uppercase characters. It is possible to do this during initialization with textboxes but I can't figure out how to do it for a combo box.
Thank you
sasa
|
|
|
|
|
for this i think u have to create array of strings
which u can add to combobox items one by one
and at the time of adding these strings u can convert them in
upper case.
rahul
|
|
|
|
|
Thank you Rahul. I just figured out; it's much easier than what you suggested. All I had to do is use the ToUpper function as follows;
this.CboxUName.Text.ToUpper()
Thanks for your suggestion though.
sasa
|
|
|
|
|
Hi guys,
I am a newbie in visual C#. Quick question for you pros; how do you load data from SQL table into a Combo Box?
Thank you in advance for your help.
|
|
|
|
|
Take a look at MSDN SqlDataReader class[^].
Hope that gets you started in the right direction.
Sincerely,
Alexander Wiseman
|
|
|
|
|
its easy ..
Like This :
//DataTable that has columns named "mnStatusName" and "mnStatusID"
DataTable dt = new DataTable();
cmb.DataSource = dt;
cmb.DisplayMember = "mnStatusName";
cmb.ValueMember = "mnStatusID";
thats all
And you can use Collections like a DataTable;
i m filling all my combos from SQL tables..
mca
|
|
|
|
|
Hi guys,
Please help!
I am running this query which returns a count(), How do I store the count that way I can run the if/else statement.
Check it out:
SqlConnection conn = new SqlConnection("Data Source=(local);Initial Catalog=CBae;Integrated Security=SSPI;");
conn.Open();
SqlCommand cmd = new SqlCommand("SELECT COUNT(CBID) FROM CB", conn);
cmd.ExecuteNonQuery();
conn.Close();
if (////// >0)
MessageBox.Show(this,"Data Exists",MessageBoxButtons.OK,MessageBoxIcon.Information);
sasa
|
|
|
|
|
sasa,
Use ExecuteScalar instead of ExecuteNonQuery . The return value is the value very first "cell" of the very first row returned from the query, which, in the case of the COUNT command, is the only value returned at all.
Hope that helps!
Sincerely,
Alexander Wiseman
|
|
|
|