עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

תגובה ללחיצת מקש ימני של העכבר בC#

Featured Replies

פורסם

יש לי לחצנים שנוצרים דינמית.

אני רוצה שהם יגיבו ללחיצה ימנית של העכבר.

איך עושים את זה? :nixweiss:

פורסם

לחצנים? אתה מתכוון לכפתורים?

במידה וכן, לכל כפתור יש Event בשם MouseClick. ב Event הזה אתה רושם את הקוד הבא:


private void button1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
//
// Code to exectute
//
}
}

ונגמר הסיפור. בהצלחה.

פורסם
  • מחבר

ניסיתי זה לא מצליח


arr[i, j].MouseClick += new MouseEventHandler(this.Right_Button_Click);
.
.
.
private void Right_Button_Click(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
Button b = (Button)sender;
b.Text = "0";
}
}

פורסם
  • מחבר

אוווף איזה באסה :(

אז הלוח שבשולה המוקשים לא בנוי מכפתורים?

פורסם

נסה PictureBox.

פורסם
  • מחבר

אין לזה את המאפיין Text

יש אולי משהו אחר?

פורסם
  • מחבר

במשחק של מיקרוסופט כשאני לוחץ על משבצת זה נראה כאילו אני לוחץ על כפתור.

לחיצה על picturebox או label לא "מרגישה" ככה.

יש אולי דרך לעשות את זה?

  • 2 שבועות מאוחר יותר...
פורסם

תנסה אולי בכל זאת להשתמש בBUTTON ובOVERRIDE ל - WndProc על מנת לעקוף את המגבלות של האובייקט לגבי לחיצה ימנית..

פורסם

הממ, אם כבר הערת את הת'רד:

נסה להשתמש באירועים MouseDown או MouseUp. יכול להיות שהם יעבדו.

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.