Autor Beitrag
chrisx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Sa 04.12.04 20:12 
hi, ich habe ein programm geschrieben, dass maximiert gestartet wird (es füllt also den ganzen bildschirm aus.
das soll auch so bleiben, aber dennoch möchte ich ein mainmenü haben.
das mainmenü soll erscheinen, wenn ich mit der maus an den oberen bildschirmrand fahre.
wenn ich mit der maus wieder weggehe , soll das mainmenü wieder verschwinden.

kann mir jemand helfen?
wäre sehr dankbar.

ps. ich hoffe ich habe meie frage verständlich geschrieben ;-)
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Sa 04.12.04 20:51 
Pack das Menü in eine Toolbar und nimm das OnMouseMove-Event der Form her (Mauskoordinaten abfragen). Ist zwar unschön, aber es müsste funktionieren ;)

AXMD
chrisx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Sa 04.12.04 21:06 
geht das nicht auch einfacher?
ich bin nämlich delphi anfänger.

aber trotzdem danke für deinen tipp
herzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 168

WINXP pro, SUSE Linux 9.0
D7 Pers.
BeitragVerfasst: Sa 04.12.04 21:33 
Sieht aber nicht gut aus...
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
var
  show:boolean;
  i:integer;
begin
  if y<10 then
    show:=true
  else
    show:=false;

  for i:=0 to Mainmenu1.Items.Count-1 do
    Mainmenu1.Items[i].Visible:=show;
end;
chrisx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81



BeitragVerfasst: Sa 04.12.04 21:51 
vielen dank.
so schlimm sieht es nicht aus (ich habe die toolbar so klein ,wie möglich gemacht).
und für meine anforderungen reicht es völlig.
(fast) genau so habe ich mir das vorgestellt.

ich habe den code nur etwas verändert:

vorher:
ausblenden Quelltext
1:
2:
3:
begin  
  if y<10 then  
    show:=true


nacher:
ausblenden Quelltext
1:
2:
3:
begin  
  if y<0.01 then
    show:=true



danke.
hiermit ist mein problem gelöst. ;-)
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Sa 04.12.04 21:55 
:shock: Deine Toolbar ist nur 0,01 Pixel groß :gruebel:

AXMD
StefanH
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1144

Win XP
D5 Standard, D7 Pers, D2005 Pers
BeitragVerfasst: Sa 04.12.04 22:03 
ist y nicht integer? :shock:

_________________
"Als es noch keine Computer gab, war das Programmieren noch relativ einfach."(Edsger W. Dijkstra)
"Ich bin nicht von Sinnen, sondern ich rede wahre und vernünftige Worte." (Paulus)