我在事件FileListBox1中能连续的读取图片并显示但,我还想把它做成:
1 连续读取图片
2 单独手动选取图片。
这在技术上能实现吗?请高手指点!!!

解决方案 »

  1.   

    procedure TForm1.FileListBox1Change(Sender: TObject);var
        msg : TMSG ;
        i: integer;
        //nIndex : integer;
    begin
        for i := 1 to 4 do
        begin
            Tedit(findcomponent('Edit'+inttostr(i))).text := '';
         end;
            for i :=1 to filelistbox1.count do
            begin
                filelistbox1.ItemIndex := i-1;
            TEdit(findcomponent('Edit'+inttostr(1))).text :=filelistbox1.FileName;
             if(CheckBox1.Checked)then
            begin
                    TImage(findcomponent('Image'+inttostr(1))).picture.LoadFromFile(filelistbox1.filename);
            end else begin
                    TImage(findcomponent('Image'+inttostr(1))).picture.LoadFromFile('d:\blank.jpg');
                   end;
            while(PeekMessage(msg,Self.WindowHandle,0,0,PM_REMOVE)) do
            begin
                TranslateMessage(msg);
                DispatchMessage(msg);
            end;    end;end;不好意思忘了给代码了。