类似于www.5xgame.com的每一个游戏的进度条 ,,求解

解决方案 »

  1.   

    我做了一个html文件的进度条,你看看用的上不,下边是html源代码:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <title>MyHtml.html</title>

        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="this is my page">
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        
        <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
        
    <style>
    .holder{
     position:absolute; border:solid #00CC00 1px; height:10px; 
    }
    div .bar {
     background-color:#00CC00; height:10px;
    }
    </style>
    <script>
    function ProgressBar() {
     this.holder = document.createElement('div');
     this.bar = document.createElement('div');
     
     this.holder.appendChild(this.bar);
     
     this.holder.className = 'holder';
     this.bar.className = 'bar';
     
     this.bar.style.width = '0px';
     this.holder.style.width = '100px';
     
     var that = this;
     
     this.show =  function () {
      var w = (window.innerWidth) ? window.innerWidth : (document.documentElement && document.documentElement.clientWidth) ? document.documentElement.clientWidth : document.body.offsetWidth;    var h = (window.innerHeight) ? window.innerHeight : (document.documentElement && document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.offsetHeight;   
      this.holder.style.top = h/2 + 'px';
      this.holder.style.left = w/2 + 'px';
      document.body.appendChild(this.holder);
      this.timer = setInterval(this.grow, 100);
     };
     this.grow = function () {
     
      var barWidth = parseInt(that.bar.style.width);
      var holderWidth = parseInt(that.holder.style.width);
      
      barWidth += 10;
      barWidth = Math.min(barWidth, holderWidth);
      
      that.bar.style.width = barWidth + 'px';
      if (barWidth === holderWidth) {
       clearInterval(that.timer);
       document.body.removeChild(that.holder);
       that.onEnd();
      } 
     };
     this.show();
    }</script>
      </head>
      
      <body>
        <input type="button" value="小蚕豆" onclick="ProgressBar();"/>
      </body>
    </html>
      

  2.   

    [DllImport("user32", EntryPoint = "GetMessage")]
                public static extern uint GetMessage(
                                out tagMSG lpMsg,
                                IntPtr  hwnd,
                                int wMsgFilterMin,
                                int wMsgFilterMax
                );[StructLayout(LayoutKind.Sequential)] 
            public struct tagMSG
            { tbao http://www.58gw.net 
                public int hwnd;
                public uint message;
                public int wParam;
                public long lParam;
                public uint time;
                public POINTAPI pt;
            }
                    [StructLayout(LayoutKind.Sequential)]
            public struct POINTAPI
            {
                public int x;
                public int y;
            }