Autor Beitrag
xilos
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Do 07.09.06 17:22 
soo schon mein 2ter post heute xD

ich glaube zusammen mit dem screenshot kann ich mein prob so einigermaßen erklärn ^^
also ich soll das so programmiern....wenn ich meine maus über den BUTTON2 bewege soll er verschwinden und wenn ich dann meine maus über en BUTTON1 bewege soll der BUTTON2 wieder sichtbar werden ^^
etwas kompliziert aber ich hoffe ihr könnt mir helfen ^^

thx jetzt schon mal


Moderiert von user profile iconGausi: Topic aus Off Topic verschoben am Do 07.09.2006 um 18:52
Einloggen, um Attachments anzusehen!
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 07.09.06 17:52 
Pack ein Button2.visible := False; ins OnMouseMove des einen Buttons, und ein Button2.visible := True; ins OnMouseMove des anderen.

_________________
We are, we were and will not be.
Senex
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 17

WinXP
Delphi 7 Pers, Delphi2005 Pers, Turbo Delphi, Turbo C++
BeitragVerfasst: Do 07.09.06 17:54 
Etwa so?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.Button1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  button2.visible := True;
end;

procedure TForm1.Button2MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  button2.visible := False;
end;


?

edit: Mist, zu spät. *grmblt*
xilos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Do 07.09.06 18:03 
senex??
thx schon mal für die antwort aber das funkt net ^^
der zeigt mir an dass in dieser PROCEED zeile ein fehler ist ^^

geht das auch noch etwas einfacher??xD
bin nämlich noch ganz neu in delphi und hab noch gar keine ahnun xD
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Do 07.09.06 18:06 
was für ein Fehler wird denn angezeigt?

btw: einfacher gehts nicht ;-)

_________________
We are, we were and will not be.
xilos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Do 07.09.06 18:08 
da kommt kein feld...da is einfach diese procedurezeilte rot markiert ^^
xilos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Do 07.09.06 18:09 
ah hab die fehlermeldung gefunden xD


[Error] Unit1.pas(36): Undeclared identifier: 'Button1MouseMove'
[Error] Unit1.pas(36): ';' expected but '(' found
[Error] Unit1.pas(39): Undeclared identifier: 'button2'
[Error] Unit1.pas(42): Undeclared identifier: 'Button2MouseMove'
[Error] Unit1.pas(42): ';' expected but '(' found
[Error] Unit1.pas(45): Undeclared identifier: 'button2'
[Error] Unit1.pas(48): Declaration expected but end of file found
[Error] Unit1.pas(22): Unsatisfied forward or external declaration: 'TForm1.Button1Click'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Do 07.09.06 18:11 
wie schaut denn dein quelltext bist jetzt aus?
xilos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Do 07.09.06 18:12 
ausblenden volle Höhe Delphi-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:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Edit1: TEdit;
    Button1: TButton;
    Button3: TButton;
    Button2: TButton;
    Bevel1: TBevel;
    Memo1: TMemo;
    Memo2: TMemo;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  button2.visible := True;
end;

procedure TForm1.Button2MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  button2.visible := False;
end;


Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt
Senex
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 17

WinXP
Delphi 7 Pers, Delphi2005 Pers, Turbo Delphi, Turbo C++
BeitragVerfasst: Do 07.09.06 18:15 
Du musst erst den Button markieren, im Objektinspektor auf "Ereignisse" gehen und da das Ereignis "OnMouseMove" raussuchen. Rechts daneben ist ein leeres Feld, da machst du am besten einen Doppelklick drauf. Du kommst zum Quelltext und solltest etwas wie
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Button1MouseMove(Sender: TObject; Shift: TShiftState; X, 
  Y: Integer); 
begin 
 
end;


sehen.
Zwischen begin und end kommt dann das "button2.Visible := True;"
Dann markierst du deinen Button2, gehst wieder auf Ereignisse, Doppelklick auf das Eingabefeld neben "OnMouseMove", kommst wieder zum Quelltext, und gibst diesmal zwischen begin und end "button2.visible := False;" ein.
Danach sollte es klappen ;-)
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Do 07.09.06 18:17 
und bitte benutz das nächste mal
die code-tags " [delphi] Dein Code [/delphi] "

Marc ;)
xilos Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Do 07.09.06 18:19 
thx allen...habs hinbekommen ^^
oldmax
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 380


D3 Prof, D4 Prof
BeitragVerfasst: Do 07.09.06 18:23 
Hi
Wenn du ein Button auf deine Form gezogen hast und den Objektinspektor angezeigt bekommst, das ist dieses Feld meist neben der Form (manchmal auch dahinter...) klickst du erst mal auf dein Button. Im Kopf vom Objektinspektor erscheint nun der Name des Buttons. Nun gehst du auf die Registerseite Ereignisse und suchst das Ereignis OnMouseMove. Das Feld rechts daneben ist frei und da machst du einen Doppelclick hinein. Und voalla da isse, deine OnMouseMove-Ereignisprocedure.
Und nun kannst du den vorgesschlagenen Code hineinschreiben, aber bitte nur den Inhalt der Procedure, nicht den ganzen Code. Der Inhalt ist der Code zwischen Begin und End.


Ich bin einfach nich schnell genug, sorry für die Wiederholung.
Gruß oldmax

_________________
Zier dich nich so, ich krieg dich schon....