当前位置:首页
开发技术指南» 文章正文
    引言:

    摘要: 图片已经加到资源中idb_bitmap1,试了多种办法,都无法把这个图片放到对话框的 picture控件上,请问应该怎么处理? ......
 ·:怎么做可以让 qq不能抓图    »显示摘要«
    摘要: 我想做个web,语言不限。 但想达到这个目的: 1 不能保存web上的图。 2 qq也不能抓图。 知道的朋友言一声,谢谢。 ......


在线等待:如何限制在文本框中只输入数字,小数点和删除键

忘了在文本框的keypress事件中如何实现上述功能?请教

NO.1   作者: I_Iverson

private   void   ucNumberTextBox_KeyPress(object   sender,   System.Windows.Forms.KeyPressEventArgs   e)  
  {  
  //8   回车  
  if((int)e.KeyChar   !=   8)  
  {    
  if(((int)e.KeyChar   !=   46)   &&   ((int)e.KeyChar   <   48   ||   (int)e.KeyChar   >   57)   &&   (int)e.KeyChar   !=   13)  
  {  
  e.Handled   =   true;  
  }  
   
  //允许小数  
  if(_decimalLength   >   0)  
  {  
  int   x   =   this.Text.IndexOf(.);  
  //限制整数  
  if(x   <   0   &&   this.Text.Length   >=   _intLength   &&   (int)e.KeyChar   !=   46)  
  {  
  e.Handled   =   true;  
  }  
  //超过整数位置只能输入小数  
  else   if(x   >   _intLength   +   1   &&   (int)e.KeyChar   !=   46)  
  {  
  e.Handled   =   true;  
  }  
   
  else   if(x   >=   0   &&   ((int)e.KeyChar   ==   46   ||   (this.Text.Substring(x).Length)   >   _decimalLength))  
  {  
  e.Handled   =   true;  
  }  
  }  
  //只能是整数  
  else  
  {  
  if(this.Text.Length   >=   _intLength   ||   (int)e.KeyChar   ==   46)  
  {  
  e.Handled   =   true;  
  }  
  }  
   
  if(this.Text.Length   <   1)  
  {  
  if((int)e.KeyChar   ==   46)  
  e.Handled   =   true;  
  }  
  }  
  }


    摘要: 具体来说: map元素在内存中是自动排序的,现在我的key是string类型,里面存放是汉字词。排序方式是默认,那么小妹想知道,系统是根据什么来排序的?是跟据汉语编码嘛?各个词长短不一,这个怎么来排? 另向高手请教:可以根据拼音来排序嘛?如果可以,指点一二。小妹主要想操作内存! ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE