C# Basit bir sıkıntı

Bu konuyu okuyanlar

Zingg

Öğrenci
Katılım
20 Mayıs 2019
Mesajlar
6
Reaksiyon puanı
1
Puanları
3
Yaş
24
Merhaba, oyunlarda kullanmak üzere basit bir crosshair yaptım. Fakat sıkıntı şu ki; Crosshairi açtığım zaman fareyi ekranın ortasından bir türlü çekemiyorum. Fare sürekli oraya ışınlanıyor. Kodlarda bunu sağlayacak hiçbir şey yok üstelik. Fare sürekli resimde ok ile gösterdiğim yerde kalıyor ama oyun harici yerlerde olmuyor.
Crosshairi yaptığım mantık:
Bir form yarattım ve formun arka planını crosshair'in resmi yaptım. Daha sonra formu küçültüp Top Most true yaptım.
namespace Pass_Door
{
partial class focuscrosshair
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(focuscrosshair));
this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip.SuspendLayout();
this.SuspendLayout();
//
// contextMenuStrip
//
this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exitToolStripMenuItem});
this.contextMenuStrip.Name = "contextMenuStrip";
this.contextMenuStrip.Size = new System.Drawing.Size(94, 26);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(93, 22);
this.exitToolStripMenuItem.Text = "Exit";
//
// focuscrosshair
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(50, 50);
this.ControlBox = false;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(50, 50);
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(50, 50);
this.Name = "focuscrosshair";
this.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "focuscrosshair";
this.TopMost = true;
this.TransparencyKey = System.Drawing.Color.Black;
this.Load += new System.EventHandler(this.focuscrosshair_Load);
this.contextMenuStrip.ResumeLayout(false);
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.ContextMenuStrip contextMenuStrip;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
}
}
Mesaj otomatik birleştirildi:

Arkadaşlar bilen biri yokmudur? Ve bu forumları nasıl içinden geçilecek şekilde yapabilirim? Mesela adam forma tıklayınca arkadaki uygulamaya etki etsin forma değil.
 

Ekli dosyalar

  • 1.PNG
    1.PNG
    207.1 KB · Görüntüleme: 172
Son düzenleme:

Zingg

Öğrenci
Katılım
20 Mayıs 2019
Mesajlar
6
Reaksiyon puanı
1
Puanları
3
Yaş
24
Arkadaşlar bu benim için çok önemli bir sıkıntı. Yardımcı olana maddi ücret ödemeye karar verdim.
gmail: [email protected]
 

Zodym

Öğrenci
Katılım
6 Kasım 2020
Mesajlar
4
Reaksiyon puanı
1
Puanları
3
Yaş
24
Merhaba öncelikle Form Load kısmına bu kodu yazınız:
Cursor.Hide();

Gene Çalışmazsa Alttaki Yöntemi Deneyiniz...


bir timer alın ve interval değerini 5000 bin yapın ardından timer ı etkin hale getirip timer a çift tıklayın ardından bu kodu yazın.

Cursor.Hide();

Destek çıktıysam ne mutlu bana
 
Üst