我现在想在自己触摸屏的开发板上实现这个效果,我猜大概是依据手指横向的滑动速度
1,主要不知道怎么来计算手指滑过触摸屏的速度
2,不知道手指滑过这个是mousedown=》mousemove=》mouseup的过程还是只是mousemove而已
3,想用计时器来计算这个速度,不知道效率怎么样大家出出主意,出出意见

解决方案 »

  1.   

     看到是个沙发。。踩一下。
      IPhone的确爽呐。。  特别是游戏。。 是我玩过所以手机 感觉最爽得了。只是难冲电。 哈哈。
    期待高手回答你得问题。
      

  2.   

    Touch技术,需要硬件及底层驱动支持...不是C#能做得了的...
      

  3.   

    mousedown开始记录初始X Y坐标值mousemove不断检测最新X Y坐标值mouseup判断最新X Y坐标值 这里是最终计算if(absX > absY && (absX > 35) && deltaT < 1000)
    {
          根据滑动范围和滑动时间来计算是否执行swipe
           deltaX < 0? 'left':'right'
    }
      

  4.   


    C# 只能应用iphone web.
      

  5.   

    对了,手刷有弊端,需禁止scroll.否则要应用手刷 比较一点小麻烦。
      

  6.   

    什么是iphone web,什么是手刷?
      

  7.   

    简单模拟当然可以这个例子里你按住鼠标在form上向右滑动如果太慢,是不会弹出对话框的using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;namespace WindowsApplication219
    {
        public partial class Form1 : Form
        {
            Point Old = new Point(-1, -1);        public Form1()
            {
                InitializeComponent();            this.MouseMove += new MouseEventHandler(Form1_MouseMove);
            }        void Form1_MouseMove(object sender, MouseEventArgs e)
            {
                if (e.Button == MouseButtons.Left)
                {
                    if (Old.X != -1 && e.X - Old.X > 80)
                        MessageBox.Show("!");
                    Old = e.Location;
                }
                else
                    Old = new Point(-1, -1);
            }
        }
    }
      

  8.   

     public partial class Form1 : Form
        {
            Point oldpoint;
            Point newpoint;        bool startmove = false;
            int count = 0;        public Form1()
            {
                InitializeComponent();
            }        private void timer1_Tick(object sender, EventArgs e)
            {
                count++;
            }        private void Form1_MouseMove(object sender, MouseEventArgs e)
            {
                if (startmove)
                {
                    float a = (e.X - oldpoint.X) * 10 / count;
                    if(a>500)
                    {
                        MessageBox.Show("到达500的位移速度!");
                    }
                }        }        private void Form1_MouseDown(object sender, MouseEventArgs e)
            {
                startmove = true;
                count = 1;
                oldpoint = e.Location;
                this.timer1.Start();
            }        private void Form1_MouseUp(object sender, MouseEventArgs e)
            {
                startmove = false;
                newpoint = e.Location;
                this.timer1.Stop();
                float a = (newpoint.X - oldpoint.X)*10 / count;
                this.label1.Text = a.ToString();
            }
        }写了一段测试的代码,大家看看行不?
      

  9.   

    手刷就是 单指手势  iphone术语http://www.manifestinteractive.com/iphone/