Текущий архив: 2007.11.25;
Скачать: CL | DM;
Вниз
Можноли программно открыть страницу в уже открытом IE Найти похожие ветки
← →
Cerberus (2007-10-20 21:00) [0]сабж
← →
DVM © (2007-10-20 21:02) [1]можно
← →
@!!ex © (2007-10-20 21:07) [2]можно
← →
@!!ex © (2007-10-20 21:07) [3]но я не знаю как. :(
← →
DVM © (2007-10-20 21:08) [4]как вариант отправить окну WM_DROPFILES с указанным URL. Скорее всего откроет.
← →
Cerberus (2007-10-20 21:08) [5]В каком направлении двигаться
← →
Cerberus (2007-10-20 21:33) [6]Собщение отправляю так
PostMessage(FindWindow("IEFrame", nil), WM_DROPFILES, 0, 0);
А как передать URL
← →
Cerberus (2007-10-20 21:54) [7]
function makedrop(const filenames: array of string): thandle;
// creates a hdrop object
// erzeugt ein hdrop object
var
i, size: integer;
data: pdraginfoa;
p: pchar;
begin
// calculate memory size needed
// berechne notwendig speichergro?e
size := sizeof(tdraginfoa) + 1;
for i := 0 to high(filenames) do
inc(size, length(filenames[i]) + 1);
// allocate the memory
// alloziere den speicher
result := globalalloc(ghnd or gmem_share, size);
if result <> 0 then
begin
data := globallock(result);
if data <> nil then
try
// fill up with data
// fulle daten
data.usize := sizeof(tdraginfoa);
p := pchar(@data.grfkeystate) + 4;
data.lpfilelist := p;
// filenames at the at of the header (separated with #0)
// am ende des headers nun die filenamen getrennt mit #0
for i := 0 to high(filenames) do
begin
size := length(filenames[i]);
move(pointer(filenames[i])^, p^, size);
inc(p, size + 1);
end;
finally
globalunlock(result);
end
else
begin
globalfree(result);
result := 0;
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
drop := makedrop(["www.appia.ru"]);
if drop <> 0 then postmessage(FindWindow("IEFrame", nil), wm_dropfiles, drop, 0);
globalfree(drop);
end;
Компилится но ничего не происходит
Страницы: 1 вся ветка
Текущий архив: 2007.11.25;
Скачать: CL | DM;
Память: 0.46 MB
Время: 0.03 c