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

 

    摘要: 谢谢 ......
 ·谁有d-link1200的相关资料    »显示摘要«
    摘要: 我今日得到一个d-link1200的hub,可惜太老的产品,厂家已经没有它的技术支持,相关的资料也没有在d-link上公布,看看那位前辈有这个东东的资料,我想要,学习一下。谁能帮我了解这个心愿~ ......


使用XP的外观

.Net   很好,可是我想使用XP的那种外观.   怎么做呢?  
  VB,VC++的解决都可以:)

NO.1   作者: Dugu_Niu

把所有控件的FlatStyle属性设为System,注意有的可视控件没有这个属性  
  然后把下面的代码添加到#Region   区的InitializeComponent()后面(这个需要放在任何初始化代码前面),OK,试着运行一下。  
     
  Dim   x   As   String  
  Dim   y   As   Integer  
  Dim   AppName   As   String  
  Dim   ManFileName   As   String  
  Dim   AlreadyExists   As   String  
  Find   the   name   of   this   application  
  x   =   Application.ExecutablePath  
  y   =   x.LastIndexOf("\")  
  y   =   y   +   1  
  AppName   =   x.Substring(y,   x.Length   -   y)  
  Create   the   name   for   the   XML   file  
  ManFileName   =   AppName   &   ".xml"  
  See   if   the   manifest   exists  
  If   System.IO.File.Exists(ManFileName)   Then  
          AlreadyExists   =   "Y"  
  Else  
          FileOpen(1,   ManFileName,   OpenMode.Binary)  
          FilePut(1,   "<?xml   version=1.0   encoding=UTF-8   standalone=yes?>"   &   vbCrLf)  
          FilePut(1,   "<assembly   xmlns=urn:schemas-microsoft-com:asm.v1   manifestVersion=1.0>"   &   vbCrLf)  
          FilePut(1,   "<assemblyIdentity   version=1.0.0.0   processorArchitecture=X86   name=zx.exe   type=win32   />"   &   vbCrLf)  
          FilePut(1,   "<description>zxapplication</description>"   &   vbCrLf)  
          FilePut(1,   "<dependency>"   &   vbCrLf)  
          FilePut(1,   "<dependentAssembly>"   &   vbCrLf)  
          FilePut(1,   "<assemblyIdentity   type=win32   name=Microsoft.Windows.Common-Controls   version=6.0.0.0   processorArchitecture=X86   publicKeyToken=6595b64144ccf1df   language=*   />"   &   vbCrLf)  
          FilePut(1,   "</dependentAssembly>"   &   vbCrLf)  
          FilePut(1,   "</dependency>"   &   vbCrLf)  
          FilePut(1,   "</assembly>"   &   vbCrLf)  
          FileClose(1)  
          Open   a   new   instance   of   the   app   and   close   this   one  
          so   the   manifest   is   picked   up  
          Shell(AppName,   AppWinStyle.NormalFocus)  
          End  
  End   If  
 

NO.2   作者: spiketang

主要是增加一些pictureBox然后对它们的又击事件进行编码!  
  private   void   changeWinState()  
  {  
  if(!ismax)  
  {  
  this.WindowState   =   FormWindowState.Maximized;  
  ismax=true;  
  this.TitleLabel.Text   =   "最大化!";  
  }  
  else  
  {  
  this.WindowState   =   FormWindowState.Normal;  
  ismax=false;  
  this.TitleLabel   .Text   =   "默认大小!";  
  }  
  }  
   
  private   void   picBox_DoubleClick(object   sender,   System.EventArgs   e)  
  {  
  changeWinState();  
  }  
   
  private   void   TitleLabel_DoubleClick(object   sender,   System.EventArgs   e)  
  {  
  changeWinState();  
  }  
   
  private   void   picBox_MouseDown(object   sender,   System.Windows.Forms.MouseEventArgs   e)  
  {  
  m_pOffset   =   new   Point(-e.X,   -e.Y);  
  }  
   
  private   void   picBox_MouseMove(object   sender,   System.Windows.Forms.MouseEventArgs   e)  
  {  
  if(e.Button   ==   MouseButtons.Left)    
  {    
  Point   mousePos   =   Control.MousePosition;    
  mousePos.Offset(m_pOffset.X,   m_pOffset.Y);    
  Location   =   mousePos;    
  }    
  }  
   
  private   void   button1_Click(object   sender,   System.EventArgs   e)  
  {  
  Application.Exit   ();  
  }  
   
  private   void   pictureBox4_MouseEnter(object   sender,   System.EventArgs   e)  
  {  
  this.pictureBox4   .Image   =   System.Drawing.Bitmap.FromFile("close2.bmp");  
  }  
   
  private   void   pictureBox4_MouseLeave(object   sender,   System.EventArgs   e)  
  {  
  this.pictureBox4   .Image   =   System.Drawing.Bitmap.FromFile("close1.bmp");  
  }  
   
  private   void   pictureBox4_MouseDown(object   sender,   System.Windows.Forms.MouseEventArgs   e)  
  {  
  this.pictureBox4   .Image   =   System.Drawing.Bitmap.FromFile("close3.bmp");  
  }  
   
  private   void   pictureBox4_Click(object   sender,   System.EventArgs   e)  
  {  
  Application.Exit   ();  
  }  
  }  
 

NO.3   作者: y1g1y1

http://expert.csdn.net/Expert/icView1.asp?id=2093334


    摘要: 怎样实现计算机之间的应答通讯?这边给对方发一消息对方可以选择接受也可以选择不接受应怎么实现,有什么思路吗谢谢! ......
» 本期热门文章:

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