
February 8th, 2006, 02:50 PM
|
|
Contributing User
|
|
Join Date: Jan 2006
Posts: 52
Time spent in forums: 10 h 49 m 33 sec
Reputation Power: 3
|
|
Quote: | Originally Posted by Zerminator Hi!! I have delphi 7 and i would like to make a program like this: have a button and a textbox, and when the button is pressed, it should open a new browser window with the url in the textbox ("http://www.microsoft.com" for example). Also, can i automaticaly close the window after some time? Please somebody give me any idea how to make this. Thanks  |
assuming your TEdit control is named "Edit1" the code below will do the trick:
uses ShellApi;
procedure OpenUrl;
begin
ShellExecute(self.WindowHandle,'open',PChar(edit1.text),nil,nil, SW_SHOWNORMAL);
end;
|