Autor Beitrag
ssb-blume
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 375
Erhaltene Danke: 7

XP, W7, W8
Deutschland
BeitragVerfasst: So 19.10.08 11:27 
Hallo, ich habe wieder mal ein Problem:

In Delphi gibt es die Komponente Webbrowser. Diese hat eine Methode
ExecWB(cmdID: OLECMDID; cmdexecopt: OLECMDEXECOPT; var pvaIn: OleVariant; var pvaOut: OleVariant);

Ich benutze den Befehl cmdID: OLECMDID_PRINT zum Drucken:
ausblenden Delphi-Quelltext
1:
2:
3:
 
  i:= Web1.QueryStatusWB(OLECMDID_Print);
  if i=3 then Web1.ExecWB(OLECMDID_Print, 0);   // angezeigte Vorschau drucken


Gebe ich statt der 0 eine 1 an, wird der Page Setup Dialog aufgerufen.
Dafür ist auch der Befehl
Web1.ExecWB(OLECMDID_PAGESETUP, cmdexecopt, ...)

zum Gestalten vorhanden.

Die Frage:
weiß jemand die OleVariant - Angaben für das automatische Setzen der Voreinstellungen?

Komme bei MS und Google zu keinem vernünftigen Ergebnis.

Danke!

Moderiert von user profile iconmatze: Delphi-Tags hinzugefügt

_________________
Brain: an apparatus with which we think we think.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 19.10.08 11:44 
Genaueres findest du in der Referenz im MSDN:
msdn.microsoft.com/e...aa769937(VS.85).aspx
ssb-blume Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 375
Erhaltene Danke: 7

XP, W7, W8
Deutschland
BeitragVerfasst: Mo 20.10.08 09:50 
Danke!
Die Arbeit dafür ist allerdings in exorbitante Größe gewachsen!
Ich dachte einfach, gib die Ole-Daten an und es hat sich-
Pustekuchen.
Wollte Java eigentlich vermeiden, das Programm soll auch auf
ganz kleinen Computern laufen :lol:

_________________
Brain: an apparatus with which we think we think.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 20.10.08 10:31 
Vielleicht ist es sinnvoll dir diese Alternative zum TWebBrowser anzuschauen:
pbear.com/
Soweit ich das sehe ist dort auch drucken möglich.
ssb-blume Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 375
Erhaltene Danke: 7

XP, W7, W8
Deutschland
BeitragVerfasst: Di 21.10.08 09:53 
Hi
Das ist genau das, was ich brauche und auch noch viel mehr!
Herzlichen Dank!

_________________
Brain: an apparatus with which we think we think.