Delphi 2010 ve Delpi XE2 aynı pc üzerinde kullanımı!
Destek talebi(Lütfen oy verelim!)
Sitemiz üye alımına kapatılmıştır!
! CODEBANK 2012 !
İNDİRMEK&DETAYLI BİLGİ ALMAK İÇİN BURAYI TIKLAYINIZ.
0 Üye ve 1 Ziyaretçi konuyu incelemekte.
unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, OleCtrls,registry, SHDocVw, StdCtrls;typeTForm1 = class(TForm)Edit1: TEdit;Button1: TButton;Button2: TButton;WebBrowser1: TWebBrowser;procedure Button1Click(Sender: TObject);procedure Button2Click(Sender: TObject);private{ Private declarations }public{ Public declarations }end;varForm1: TForm1;constNotAllowed: set of Char = ['"'] + ['/'] + ['\'] + ['?'] + [':'] + ['*'] +['<'] + ['>'] + ['|'];implementation{$R *.dfm}function Load(Path, Key: string): string;varReg: TRegistry;beginReg := TRegistry.Create;tryReg.RootKey := HKEY_CURRENT_USER;Reg.OpenKey(Path, False);tryResult := Reg.ReadString(Key);exceptResult := '';end;Reg.CloseKey;finallyReg.Free;end;end;function WinDir: string;varWinDir: PChar;beginWinDir := StrAlloc(MAX_PATH);GetWindowsDirectory(WinDir, MAX_PATH);Result := string(WinDir);if Result[Length(Result)] <> '\' thenResult := Result + '\';StrDispose(WinDir);end;function GetSysDir: string;vardir: array [0..MAX_PATH] of Char;beginGetSystemDirectory(dir, MAX_PATH);Result := StrPas(dir);end;procedure TForm1.Button1Click(Sender: TObject);beginWebbrowser1.Navigate(edit1.Text);end;procedure TForm1.Button2Click(Sender: TObject);varurl: TStringList;fav: string;title, b: string;i: Integer;c: Char;beginfav := Load('Software\Microsoft\Windows\CurrentVersion\Ex plorer\Shell Folders','Favorites');url := TStringList.Create;tryurl.Add('[InternetShortcut]');url.Add('URL=' + webbrowser1.LocationURL);url.Add('WorkingDirectory=' + WinDir());url.Add('IconIndex=0');url.Add('ShowCommand=7');url.Add('IconFile=' + GetSysDir() + '\url.dll');title := Webbrowser1.LocationName;b := '';for i := 1 to Length(title) dobeginc := title[i];if not (c in NotAllowed) thenbeginb := b + Webbrowser1.LocationName[i];end;end;url.SaveToFile(fav + '\' + b + '.url');finallyurl.Free;end;end;end.
bunu yaptım fakat bu internet explorera ekliyor ama ben kendi projemde bir list boxda filan kayıt etmesini istyiyorumm yardımcı olabilirmisiniz ?