Forum | | | | holmol93 | Hello together
time again a very eigensinnige question... oO How is it possible, in a Program several Window/dialogs at the same time in the Fokus to have circa zB with the Dialogfenstern, The in the background lying, too Inputs make to and not first always the each upper close To must?
example would zB, that one The Artikelverwaltung and a Auftragsfenster open has and both works can... means as much as you want Window open has and any Inputs against take can...
in a, How I the very describe can... have in the attachment time my derzeitiges Spassprojekt appended, with all Datenbankfiles, the View source and of/ one vorkompilierten Exe to that testing... Perhaps can it itself then rather present... momentarily functions always only the window, which is in foreground...
Testaccounts:
PW: 3333 - user with very few Rechten PW: 98553 - my Account with so quite all Rechten. The can variable zuteilen over MitarbeiterMaster.
has yet quite a few Bugs, shows my trouble but right well... Gruess, danny |
| | | | |
| | Julian Schmidt | You could through WindowFromPoint the deal under the mouse detect. and any Tasteneingaben on the window weiterleiten.
here one integrally primitives example.
Def @GetParent(1) !"User32","GetParent"
CLS
Declare hhdl&
Create("Button",%hwnd,"test",10,10,200,30)
While 1
WaitScan
hhdl&=HandleHover()
If (GetParent(hhdl&)=%hwnd) or (hhdl&=%hwnd)
If %ScanKey=8
Settext hhdl&,Mid$(Gettext$(hhdl&),1,Len(Gettext$(hhdl&))-1)
Else
Settext hhdl&,Gettext$(hhdl&)+Inkey$()
EndIf
Endif
EndWhile
Proc HandleHover
Declare mpos#
Dim mpos#,8
External("user32","GetCursorPos",mpos#)
Var hdl&=External("USER32","WindowFromPoint",long(mpos#,0),long(mpos#,4))
Dispose mpos#
Return hdl&
ENDPROC
|
| | | | |
| | Julian Schmidt | Have time your View source angeschaut.
i'm noticed that you in the Procedur "accessrights" 45 durchnummerierte variables for your Rechterverwaltung verwendest. Leichter would here The usage one Arrays.
|
| | | | |
| | holmol93 | Heyhoo
because of your first response: I must me whom View source time very look at, in the momentum understand I there only railway-station hihi my Programmierkenntnisse are still right dull, particularly if it circa systemnahe functions goes... must me time by the Befehlsregister durchwühlen, what each instruction of it very bewirkt
to the Rechtezuteilung:
Hehe, there having wirs again ;) I known To even not even, what Arrays are, therefore Have I me so moreover helped, as me then in whom sense come is but I know, that some functions not yet straight meaningfully, geschweige because performant umgesetzt are... by then becomes yet some waters over the Rhein weg ;)
in the momentum would like I first once whom Mehrfensterbetrieb into handle get... because without is the whole software very with difficulty To bedienen^^ (so one in the Auftragsübersicht ditto a Overview over any item overlay can, without any Window first To close, have I me yet with a Hotkey beholfen (F1) , the a small Dialogue with all Artikeln einblendet)
Greetz,
danny |
| | | | |
| | Julian Schmidt | Vieleicht can you time one minimalistisches example post.what aufzeigt How your Fensterbetrieb straight looks. and subsequently describe How You you whom Mehrfensterbetrieb vorstellst.
I faith here none pleasure a Tausendzeilen-code durchzusuchen. and i'm too not yet clear what You eig want. |
| | | | |
| | holmol93 | Ah means:
I refer me thereby always on our Access basierendes Datenbanksystem in the deal. I can so many Formulare open having, How i will, once How I of a in that others Window wechsle, can I Inputs make.
by me ists Yes now grade so: You want a order search. means gehtst You zB into Kundendaten, dial as a customers from. The Kundendetails open itself. From there click You on a order. The order opens itself. now having we 3 Window open. I can however, without first any "übergeordneten" in the Order To close, not simply such a thing in the Kundenübersicht make. clicking goes already, however reacted nothing, solang How the Auftragsfenster active is.
I have there already rumprobiert with the different Fensterstilen, I meant have, it's located on the Dialogfensterstil. But if the so would, could I Yes in the %HWND nevertheless Inputs distinguished, what however neither possible is
Gruess, danny |
| | | | |
| | Julian Schmidt | I go of it from that you for each Window a Loop have, in the You The for the Window important terms abgefragst. once the window closed becomes, becomes The Abbruchbedingung active and the program jumping into untergeordnete Loop the untergeordenten Window. subsequently go ditto only The for this Window important terms quizzed.
so You too any Bedingugen all Window at the same time inquire can, must any terms naturally too in a Loop lying. Allternativ shift You any terms in a function and call tappt im dunkeln in eachone individual Loop on.
the first would with reference on tidy code The better Solution. |
| | | | |
| | Thomas Freier | in the principle can it Yes x-arbitrary Window over 28.14 - Multiprozessing with XProfan open , Edit, left lying let and close. with whom DBFs should these then vorsichtshalber always only to that Datenlesen and -Save over @db("Open", #n,s) active his. be I do not sure, whether it at Multiprozessing otherwise To Problemen comes, if two Prozessen hereon zurückgegriffen becomes. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 07/28/13 ▲ |
| |
| | H.Brill | Perhaps is too one TabControl take off you ? there can the still beautiful chid. and one need only a only incident-Loop. one must only pay attention, which Button/Control in which Window heard. Have here something prepared. Please korrigiert me, if what wrong his ought to :
Declare Dlg1&, Dlg2&, Dlg3&, tabctrl&, Reiter&
Declare edit1&, edit2&, edit3&, edit4&, edit5&, btn1&, btn2&, btn3&, lb&
Window Title "Mein Fenster"
Window 800, 600
tabctrl& = Create("TabCtrl", %HWnd, "Kunden", 5, 10, 730, 550)
' tab lay out
@InsertTab(tabctrl&, 3, "Artikel")
@InsertTab(tabctrl&, 2, "Rechnungen")
Window Style 1024
' 1. dialog
Dlg1& = @Create("Window",tabctrl&,"Kunden Verwaltung",10, 60, 700, 480)
edit1& = @Create("Edit", Dlg1&, "", 10, 10, 120, 25)
edit2& = @Create("Edit", Dlg1&, "", 10, 40, 120, 25)
btn1& = @Create("Button", Dlg1&, "Kopiere", 10, 80, 60, 25)
lb& = @Create("ListBox", Dlg1& , 1, 10, 120, 120, 180)
AddStrings(lb&, "Maier")
AddStrings(lb&, "Müller")
AddStrings(lb&, "Schmitt")
' 2. dialog
Dlg2& = @Create("Window",tabctrl&,"Artikel Verwaltung",10, 60, 700, 480)
btn2& = @Create("Button", Dlg2&, "Test2", 10, 10, 60, 25)
edit3& = @Create("Edit", Dlg2&, "", 10, 50, 120, 25)
edit4& = @Create("Edit", Dlg2&, "", 10, 80, 120, 25)
' 3. dialog
Dlg3& = @Create("Window", tabctrl&, "Rechnungs Erstellung", 10, 60, 700, 480)
edit5& = @Create("Edit", Dlg3&, "", 10, 10, 240, 25)
btn3& = @Create("Button", Dlg3&, "Test 3", 10, 50, 80, 25)
ShowWindow(Dlg2&, 0)
ShowWindow(Dlg3&, 0)
SetWindowPos Dlg1& = %WinLeft + 20, %WinTop + 100; 0
While 1
WaitInput
Reiter& = @GetActiveTab(tabctrl&)
If @TabChanged(tabctrl&)
'Reiter& = @GetActiveTab(tabctrl&)
Select Reiter&
CaseOf 0
ShowWindow(Dlg1&, 1)
ShowWindow(Dlg2&, 0)
ShowWindow(Dlg3&, 0)
SetWindowPos Dlg1& = %WinLeft + 20, %WinTop + 100; 0
CaseOf 1
ShowWindow(Dlg2&, 1)
ShowWindow(Dlg1&, 0)
ShowWindow(Dlg3&, 0)
SetWindowPos Dlg2& = %WinLeft + 20, %WinTop + 100; 0
CaseOf 2
ShowWindow(Dlg3&, 1)
ShowWindow(Dlg1&, 0)
ShowWindow(Dlg2&, 0)
SetWindowPos Dlg3& = %WinLeft + 20, %WinTop + 100; 0
EndSelect
EndIf
Case %Key = 2 : Break
If @Clicked(btn1&)
'MessageBox("Button in customers management clicked !", "Info", 0)
SetText edit5&, GetString$(lb&, GetCurSel(lb&))
ElseIf @Clicked(btn2&)
MessageBox("Button in item management clicked !", "Info", 0)
ElseIf @Clicked(btn3&)
MessageBox("Button in Rechnungs Creation clicked !", "Info", 0)
EndIf
EndWhile
End
|
| | | Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 07/29/13 ▲ |
| |
| | Julian Schmidt | it power Yes in the principle absolute none Difference whether The Controls on a TabControl or a Window lying. the important is, the any terms in a Loop lying. or by Muliprozessing at the same time quizzed go can.
i think of Handling since wären ChildWindows yet the simplest. can you you Yes time look at. |
| | | | |
| | Thomas Freier | Perhaps meets this example the sought.
$H windows.ph
$H messages.ph
User Messages 16
DEF SysParameterInfo(4) ! "user32","SystemParametersInfoA"
Declare WX%,WY%,WL%,WB%
Declare item&,x%
Declare Win1&,W1Edit1&,W1Edit2&,W1Grid1&,W1End&,W1NeuSp&
Declare Win2&,W2Edit1&,W2Edit2&,W2End&
'suitor Desktopbereich
Declare Rect#
Dim Rect#,16
SysParameterInfo(48,0,Rect#,0)
wx%=Long(Rect#,0)
wy%=Long(Rect#,4)
wl%=Long(Rect#,8)
wb%=Long(Rect#,12)
Dispose Rect#
Window wx%,wy% - wl%,wb%
Windowtitle "Hauptfenster"
Cls ~Getsyscolor(15)
Setdialogfont ~Getstockobject(~Default_gui_font)
PopUp "&Daten"
AppendMenu 100,"&Kunden"
AppendMenu 200,"&Auftrag"
While 1
Waitinput
If %UMessage = 16
case GetActiveWindow()=%hwnd:Break
If GetActiveWindow()=Win1&
DestroyWindow(Win1&)
Win1&=0
subclass Win1&,0
setfocus(%hwnd)
ElseIf GetActiveWindow()=Win2&
DestroyWindow(Win2&)
Win2&=0
subclass Win2&,0
setfocus(%hwnd)
EndIf
EndIf
Case MenuItem(100) AND (Win1&=0): KUNDEN
Case MenuItem(200) AND (Win2&=0): AUFTRAG
Endwhile
subclass Win1&,0
subclass Win2&,0
End
subClassProc
If SubClassMessage(win1&, ~WM_NOTIFY)
If clicked(W1End&)
DestroyWindow(Win1&)
Win1&=0
subclass Win1&,0
setfocus(%hwnd)
ElseIf getfocus(W1NeuSp&)
x%=Messagebox("Daten Save?","Hinweis",32+4)
case x%=6:AddStrings(W1Grid1&, Gettext$(W1Edit1&)+"|"+Gettext$(W1Edit2&))
setfocus(W1Grid1&)
ElseIf Long(&sLParam,8)=-3' Double click left
item&=Long(&sLParam,12)
If item&<>-1
If Win2&>0
Settext W2Edit1&, Gettext$(W1Grid1&, item&, 0)
Settext W2Edit2&, Gettext$(W1Grid1&, item&, 1)
endif
EndIf
EndIf
EndIf
If SubClassMessage(win2&, ~WM_NOTIFY)
If clicked(W2End&)
DestroyWindow(Win2&)
Win2&=0
subclass Win2&,0
setfocus(%hwnd)
EndIf
EndIf
ENDPROC
Proc KUNDEN
Win1&=Create("Window",%hwnd,"Kunden",10,10,340,430)
W1Grid1&=Create("GridBox", Win1&, "Name;0;180;Vorname;0;100", 1, 10, 10, 300, 190)
AddStrings(W1Grid1&, "Meyer|Klaus")
AddStrings(W1Grid1&, "Peter|Peter")
AddStrings(W1Grid1&, "Klein|Fritz")
Create("Tooltip",%hwnd,W1Grid1&,"in whom order by Doppelklick")
Create("Text",Win1&,"Name",10,210,80,20)
Create("Text",Win1&,"Vorname",10,235,80,20)
W1Edit1&=Create("EDIT",Win1&,"",100,210,120,20)
W1Edit2&=Create("EDIT",Win1&,"",100,235,120,20)
W1NeuSp&=Create("Button",Win1&,"Eingabe speichern",10,310,120,22)
W1End&=Create("Button",Win1&,"Schließen",200,310,80,22)
subclass Win1&,1
ENDPROC
Proc AUFTRAG
Win2&=Create("Window",%hwnd,"Auftrag",510,10,340,430)
W2Edit1&=Create("EDIT",Win2&,"",10,50,120,20)
W2Edit2&=Create("EDIT",Win2&,"",10,75,120,20)
W2End&=Create("Button",Win2&,"Schließen",200,310,80,22)
subclass Win2&,1
ENDPROC
|
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 07/31/13 ▲ |
| |
|
AnswerThemeninformationenthis Topic has 4 subscriber: |