比如定义一个圆圈,让一个pictruebox在圆圈上循环移动。
解决方案 »
- 请问,这个集合,如何去除重复元素
- RichTxetBox问题,动态添加内容的单行字体颜色改变
- 调用TreeViw的 NodeMouseClick
- 时间问题
- 怎么向这样的网页提交数据
- 如何在javascript中用服务器端的模式从数据库中提取数据?
- 我有一个tabctrl,这个tabctrl有好几个tabpage,每个tabpage上面有好几个textbox,我想使用fontdialog,使用fontdialog的时候,需要知道当前所选择文字的textbox是吧,问题是:
- ASP.NET一个简单问题,本人是ASP.NET的初学者,请高手指教
- 一个攻击程序,欢迎指点!
- 文本框中出现逗号
- 多线程访问控件的问题.我记得我在VS2003里曾经做过直接开一个线程.在线程里调问一个listview.
- TreeView的问题!急!!!在线等
ref double 角度, out Point 物体坐标)
{
角度 = 角度 + 转速;
if (角度 > 2 * Math.PI)
角度 = 角度 - 2 * Math.PI;
else if (角度 < 0)
角度 = 角度 + 2 * Math.PI;
物体坐标 = new Point(
(int)(Math.Cos(角度) * 半径) + 圆心坐标.X,
(int)(Math.Sin(角度) * 半径) + 圆心坐标.Y
);
}
private double 角度 = 0;
private void timer1_Tick(object sender, EventArgs e)
{
Point 物体坐标;
圆心运动(new Point(100, 100), 0.3, 90, ref 角度, out 物体坐标);
pictureBox1.Left = 物体坐标.X;
pictureBox1.Top = 物体坐标.Y; // 可以一个绕一个,这里就不写了
}private void Form1_Load(object sender, EventArgs e)
{
timer1_Tick(sender, e);
timer1.Enabled = true;
}