Adblock breaks this site

crosshair?

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

  1. GameDude101

    GameDude101 Newcomer

    Joined:
    Jul 12, 2009
    Posts:
    4
    Referrals:
    0
    Sythe Gold:
    0
    crosshair?

    hey anyone know how to make a corsshair?:huh:
     
  2. super_

    super_ Member

    Joined:
    Dec 20, 2008
    Posts:
    91
    Referrals:
    0
    Sythe Gold:
    0
    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.
     
  3. super_

    super_ Member

    Joined:
    Dec 20, 2008
    Posts:
    91
    Referrals:
    0
    Sythe Gold:
    0
    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 >


 
 
Adblock breaks this site