|
I apprehend it is "if(e.KeyCode == Keys.Enter && e.Modifiers == Keys.Control)".
But it is unsuccessful.
|
|
|
|
|
Keydown is fired twice: once for control key and once for Enter so you can't test it in one piece of code. Instead use keydown and keyup events to toggle a boolean value which shows if CTRL key is down and for enter key and this value
|
|
|
|
|
hi,
How do i insert new objects like Trackbar to the Built-In Column Types in DataGrid?
there are only the options TextBox,Button,Link and CheckBox..
|
|
|
|
|
Hello,
what do you do with your sensitive data (passwords, connection strings, and others (eg chunks of code, which shall in no case be disassembled))?
Do anybody use the EntLib 3.1 for any this purposes?
Greets
pkoeppe
|
|
|
|
|
I'm using System.Windows.Forms.MonthCalendar in my project. I allow the users to select multiple date (date range) in that calendar control.. One strange thing that I noticed is that there is one while line in the selection which looks really bad...
I would like to know how to remove this while line from selection...
Steps to reproduce this issue ~
1. Create one window application in VS 2005.
2. Place MonthCalender on the form
3. Run the application.
4. Press "Shift" key and click two dates (eg: 1st September, 2007 and 4th September, 2007)
Observe: There will be one white line within selection line...
I have tested this issue on Windows XP Professional.
How to remove this while line from selection??
Thanks in advance..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi Michael,
I followed your steps and got the same result. Also using XP Pro. It does look really bad as you said. I wish I found how to get rid of it, but not yet.
I have inherited an application that needs to get start and stop dates from users also. What the original developers did was provide two calendars, one for start date the other for end date. Probably they did this because it's in VS 2003 and the old month calendar doesn't allow selecting multiple dates. That's one option, maybe not a good one, but an option.
Another option might be a control found here on Code Project written by Patrik Bohman. We use the VS 2003 version of it in that same application I referred to earlier. There is also a version for VS 2005. Here's a link.
http://www.codeproject.com/cs/miscctrl/MonthCalendar.asp[^]
Take a look, see if it's workable for your application. Otherwise, I hope someone else has better solution for you.
BDF
|
|
|
|
|
Thanks for your reply.. BDF
I think that this whiteline might be a bug of MonthCalender control in .NET 2.0..
I will take a look the link you gave me..
Thanks again.
-- modified at 22:09 Wednesday 5th September, 2007
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
i want to disable hotkeys like ctrl ,alt, delete while my application is running and enable when application is closed. i want code in c#. Any one can guide me.
tahir
|
|
|
|
|
Do you want to disable them only for your application or for whole system? If you want to do it for the whole system, then I guess you will need to install global mouse keyboard hook. There are several good articles on codeproject that describe how to do that.
-- modified at 6:15 Wednesday 5th September, 2007
|
|
|
|
|
Giorgi Dalakishvili wrote: I guess you will need to install global mouse hook.
Why would you suggest a mouse hook? The OP wants to deal with key strokes.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->ßRÅhmmÃ<-·´¯`·.
|
|
|
|
|
Stupid mistake. It must be keyboard hook. Thanks for pointing it out.
|
|
|
|
|
You will need to install a keyboard hook for this. Start with that and ask further questions while you run into trouble.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->ßRÅhmmÃ<-·´¯`·.
|
|
|
|
|
You can't disable Ctrl-Alt-Delete. That key combination is handled at the kernel level, before your app, or any keyboard hooks, get a chance to see it and quash it.
|
|
|
|
|
Hello....
I am having following problem...
I want to know in run time which method of which class is running
ie.
class MyClass
{
public string GetName()
{
string className = ?;
string methodName = ?;
return className + methodName;
}
}
.......
Help quick.....
|
|
|
|
|
For a single threaded application:
class MyClass
{
public string GetName()
{
string className = "MyClass";
string methodName = "GetName";
return className + methodName;
}
}
:P
As a note "Help Me" isn't a good post subject ... everyone is asking for help and it wouldn't be very useful to have all subjects as "Help" would it. A much better idea would be to give a descriptive title, like "Determine currently running class and method".
|
|
|
|
|
Use this..
string cn = System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.Name;
string mn = System.Reflection.MethodBase.GetCurrentMethod().Name;
*jaans
|
|
|
|
|
i have written a program that keeps track of records in a data file and came across a small problem. writing to files for most part works fine except when i go to update entries, if the new entry is bigger than the old one it starts overwriting data ahead of the entry. if someone could give me soem advice on how i can prevent this i would very much appreciate it.
|
|
|
|
|
Text file, correct?? The only way do this is to load the entire file into memory (an array of strings works), make the changes to the in-memory copy, then write then entire file back out, overwriting what's on disk. You can even write it back out to a temporary file, then delete the original file, and rename the temp file to the original filename.
|
|
|
|
|
thats sort of what i was trying to avoid was a lot of extra work, way i once did it in c++ was i capped all my line sizes so i knew the max size i could work with but did not want this limitation in my new c# stuff, i appreciate the response and i have already thought about doing something very much like you mentioned.
|
|
|
|
|
swatgodjr wrote: way i once did it in c++ was i capped all my line sizes so i knew the max size i could work
This only works if every line is exactly the same length in the file. Then it's easy to calculate the offset and you know how much space you have left. But, if you use the default methods of writing files, then each line is not going to be the same length.
|
|
|
|
|
hi
how to save the value of a cell in row of a gridview when a click event occurs on that row.
|
|
|
|
|
may be following link help u out
http://www.codeproject.com/useritems/Drag_Drop_from_GridView.asp
P.S. try to copy paste the link
|
|
|
|
|
I have a problem creating Thread on accessing MSSQL database.
Can anyone show me how to do a series of threads in synchrony to access to the MSSQL database?
Thank you. I will very much appreciate your help.
janverge@gmail.com
|
|
|
|
|
Jan Palmer wrote: Can anyone show me how to do a series of threads in synchrony to access to the MSSQL database?
Since this would just execute each SQL command in order, why are you even using multiple threads??
|
|
|
|
|
Hi all,
Is there a way to add details to a database from a form?
I'm not really sure about the commands.
help please!
Thanks.
|
|
|
|