AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi 'Enter' simulieren ;)
Thema durchsuchen
Ansicht
Themen-Optionen

'Enter' simulieren ;)

Ein Thema von KyroxX · begonnen am 12. Okt 2003 · letzter Beitrag vom 12. Okt 2003
Antwort Antwort
Seite 1 von 2  1 2      
KyroxX

Registriert seit: 25. Aug 2003
Ort: Internet
52 Beiträge
 
#1

'Enter' simulieren ;)

  Alt 12. Okt 2003, 11:24
Moin mal wieder

Ich möchte mein Forumlar automatisch absenden und denke mal das das am einfachsten geht, indem ich ein 'Enter' simuliere

Ich habs schon mit 'chr(10)' und 'Key=#13' usw probiert aber irgendiwe hautz nicht hin ^^

Gibts noch ne andre Möglichkeit ein Formular zu 'Submitten' ?

Gr33z,
KyroxX
  Mit Zitat antworten Zitat
Benutzerbild von kiar
kiar

Registriert seit: 2. Aug 2003
Ort: Aschersleben
1.362 Beiträge
 
Delphi 5 Professional
 
#2

Re: 'Enter' simulieren ;)

  Alt 12. Okt 2003, 11:29
du hast aber schon das keypressevent belegt,oder?
  Mit Zitat antworten Zitat
ATwardz

Registriert seit: 12. Mai 2003
205 Beiträge
 
Delphi 7 Professional
 
#3

Re: 'Enter' simulieren ;)

  Alt 12. Okt 2003, 11:31
Hi, weiss nicht ob dir das was hilft bei deinem Vorhanben!

Das habe ich in der Delphi 6 Hilfe gefunden,

A KeyDown method is a protected method for a control’s OnKeyDown event. The control itself calls KeyDown in response to a Windows key-down message. When overriding the inherited KeyDown method, you can include code that provides other responses in addition to calling the OnKeyDown event.
To override KeyDown, follow these steps:

1 Add a KeyDown method to the TDBCalendar class:
[/delphi]
type

TDBCalendar = class(TSampleCalendar);
...
protected
procedure KeyDown(var Key: Word; Shift: TShiftState; X: Integer; Y: Integer);
override;
...
end;
[/delphi]
2 Implement the KeyDown method:
Delphi-Quellcode:
procedure KeyDown(var Key: Word; Shift: TShiftState);

var
  MyKeyDown: TKeyEvent;
begin
  if not ReadOnly and (Key in [VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT, VK_END,
    VK_HOME, VK_PRIOR, VK_NEXT]) and FDataLink.Edit then
    inherited KeyDown(Key, Shift)
  else
  begin
    MyKeyDown := OnKeyDown;
    if Assigned(MyKeyDown) then MyKeyDown(Self, Key, Shift);
  end;
end;
When KeyDown responds to a mouse-down message, the inherited KeyDown method is called only if the control’s ReadOnly property is False, the key pressed is one of the cursor control keys, and the datalink object is in edit mode, which means the field can be edited. If the field cannot be edited or some other key is pressed, the code the programmer put in the OnKeyDown event handler, if one exists, is executed.

Damit kann man den die keydown methode verallgemeinert!

@wardz
  Mit Zitat antworten Zitat
Benutzerbild von kiar
kiar

Registriert seit: 2. Aug 2003
Ort: Aschersleben
1.362 Beiträge
 
Delphi 5 Professional
 
#4

Re: 'Enter' simulieren ;)

  Alt 12. Okt 2003, 11:38
sorry hatte etwas wenig schlaf. schau mal hier
http://www.delphipraxis.net/internal...ht=sendmessage
  Mit Zitat antworten Zitat
KyroxX

Registriert seit: 25. Aug 2003
Ort: Internet
52 Beiträge
 
#5

Re: 'Enter' simulieren ;)

  Alt 12. Okt 2003, 12:34
Hmm ich habs mal so probiert:

'But' ist der Name für den Button.
Keypress 10 oder 13?! ist Enter...

webbrowser1.OleObject.document.forms.item(0).elements.item('but').KeyPress(10); Das sollte doch gehen?!

Bekomme aber immer die Meldung:
"Method "Keypress" not supported by automation object"

Und ich habs auch schon mit:

webbrowser1.OleObject.document.forms.item(0).elements.item('but').Keybd_Event(VK_RETURN, 0, 0, 0); und so auch:

webbrowser.OleObject.document.forms.item(0).elements.item('but').KeyDown(VK_RETURN); Aber es will einfach nciht :/ *verzweifel*
Gr33z,
KyroxX
  Mit Zitat antworten Zitat
Benutzerbild von Sharky
Sharky

Registriert seit: 29. Mai 2002
Ort: Frankfurt
8.251 Beiträge
 
Delphi 2006 Professional
 
#6

Re: 'Enter' simulieren ;)

  Alt 12. Okt 2003, 12:37
Hai KyroxX,

da Du deine Frage in "Internet/IP/LAN" gepostest hast denke ich Du möchtest das ENTER bei einer WEB-Seite simmulieren.
Ich glaube das hatten wir schon einmal im Forum. Suche mal nach Button und WEB-Seite.
Stephan B.
"Lasst den Gänsen ihre Füßchen"
  Mit Zitat antworten Zitat
KyroxX

Registriert seit: 25. Aug 2003
Ort: Internet
52 Beiträge
 
#7

Re: 'Enter' simulieren ;)

  Alt 12. Okt 2003, 12:40
oki mal sehen
Gr33z,
KyroxX
  Mit Zitat antworten Zitat
Benutzerbild von Sharky
Sharky

Registriert seit: 29. Mai 2002
Ort: Frankfurt
8.251 Beiträge
 
Delphi 2006 Professional
 
#8

Re: 'Enter' simulieren ;)

  Alt 12. Okt 2003, 12:44
Zitat von KyroxX:
oki mal sehen
Hai KyroxX,

guckst Du hier


[NACHTRAG]
Das Zauberwort ist wohl WebForm.Submit
Stephan B.
"Lasst den Gänsen ihre Füßchen"
  Mit Zitat antworten Zitat
KyroxX

Registriert seit: 25. Aug 2003
Ort: Internet
52 Beiträge
 
#9

Re: 'Enter' simulieren ;)

  Alt 12. Okt 2003, 13:01
Ja-NE das Zauberwort heisst bei mit eher
uses mshtml

guggst du in activX control und installierst HTML Objects Libary und trotzdem
holt debugga seine bruda ^^



Langsam nervt mich das
Um die mshtml unit zu nutzen muss ich da noch mehr activx zeugs installen als
Internet Controls und HTML Objects?

Ich hab auch mal mit "Forms 2.0 Libary" liebgeäugelt aber der meckert wegen ner DB unit
Gr33z,
KyroxX
  Mit Zitat antworten Zitat
KyroxX

Registriert seit: 25. Aug 2003
Ort: Internet
52 Beiträge
 
#10

Re: 'Enter' simulieren ;)

  Alt 12. Okt 2003, 14:49
ok, habs jetzt *lol* unit hieß MSHTML_TLB nicht mshtml :p

Hmm, aber ich bekomm immernoch den gleichen fehler ^^

"Method "webform" not supported by automation object"

chaosbrowser.OleObject.document.forms.item('f').elements.item('but').WebForm.submit;
p.s.: Wenn ich des Webform.submit; so reinbaue hagelt es auch fehler ...
Gr33z,
KyroxX
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:04 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz