İçeriğe geç
ShiftDelete.Net
Haber ara/ SDN'ye SorGiriş
Haber Akışı SDNTV İnceleme Forum Yapay Zeka Akıllı Telefon Elektrikli Otomobil Oyun ShiftDelete.Net Global Teknoloji Haberleri Mobil Otomobil Donanım Savunma Bilim Sosyal Medya İnternet Giyilebilir Teknoloji Rehber Ürünler Son dakika Yazarlar
  1. Ana sayfa
  2. Topluluk
  3. Programlama
  4. Programlama Dilleri
Programlama Dilleri

C# Basit bir sıkıntı

Zingg16.01.20202 cevap1.019 görüntüleme
2019'den beri6 mesaj
#1
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.
Designer.cs
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;
}
}

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.
düzenlendi
Cevaplar
Zingg Konuyu açan
2019'den beri6 mesaj
#2
Arkadaşlar bu benim için çok önemli bir sıkıntı. Yardımcı olana maddi ücret ödemeye karar verdim.
gmail: wfykgms5@gmail.com
2020'den beri4 mesaj
#3
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

Cevabını yaz

Cevap yazmak için giriş yap ya da üye ol. Eski forum kullanıcı adın ve parolanla girebilirsin.