473,394 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

IBeam Cursor is being inverted in the Cursor object

I am drawing the current cursor on a zoomed in view of the desktop which
seems to be work for all of the cursor types, except that the IBeam is
always being drawn inverted (white) even when it should be drawn black.

My Code:
[StructLayout(LayoutKind.Sequential)]
public struct POINT
{
public Int32 x;
public Int32 y;
}
[StructLayout(LayoutKind.Sequential)]
public struct CURSORINFO
{
public Int32 cbSize;
public Int32 flags;
public IntPtr hCursor;
public POINT ptScreenPos;
}
[DllImport("user32.dll")]
public static extern bool GetCursorInfo(out CURSORINFO pci);
Get the current Cursor Info
CURSORINFO ci = new CURSORINFO();
ci.cbSize = Marshal.SizeOf(typeof(CURSORINFO));
GetCursorInfo(out ci);

Create a Cursor Object from the current windows cursor
curCursor = new Cursor(ci.hCursor);

//Draw the current Windows Cursor on a graphics object with a rectangle i
initialized elsewhere
curCursor.DrawStretched(gZoompb,RectCursor);
Thanks in advance for any suggestions,
~Logan
Nov 22 '05 #1
0 1211

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Logan | last post by:
I am drawing the current cursor on a zoomed in view of the desktop which seems to be work for all of the cursor types, except that the IBeam is always being drawn inverted (white) even when it...
7
by: William Gill | last post by:
I have been trying to pass parameters as indicated in the api. when I use: sql= 'select * from %s where cusid = %s ' % name,recID) Cursor.execute(sql) it works fine, but when I try : sql=...
1
by: meicher | last post by:
Hello, There exists a very good methode in C++ and MFC: pDC->invertRectangle(pRec); Is there any simular methode in C# and .Net ? How can I use the API function <invertRectangle> in C# ? Regards...
2
by: Craig | last post by:
I'm trying to do this within a control I've created: Cursor.Current = Cursors.WaitCursor; During the initialization of the parent form, my control gets added to the form, and while the control...
2
by: Alex | last post by:
In the code below, clicking on the button ButtonChangeCursor changes the form's cursor to a WaitCursor. Clicking the button ButtonRestoreCursor changes the form's cursor back to its original...
7
by: Mark Hobley | last post by:
I have some information that states that the if conditional can be be inverted from the traditional syntax if (EXPRESSION) BLOCK to an alternative syntax: if BLOCK (EXPRESSION); I have a...
3
by: bob | last post by:
Is there anyway to show the hourglass (busy) cursor on the entire monitor screen, not just when the cursor is within the current program's window? Thanks
13
by: WALDO | last post by:
I have a .Net TextBox (TextBoxBase, really) in which I am appending about 20 lines of text per second. I use the AppendText() method to accomplish this. This is a great substitute for taking the...
5
by: vd12005 | last post by:
Hello, While playing to write an inverted index (see: http://en.wikipedia.org/wiki/Inverted_index), i run out of memory with a classic dict, (i have thousand of documents and millions of terms,...
7
by: Academic | last post by:
What are the different effects of the following two statements: C1.Cursor = Cursors.WaitCursor C1.Cursor.Current = Cursors.WaitCursor I believe the first replaces the entire C1.Cursor...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.