Autor Beitrag
Nuker
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Di 04.02.03 20:50 
Halli Hallo,

Ich hab da ein großes Problem und hoffe Ihr könnt mir helfen :

Wie kann ich meine Delphi Anwendung mit Hilfe der Webbrowser VCL (die ja im prinzip iE ist) steuern?? Ist dies über spezielle die HTML Seite möglich ??

So will ich zum Beispiel eine HTML-Seite in meinem Programm anzeigen in der ein Link ist der meinetwegen 'Optionen' heisst und sobald man drauf klickt wird nicht etwa eine neue HTML Seite geladen sondern ein Formular.

Wenns euch hilft: Ich arbeite mit Delphi 6 Enterprise Edition.

Vielen Dank an euch alle schon mal, C YA @LL
[BD]Nuker|M.O.I.C.

_________________
C YA - [BD]Nuker|Zeus:XML
Beware - The Matrix has you!
alexschultze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 317



BeitragVerfasst: Do 06.02.03 18:56 
ich glaube man müsste da einfach die URL's catchen und dann meinetwegen URL 'OpenOPtions', dann FormXY.show.

_________________
Von allen Dingen die ich verloren habe trauere ich meinem Verstand am meisten nach.
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Do 06.02.03 21:30 
Hi,

du mußt in der Registry dir nen eigenes URL-Format machen, durch welches dann dein Programm gestartet wird.

z.B. anstelle http:// dann MyProg:// (Gibt es ja zu genüge... Hotline://, ICQ:// AIM:// etc... wird jedesmal das programm gestartet.)

So würde ich es lösen :)

Au'revoir,
Aya~

_________________
Aya
I aim for my endless dreams and I know they will come true!
alexschultze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 317



BeitragVerfasst: Fr 07.02.03 15:51 
hey, das klingt echt gut. kurze idee für die realisierung und übergabe von parametern damit?

_________________
Von allen Dingen die ich verloren habe trauere ich meinem Verstand am meisten nach.
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Fr 07.02.03 16:06 
Hi,

ne.. mußt mal in der Registry rumwühlen, irgendwo da steht es.. :)
mußt dann glaub ich nur nen eintrag zu deinem Programm dazumachen, und fertig *g*

Au'revoir,
Aya~

PS: Schau dir mal den Link von dem AIM-Button unter deinem Post an, der funktioniert auf die gleiche weise :)

_________________
Aya
I aim for my endless dreams and I know they will come true!
Nuker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Fr 07.02.03 20:17 
Titel: Hi
Halli Hallo,

Hm... an sich nicht schlecht... ABER :) :

Ich will nicht jedesmal das Programm mit anderen Parametern sonder ich will ja den iE IN meinem Programm benutzen und so eine flexible, für jeden veränderbare HTML Maske basteln... die eben dann zum Beispiel das Optionsfenster öffnet oder sonst was macht...

Kennt ihr Norton SystemWorks ?? Die machens auch so ... (hab mal in einem extremen Zufall gesehen wie das Hauptmenü der SystemWorks eine HTML Datei aus einer DLL-Resource ausgelesen hat)

Aber so ein eigenes URL Format is schon mal auch nicht schlecht :wink:

_________________
C YA - [BD]Nuker|Zeus:XML
Beware - The Matrix has you!
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Fr 07.02.03 20:51 
Im OnBeforeNavigate2 Ereignis kannst du deine Aktion durchführen.

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
function GetInternetProt(const s: String): String;
var ps: Integer;
begin
  Result := '';
  ps := pos('://', s);
  if ps > 2 then Result := LowerCase(copy(s, 1, ps - 1));
end;

procedure TFormMain.WebBrowserBeforeNavigate2(Sender: TObject;
  const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
  Headers: OleVariant; var Cancel: WordBool);
var
  Prot, S: string;
begin
  S := URL;
  Prot := GetInternetProt(S);
  if Prot = 'myapp' then
  begin
    Delete(S, 1, Pos('://', S) + 2);

    Cancel := True; // den Link nicht vom IE bearbeiten lassen
    if S = 'quit' then Close
    else if S = 'Msg' then ShowMessage(Copy(S, 5, Length(S)));
  end;
