有人可以为我提供有关C#鼠标的一些信息吗? [英] Can someone help me with some info about C# mouse?

查看:91
本文介绍了有人可以为我提供有关C#鼠标的一些信息吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.我必须为一个学校项目做一个SearchWord游戏.我制作了所有矩阵,带有单词的表格,随机字符...我需要一些有关鼠标选择单词的帮助.我有每个单词的第一个字符的位置信息,最后一个位置和方向N,S,E,W,NE,NW,SE,SW.有人可以说出如何使鼠标向上和向下移动的功能吗?

我尝试过的事情:

Hi all. I have to do for a school project a SearchWord game. I make all the matrix, the table with words,random chars...i need some help with the mouse select word. I have information of position for the first char off every word, the last position and the direction N,S,E,W,NE,NW,SE,SW. Can some one say how to make a function for mouse upp and mouse down?

What I have tried:

private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
        {
            press= false;
        }

        private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
        {
           
                press = true;
                
            }
        }

推荐答案

请参阅: C#.NET中的完整单词益智游戏 [ ]
See: winforms - Get cursor position with respect to the control - C# - Stack Overflow[^]

Also see: A Complete Word Puzzle Game in C#.NET[]


这篇关于有人可以为我提供有关C#鼠标的一些信息吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