|
Hello sir,
I am using Treelistview C# component in my project,
It is almost finish except (cell)label edit on key press.
Below is brief of my code, I can not send code outside from my office otherwise I could have sent you same code, which I had written.
I wanted to call “begin edit” event, when keyboard key press like ‘F2’
I have tried to update override function call wndproc() of project TreeListview2002.dll
In the region key-Down “BeginEdit ”,
Checking key code is “F2” then
Wrote same thing which is already there in “Beginlabeledit region under notify region.
Get edit handle can call the same wndproc(reff mess)
But it want work, can you help me to complete this Project.
Thanks
hiren shah
|
|
|
|
|
Hello sir,
I am using Treelistview C# component in my project,
It is almost finish except (cell)label edit on key press.
Below is brief of my code, I can not send code outside from my office otherwise I could have sent you same code, which I had written.
I wanted to call “begin edit” event, when keyboard key press like ‘F2’
I have tried to update override function call wndproc() of project TreeListview2002.dll
In the region key-Down “BeginEdit ”,
Checking key code is “F2” then
Wrote same thing which is already there in “Beginlabeledit region under notify region.
Get edit handle can call the same wndproc(reff mess)
But it want work, can you help me to complete this.
Thanks
hiren shah
|
|
|
|
|
Dear All, I am using FtpWebRequest to upload my data to ftp address, i am successful in uploading my data, but what bothers me is whenever my upload fails even at last byte of data, it again starts from zero i mean from beginning.
i am looking to find out about how to provide resume feature for uploading data?
What an idea is behind resume feature? do we have standard algorithm for that?
i have dedicated server.
|
|
|
|
|
Dear All
I am Beginner the problem is that i am designing an application when i am running the application the task bar is hidden while the application is active how shall i want the application just like word or excel that when running the task bar is not hidden
Regards
Sajid Salim khan
|
|
|
|
|
I didn't get your point? Do you want to hide the application from Task Bar or what?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
A better explanation of your question will be much appreciable....
Have a Happy Coding.....
|
|
|
|
|
Hi,
How many thread can i use in a page?
eg:
i have 10-15 for loop to execute at a time. Can i able that much of thered?
What is the limit of thread in a page?
Thankyou
YPKI
|
|
|
|
|
You can use unlimited Thread in your application. It depends on what is your system configuration because
Thread takes Memory and CPU Usage.
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
The optimum thread count you should use depends on your process, it's design, but more importantly the CPU and hardware you have. Launching a thread allocates a minimum of 1MB of memory, so for your 10 to 15 threads, you just commited 10 to 15MB of RAM to your app as well. AND, on a dual core system, only 2 of those threads would be running, at most, at any point in time. Threads only give the illusion of code running faster. In the majority of cases, they don't actually make a process run faster. Keep the threads you need to a minimum.
|
|
|
|
|
hello
QUESTION 1: is it true that .NET framework will automatically enlist help from Distributed Transaction Coordinator?
<br />
try {<br />
IDbConnection oConn1 = new SqlConnection("Data Source=Server1;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;");<br />
<br />
<br />
IDbConnection oConn2 = new SqlConnection("Data Source=Server2;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;");<br />
<br />
IDbTransaction oTx1 = oConn1.BeginTransaction();<br />
IDbTransaction oTx2 = oConn2.BeginTransaction();<br />
<br />
<br />
... oConn1 db access ...<br />
... oConn2 db access ...<br />
<br />
oTx2.Commit();<br />
oTx1.Commit();<br />
} catch(Exception ex)<br />
{<br />
oTx2.Rollback();<br />
oTx1.Rollback();<br />
} finally {<br />
...<br />
}<br />
QUESTION 2: There's no "TransactionScopeOption" for IDbTransaction.BeginTransaction?! It's always TransactionScopeOption.New?
QUESTION 3. How can you join transaction without use of TransactionScope? Is there such thing as joining multiple transaction..?
<br />
IDbTransaction oTx = oConn1.BeginTransaction();<br />
oConn2.EnlistTransaction(oTx);<br />
<br />
oTx.Commit();
Thanks
dev
modified on Sunday, April 12, 2009 10:03 PM
|
|
|
|
|
This.Text1.Text = DateTime.Now()
The statement above gives error, how to correct it please?
|
|
|
|
|
Glen Villar wrote: how to correct it
That greatly depends on the error that you are getting.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
The others have answered it right, thank you.
|
|
|
|
|
This.Text1.Text = DateTime.Now().toString();
|
|
|
|
|
This
Glen Villar wrote: This.Text1.Text
expect a string input
and this
Glen Villar wrote: DateTime.Now()
return CTime
How can thise 2 be equal??
You need to convert CTime to string, using ToString.
My advise is you need to read through a basic C# book, it will definitely help you a lot.
*12Code
|
|
|
|
|
Read the documentation on DateTime.Now!
|
|
|
|
|
this.Text1.Text = DateTime.Now.ToString();
|
|
|
|
|
My app needs to maintain an awareness of whether the machine has a working internet connection.
How do I test for a good internet connection?
|
|
|
|
|
This is what I use, based on P/Invoke:
public static bool Connected() {
LP_InternetConnectionState description=0;
return InternetGetConnectedState(ref description, 0);
}
public static string ConnectionName {
get {
LP_InternetConnectionState description=0;
StringBuilder sb=new StringBuilder(512);
InternetGetConnectedStateEx(ref description, sb, sb.Capacity, 0);
return sb.ToString()+" ("+description.ToString()+")";
}
}
[DllImport("wininet.dll")]
static extern bool InternetGetConnectedState(ref LP_InternetConnectionState lpdwFlags,
int dwReserved);
[Flags]
enum LP_InternetConnectionState : int {
Configured=0x40,
LAN=0x02,
Modem=0x01,
OffLine=0x20,
Proxy=0x04,
RAS_installed=0x10
}
|
|
|
|
|
Hello all,
I'm Working on project using DiectX component.
the question is :
how to handle microphone and use it?
in another form :
What is the specific code that begins connection with microphone ?
thanks.
|
|
|
|
|
Pick up the mic with the left hand, activate the mic by turning it on, make sounds with mouth within the pickup range of the mic.
Learn to look for information yourself, I found this in abut 10 seconds CP atricle[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I know how to overload operators for my own classes. My question is whether it's possible to overload operators for built-in value types. For example, can you overload the ^ operator in such a way that:
int result = 2 ^ 3; // Sets result to a value of 8
Thanks!
|
|
|
|
|
No. You cannot modify existing classes.
You can inherit from a class and override the overloaded operator IF that option is available, but for many types that option is not available. For example, some types are sealed (meaning you can't inherit from them), don't have virtual overloaded operators (so you can't override the existing behaviour) and if it is a value type (like an int) then you can't be inherited anyway.
|
|
|
|
|
The previous advice was correct, you can't change or derive from the built in types such as Int32 . You can however provide a wrapper around them, for example:
public class MyInt32
{
private Int32 _Value;
private MyInt32(Int32 value)
{
_Value = value;
}
public static implicit operator Int32(MyInt32 value)
{
return value._Value;
}
public static implicit operator MyInt32(Int32 value)
{
return new MyInt32(value);
}
public static MyInt32 operator ^(MyInt32 valueA, MyInt32 valueB)
{
return 8;
}
} Now just make sure one of the values is an MyInt32 and your implemtation will be used
MyInt32 a = 2;
MyInt32 b = 3;
Console.WriteLine(a ^ 3);
Console.WriteLine(2 ^ b);
Console.WriteLine(a ^ b);
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hi
i have a main form which set it's IsMdiContainer to True (MDI Form), and second form which set MaximizeBox,MinimizeBox to False and wrote this code to display it in MDI form :
this.frm = new Form2();
frm.MdiParent = this;
this.frm.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.frm.MaximizeBox = false;
this.frm.MinimizeBox = false;
frm.Show();
but when i run application, the MaximizeBox and MinimizeBox already exists (even when i click on MaximizeBox, it back to normal mode!) which i don't want to user interact with it. where does my problem and how to solve it ?
Thanks
|
|
|
|