crosshair?

Discussion in 'Programming General' started by GameDude101, Aug 29, 2009.

crosshair?
  1. Unread #1 - Aug 29, 2009 at 7:35 PM
  2. GameDude101
    Joined:
    Jul 12, 2009
    Posts:
    4
    Referrals:
    0
    Sythe Gold:
    0

    GameDude101 Newcomer

    crosshair?

    hey anyone know how to make a corsshair?:huh:
     
  3. Unread #2 - Aug 30, 2009 at 7:37 PM
  4. super_
    Joined:
    Dec 20, 2008
    Posts:
    91
    Referrals:
    0
    Sythe Gold:
    0

    super_ Member

    crosshair?

    Code:
    Me.Cursor = Cursors.Cross
    From inside an instance function or subroutine inside the Form subclass, although I only think this works with the current application.
     
  5. Unread #3 - Aug 30, 2009 at 7:52 PM
  6. super_
    Joined:
    Dec 20, 2008
    Posts:
    91
    Referrals:
    0
    Sythe Gold:
    0

    super_ Member

    crosshair?

    For system-wide cursor change:
    Code:
    [DllImport("user32.dll")]
    private static extern IntPtr LoadImage(
            IntPtr hinst,
            string lpszName,
            uint uType,
            int cxDesired,
            int cyDesired,
            uint fuLoad
    );
    
    private const int IDC_CROSS = 32515;
    private const int LR_SHARED = 0x8000;
    private const int IMAGE_CURSOR = 2;
    Code:
    IntPtr hCursor = LoadImage(NULL, MAKEINTRESOURCE(IDC_CROSS), IMAGE_CURSOR, 0, 0, LR_SHARED);
    Code:
    [DllImport("user32.dll")]
    private static extern IntPtr SetCursor(
            IntPtr hCursor
    );
    
    Code:
    SetCursor(hCursor);
     
< jre errors | [Sourececode] Reflect0r - An unfinished reflection bot base >

Users viewing this thread
1 guest


 
 
Adblock breaks this site