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

    摘要: 在vb.net 中如何写一个通用的方法,可以得到最上面窗口的对象?(即当前应用程序显示的窗口) 比如 function getform() as form dim x as form 得到当前的最上面窗口 如何做? return x end function ......
 ·字符串转换成浮点数    »显示摘要«
    摘要: 我使用函数atof()转换字符串为浮点数,但在转换时会出现一点小误差。 如: #include <string> #include <iostream> #include <iomanip> using namespace std; int main(void) { char temp[25]; double dtemp; cout << &......


Topendialog和Tlistview组件使用的问题

我想利用endialog组件选择JPEG格式的图片,然后在Tlistview组件中显示为背景,代码怎么写呢?

NO.1   作者: lianshaohua

var  
      bit:Tbitmap;  
      x,y,w,h:integer;  
      tj:tjpegimage;  
  begin  
      try  
          tj:=tjpegimage.create;  
          tj.loadfromfile(filename);//filename为你打开文件的文件名;  
          bit:=tbitmap.Create;  
          bit.assign(tj);  
          tj.free;  
          w:=bit.Width;  
          h:=bit.Height;  
          y:=0;  
          while   y<h   do  
              begin  
                  x:=0;  
                  while   x<w   do  
                      begin  
                          listview1.Canvas.Draw(x,y,bit);  
                          inc(x,w);  
                      end;  
                  inc(y,h);  
              end;  
      finally  
          bit.FreeImage;  
          bit.Free;  
          tj.free;  
      end;  
  end;}


 ·问个读音问题    »显示摘要«
    摘要: “伊利汗国”的“汗”应该念第二声还是第四声? ......
» 本期热门文章:

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