Click here to Skip to main content
15,885,366 members
Home / Discussions / C#
   

C#

 
GeneralRe: c# music resource Pin
discreetz19-Sep-09 6:12
discreetz19-Sep-09 6:12 
AnswerRe: c# music resource Pin
Ravi Bhavnani19-Sep-09 8:09
professionalRavi Bhavnani19-Sep-09 8:09 
Questionmshtml Event Object Model Pin
Jacobb Michael18-Sep-09 18:47
Jacobb Michael18-Sep-09 18:47 
AnswerRe: mshtml Event Object Model Pin
Ravi Mori18-Sep-09 20:40
Ravi Mori18-Sep-09 20:40 
Questionpassing reference types by reference Pin
lhyblue18-Sep-09 18:40
lhyblue18-Sep-09 18:40 
AnswerRe: passing reference types by reference Pin
Christian Graus18-Sep-09 19:14
protectorChristian Graus18-Sep-09 19:14 
GeneralRe: passing reference types by reference Pin
Luc Pattyn19-Sep-09 3:01
sitebuilderLuc Pattyn19-Sep-09 3:01 
QuestionCursor apply registry changes [modified] Pin
rick055618-Sep-09 16:15
rick055618-Sep-09 16:15 
I am working on a screen capture project that uses a global mouse hook. It works great.
currently when the user holds the right mouse button down for a time the cursor changes to a hand.
see below

[DllImport("user32.dll")]
static extern IntPtr LoadCursor(IntPtr hInstance, int lpCursorName);
private int IDC_HAND = 32649; /// IDC_HAND = 32649;///IDC_UPARROW=32516///IDC_CROSS=32515
private const uint OCR_NORMAL = 32512;

on event

private void setcursor()
{
IntPtr hcursor = LoadCursor(IntPtr.Zero, IDC_HAND);/// IDC_HAND/// IDC_UPARROW//IDC_CROSS
bool ret_val = SetSystemCursor(hcursor, OCR_NORMAL);
}
What I need is a LARGE CROSS
so I made these changes

DllImport("user32.dll")]
static extern IntPtr LoadCursor(IntPtr hInstance, int lpCursorName);
private int IDC_CROSS=32515; /// IDC_HAND = 32649;///IDC_UPARROW=32516///IDC_CROSS=32515
private const uint OCR_NORMAL = 32512;

private void Form1_Load(object sender, EventArgs e)
{
RegistryKey loadcursor = Registry.CurrentUser.OpenSubKey("Control Panel\\Cursors", true);
loadcursor.SetValue("Crosshair","%SYSTEMROOT%\\Cursors\\lcross.cur");
loadcursor.Close();
}

on event
private void setcursor()
{
IntPtr hcursor = LoadCursor(IntPtr.Zero, IDC_CROSS);/// IDC_HAND/// IDC_UPARROW//IDC_CROSS
bool ret_val = SetSystemCursor(hcursor, OCR_NORMAL);
}
am changing the poiter of the crosshair cursor the crude way !
dont now how to make it apply the rgistry changes. so that you dont
have re boot to make changes apply.
I would do it in the private void setcursor(),
but there is no system "large crosshair cursor".
only lcross.cur in windows/cursors.

AM I MESSED UP OR WHAT?
Thanks,
Regards.

P.S.
here is a link to the published project
it works great. Just want to put a little polish on it.
www.softsourcesolutions.com/nabit.zip

modified on Friday, September 18, 2009 10:33 PM

QuestionWeb service notification Pin
Xmen Real 18-Sep-09 15:48
professional Xmen Real 18-Sep-09 15:48 
QuestionHow to convert excel file to xml file to format DTD! Pin
Khuc Manh Thao18-Sep-09 15:42
Khuc Manh Thao18-Sep-09 15:42 
AnswerRe: How to convert excel file to xml file to format DTD! Pin
Khuc Manh Thao21-Sep-09 22:58
Khuc Manh Thao21-Sep-09 22:58 
Questionis it xml technology Pin
Mohamed El-Wehishy18-Sep-09 15:24
Mohamed El-Wehishy18-Sep-09 15:24 
AnswerRe: is it xml technology Pin
Luc Pattyn18-Sep-09 15:28
sitebuilderLuc Pattyn18-Sep-09 15:28 
AnswerRe: is it xml technology Pin
Mohamed El-Wehishy18-Sep-09 15:40
Mohamed El-Wehishy18-Sep-09 15:40 
QuestionFilterSendMessage - talking to a MiniFilter driver Pin
Søren Staun Jørgensen18-Sep-09 11:32
Søren Staun Jørgensen18-Sep-09 11:32 
AnswerRe: FilterSendMessage - talking to a MiniFilter driver Pin
Søren Staun Jørgensen18-Sep-09 11:45
Søren Staun Jørgensen18-Sep-09 11:45 
Questionunmanaged code data type equivalents in c# Pin
akhanal18-Sep-09 11:00
akhanal18-Sep-09 11:00 
AnswerRe: unmanaged code data type equivalents in c# Pin
Christian Graus18-Sep-09 11:39
protectorChristian Graus18-Sep-09 11:39 
GeneralRe: unmanaged code data type equivalents in c# Pin
Luc Pattyn18-Sep-09 11:47
sitebuilderLuc Pattyn18-Sep-09 11:47 
GeneralRe: unmanaged code data type equivalents in c# Pin
Christian Graus18-Sep-09 12:16
protectorChristian Graus18-Sep-09 12:16 
GeneralRe: unmanaged code data type equivalents in c# Pin
Matt Meyer18-Sep-09 12:21
Matt Meyer18-Sep-09 12:21 
GeneralRe: unmanaged code data type equivalents in c# Pin
Luc Pattyn18-Sep-09 12:32
sitebuilderLuc Pattyn18-Sep-09 12:32 
GeneralRe: unmanaged code data type equivalents in c# Pin
akhanal19-Sep-09 6:44
akhanal19-Sep-09 6:44 
QuestionHelp with getting data from web service into a named pipe stream Pin
AndyASPVB18-Sep-09 10:20
AndyASPVB18-Sep-09 10:20 
QuestionDoes destination PC need installing Crystal Report ? Pin
Mohammad Dayyan18-Sep-09 10:01
Mohammad Dayyan18-Sep-09 10:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.