end;

<a href="myapp://Msg Hallo!">Hallo anzeigen</a>
<a href="myapp://quit">Programm beenden</a>

_________________
Ist Zeit wirklich Geld?
alexschultze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 317



BeitragVerfasst: Fr 07.02.03 22:42 
könnt ihr für mich bitte noch mal die MyProg:// Variante erklären? Wäre echt nett.

_________________
Von allen Dingen die ich verloren habe trauere ich meinem Verstand am meisten nach.
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Sa 08.02.03 00:38 
Hi,

ich hab eben mal die Registry durchwühlt und einfach rumprobiert... :)
Hab es auch hinbekommen! *g*

Also... (Erstmal die normale Variante, programmieren sollteste selber schaffen *g*)

Ich mach das ganze mal an einem Beispiel für "Koshigaya Studios" mit "KoS:..." :)

Start -> Ausführen -> Regedit
Dann geh in "HKEY_CLASSES_ROOT" und erstell dort einen neuen Schlüssel (Ordner) und nennst ihn so wie dein Protokol heißen soll, also in meinem falle "KoS".

In diesem erstellst du einen String (Zeichenfolge!) und nennst ihn "URL Protocol", als wert bekommt er garnix.

Dem "(Standardt)"-String gibst du diesen Wert: "KoS: Koshigaya Studios Protocol" (kannst du nennen wie du willst)

Gut... jetzt erstellst du einen weiteren Ordner "shell", in diesem dann einen Ordner "open" und in diesem wieder einen Ordner "command".

Den Standardt-String in dem "command" Ordner gibst du dann den Wert von deinem PRogramm welches gestartet werden soll.

z.B. "C:\Programme\...\Koshigaya.exe %1"

%1 = Den Startparameter übergeben.

So, hoffe das hat dir geholfen :)

Au'revoir,
Aya~

_________________
Aya
I aim for my endless dreams and I know they will come true!
alexschultze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 317



BeitragVerfasst: Sa 08.02.03 11:34 
mh, das ist zwar ne genaue Beschreibung, aber könntest du mal bitte den Registry Zweig exportieren? *gg*
Schreib ihn einfach in dein nächstes Post (reg datei mit Texteditor öffnen)

und vielen Dank für deine Bemühungen! :)

_________________
Von allen Dingen die ich verloren habe trauere ich meinem Verstand am meisten nach.
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Sa 08.02.03 16:34 
Hi,

Windows Registry Editor Version 5.00 hat folgendes geschrieben:
[HKEY_CLASSES_ROOT\KoS]
@="Koshigaya Studios Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\KoS\shell]

[HKEY_CLASSES_ROOT\KoS\shell\open]

[HKEY_CLASSES_ROOT\KoS\shell\open\command]
@="C:\Programme\Koshigaya Studios\Koshigaya.exe %1"


Au'revoir,
Aya

_________________
Aya
I aim for my endless dreams and I know they will come true!
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 09.02.03 14:40 
wie man das dann in delphi umsetzt ist mir klar, aber wie kann ich denn dem standard schlüssel einen wert zuweisen ?? der haeisst ja z.b. auf nem englischen system default

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: So 09.02.03 15:58 
ausblenden Quelltext
1:
REG.WriteString('','BlaBla');					

So :)

_________________
Aya
I aim for my endless dreams and I know they will come true!
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 09.02.03 17:56 
danke

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Nuker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16



BeitragVerfasst: Mo 10.02.03 19:14 
Titel: DANKE !!!
Halli Hallo

Erstmal danke an alle!!! Habt mir wirklich sehr geholfen !!!

War genau das dabei was ich brauchte, also wenn Ihr mal ein Problem habt :wink: :wink: ...

Sodann, C YA @LL
[BD]Nuker|M.O.I.C.

P.S.: Wenn mein Prog fertig ist bekommt Ihr natürlich alle eine kostenlose Variante :wink: .. wird zwar eh Freeware aber eure ist noch kostenloser :lol: :lol:

C YA

_________________
C YA - [BD]Nuker|Zeus:XML
Beware - The Matrix has you!