Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Delphi: Для новичков > on new window


Автор: muratboy31 18.1.2010, 00:07
it opens a window but not with the link from the main window !!! how can i open the link also...

Код

procedureTform1.NewWindowEvent(Sender: TObject; varppDisp: IDispatch; varCancel: WordBool);  
var  
PC: array[0..255] ofchar;  
S: String;  
begin  
WinExec(StrPCopy(PC, ParamStr(0)+' '+S), Sw_Show);  
ppDisp:=DesignTimeWB.DefaultDispatch;  
end; 
 

thanks in advance

Автор: ~FoX~ 18.1.2010, 00:23
Your try send link as parametr? 
Wwhere S and PC give data? 

Автор: muratboy31 18.1.2010, 00:28
how would i get the link ?

Автор: ~FoX~ 18.1.2010, 00:33
Ок....Understand....
Where variable S and PC get data?

Автор: Данкинг 18.1.2010, 00:50
~FoX~ is right - there's no value to PC and S given. And by the way, why "WinExec" and not "ShellExecute"?

Автор: muratboy31 18.1.2010, 10:05
i also tried it with shellexecute, but it opened the internet explorer window... i want to open a new window from my exe with the link... this is the code i tried !!!

Код

procedureTform1.NewWindowEvent(Sender: TObject; varppDisp: IDispatch; varCancel: WordBool);  
var  
PC: array[0..255] ofchar;  
S: String;  
begin  
ShellExecute(Handle, 'open', PChar(StrPCopy(PC, ParamStr(0)+' '+S)), PChar(ComboBox1.Text), '', SW_SHOWNORMAL);  
end;  

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)