• Im moment macht Profan ein DestroyWindow wenn kein Dialogstil vorliegt
    und das ist für mich inakzeptabel. Das Fenster sollte nur von Profan zerstört
    werden, wenn entsprechender Code vorliegt oder das Programm zuende ist.
    Der Anwender signalisiert durch drücken des Buttons, das er das Fenster
    schließen möchte und der Programmierer sollte darauf reagieren und nicht
    Profan!

    Abgesehen von Aufräumarbeiten ist es für das Programm evtl. günstiger das
    Fenster nur zu verstecken um ein erneutes Anzeigen zu beschleunigen usw.

    Mehr als eine neue Abbruchbedingung die unabhängig vom Stil funktoniert,
    Einsteigerfreundlich ist, ist doch nichts gefordert hier.

    Wobei mich persönlich stört es auch, irgendwelche Stile auszurechnen, wo
    ich jedesmal die Hilfe aufschlagen muß, weil es keine benannten Konstanten
    gibt, aber das ist eine andere Sache :D

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress, WoltLab & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

  • Für einige Windowstile in XProfan gibt es keine Entsprechung in Windows, benannte Konstanten wären also auch eine Eigenschöpfung. Außer dem Dialogstil gibt es noch andere Fensterstile. Auch da gibt es die, leider unvollkommende Möglichkeit, Schließanforderungen zu behandeln, ohne daß ein Destroy zwangsweise ausgeführt wird. Wenn das Fenster nur verborgen werden soll, warum nicht. Aber eine einheitliche vom Stil unabhängige Behandlung der Schließanforderung wäre für eine künftige Version schon wünschenswert.

    Gruß Volkmar

  • Hallo,
    habe da ein Riesen Problem!

    wenn ich in mein Prog so starte.

    Code
    '======================= HAUPTPROGRAMM =================================
    WindowStyle 11
    Set("TrueColor", 1)
    WindowTitle Programm_Info$
    Window (%MaxX + 20),0 - PosX2(%MaxX), PosY2(%MaxY)
    Usermessages ~wm_close 'damit ich das Schlissen im Hauptfenster abfangen kann
    '-WindowBackground
    '-----------------------------------------------------------------------
    CLS ~GetSysColor(~Color_BtnFace)
    '**************************************************************************************



    bleibt die EXE im den Prozessen hängen und 100% CPU Auslastung.
    Mein Programm ist beendet das Fenster ist zerstört und nun? :evil:

    [Blockierte Grafik: http://s15.postimage.org/o98y8w4fr/Prozesse.jpg]

    Benutz ich WindowStyle 523 ist alles OK8O

    Gerd
    Windows 8 - 7 - 64 -32Bit XP XProfanX2 12.1-NT

  • Mano mit 512

    geht ShowWindow(Fenster&,3) nicht

    Code
    'Prüfen ob das Programm schon ausgeführt wird, wenn ja in den Vordergrund im Vollbild Modus setzen, oder eben  ausführen!
    $I Programm_im_Speicher.inc
    IF Check_doppelstart("VerwaltungundAuswertungsplaner") = 0
      MessageBox("Das Programm ist schon aktiv","Verwaltung und Auswertungsplaner",16)
      CloseHandle(Mutex&)
      var Fenster& = MyFindWindow(Programm_Info$)
      Dispose FindWindowFlags#
      ShowWindow(Fenster&,3)
      End
    endif



    Das ist doch zu Mäusemelken.

    Gerd
    Windows 8 - 7 - 64 -32Bit XP XProfanX2 12.1-NT

  • Hallo ich noch mal,

    Ich habe NICHT DestroyWindow und ShowWindow gleichzeitig benutzt!!!

    Gerd
    Windows 8 - 7 - 64 -32Bit XP XProfanX2 12.1-NT

  • Hallo Gerd,

    Du solltest Dir angewöhnen, nur ausführbare Codes hier zu posten,
    ansonsten ist es nur selten möglich und sehr umständlich, den
    Fehler zu finden.

    Zu lange Codes solltest Du soweit kürzen, das sie weiterhin Ausführbar sind
    und den Fehler reproduzieren, aber keine unnötigen Elemente enthalten.

    Sollten DLLs zur reproduktion des Fehlers unabdingbar sein, so sollte Dein
    Posting links enthalten, wo man diese Laden kann (dasselbe gilt für Bilder
    usw.)

    In Deinem vorletztem Post kann ich mangels Ausführbarkeit nur folgendes
    erkennen:

    Code
    var Fenster& = MyFindWindow(Programm_Info$)
    Dispose FindWindowFlags#   
    ShowWindow(Fenster&,3)

    Fenster& wird nicht auf <> 0 getested, das ist "stümperhaft" ;)

    Solche Dinge müssen immer überprüft werden!

    Ich hoffe Du nimmst mir das jetzt nicht krumm, aber das mußte mal gesagt werden ;)
    und mit dem nächsten geposteten Source kann man hoffentlich
    mehr anfangen.

  • Hallo Thomas,

    Ne ne ich bin sogar froh über Kritik und Anregungen von euch denn nur so kann ich lernen!

    Webpage Frabbing Listview.dll und ProSpeed.dll

    Sebastian's Profan² Page SKControl.dll

    Zitat

    Zu lange Codes solltest Du soweit kürzen, das sie weiterhin Ausführbar sind
    und den Fehler reproduzieren, aber keine unnötigen Elemente enthalten.



    Hab ich mal versucht!

    Wie geschrieben als EXE beim Auslesen_Sichern „in dieser Einstellung MSN Debuger“!

    Code
    [/FONT][/COLOR][COLOR=black][FONT=Verdana]$H windows.ph[/FONT][/COLOR][FONT=Verdana][COLOR=black]$H messages.ph[/COLOR][/FONT][FONT=Verdana][COLOR=black]$H Structs.ph[/COLOR][/FONT][COLOR=black][FONT=Verdana]Def Createmutex(3) !"KERNEL32","CreateMutexA"[/FONT][/COLOR][FONT=Verdana][COLOR=black]Def CloseHandle(1) !"KERNEL32","CloseHandle"[/COLOR][/FONT][FONT=Verdana][COLOR=black]Def GetSysColor(1) !"USER32","GetSysColor"[/COLOR][/FONT] [FONT=Verdana][COLOR=black]Struct enumflags = Titel$(260), hWnd&[/COLOR][/FONT][FONT=Verdana][COLOR=black]Declare FindWindowFlags#,Mutex&,Programm_Info$[/COLOR][/FONT][FONT=Verdana][COLOR=black]Dim FindWindowFlags#, enumflags[/COLOR][/FONT][FONT=Verdana][COLOR=black]Programm_Info$ = "Test Programm"[/COLOR][/FONT][FONT=Verdana][COLOR=black]' *M Proc's[/COLOR][/FONT][FONT=Verdana][COLOR=black]Proc Check_doppelstart[/COLOR][/FONT][FONT=Verdana][COLOR=black]Parameters Mutex&,Name$ ' Mutexname[/COLOR][/FONT][FONT=Verdana][COLOR=black]Declare Error&[/COLOR][/FONT][FONT=Verdana][COLOR=black]Var fm& = Set("FastMode", 1)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Error& = %WinError[/COLOR][/FONT][FONT=Verdana][COLOR=black]Mutex& = Createmutex(0,1,Addr(Name$))[/COLOR][/FONT][FONT=Verdana][COLOR=black]Error& = %WinError[/COLOR][/FONT][FONT=Verdana][COLOR=black]Set("FastMode", fm&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]If Error& = 183[/COLOR][/FONT][FONT=Verdana][COLOR=black] Return 0[/COLOR][/FONT][FONT=Verdana][COLOR=black]Endif[/COLOR][/FONT][FONT=Verdana][COLOR=black]Return 1[/COLOR][/FONT][FONT=Verdana][COLOR=black]Endproc[/COLOR][/FONT][FONT=Verdana][COLOR=black]Proc EnumWindows[/COLOR][/FONT][FONT=Verdana][COLOR=black]Parameters hWnd&, lParam&[/COLOR][/FONT][FONT=Verdana][COLOR=black]If Not(~IsWindowVisible(hWnd&)) ' unsichtbare Fenster ignorieren[/COLOR][/FONT][FONT=Verdana][COLOR=black] Return 1[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndIf[/COLOR][/FONT][FONT=Verdana][COLOR=black]If Instr(FindWindowFlags#.Titel$, GetText$(hWnd&))[/COLOR][/FONT][FONT=Verdana][COLOR=black] FindWindowFlags#.hWnd& = hWnd&[/COLOR][/FONT][FONT=Verdana][COLOR=black] Return 0[/COLOR][/FONT][FONT=Verdana][COLOR=black]Else[/COLOR][/FONT][FONT=Verdana][COLOR=black] Return 1[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndIf[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndProc[/COLOR][/FONT][FONT=Verdana][COLOR=black]Proc MyFindWindow[/COLOR][/FONT][FONT=Verdana][COLOR=black]Parameters Titel$[/COLOR][/FONT][FONT=Verdana][COLOR=black]FindWindowFlags#.Titel$ = Titel$[/COLOR][/FONT][FONT=Verdana][COLOR=black]FindWindowFlags#.hWnd& = 0[/COLOR][/FONT][FONT=Verdana][COLOR=black]~EnumWindows(ProcAddr("EnumWindows", 2), 0)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Return FindWindowFlags#.hWnd&[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndProc[/COLOR][/FONT][FONT=Verdana][COLOR=black]IF Check_doppelstart("TestTestTest") = 0[/COLOR][/FONT][FONT=Verdana][COLOR=black]MessageBox("Das Programm ist schon aktiv",Programm_Info$,16)[/COLOR][/FONT][FONT=Verdana][COLOR=black]CloseHandle(Mutex&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]var Fenster& = MyFindWindow(Programm_Info$)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Dispose FindWindowFlags#[/COLOR][/FONT][FONT=Verdana][COLOR=black]Case Fenster& <> 0 : ShowWindow(Fenster&,3)[/COLOR][/FONT][FONT=Verdana][COLOR=black]End[/COLOR][/FONT][FONT=Verdana][COLOR=black]endif[/COLOR][/FONT][FONT=Verdana][COLOR=black]'***********************************************************************************[/COLOR][/FONT][FONT=Verdana][COLOR=black]$P*[/COLOR][/FONT][FONT=Verdana][COLOR=black]@Set("ErrorLevel", 0)[/COLOR][/FONT][FONT=Verdana][COLOR=black]' *M Include-Dateien[/COLOR][/FONT][FONT=Verdana][COLOR=black]$I PROFALT.INC[/COLOR][/FONT][FONT=Verdana][COLOR=black]$I SKControl.inc[/COLOR][/FONT][FONT=Verdana][COLOR=black]$I Prospeed_Funktionen.inc[/COLOR][/FONT][FONT=Verdana][COLOR=black]$I Listview_Funktionen.inc[/COLOR][/FONT][FONT=Verdana][COLOR=black]Declare ProSpeed&,logo&,logoback&,logo2&,Fx&,Fy&,array1&,array2&,array3&,F_bereich#[/COLOR][/FONT][FONT=Verdana][COLOR=black]Declare lvdll&,Listview&,Bereich#,Bytes&,BZahl![/COLOR][/FONT][FONT=Verdana][COLOR=black]Declare Listview_Hintergrund&,Listview_Tätigkeit&,Bereich2#[/COLOR][/FONT][FONT=Verdana][COLOR=black]Declare string#,image#,RECT#,Arbeitsbereich_Max_X&,Arbeitsbereich_Max_Y&,TaskbarX&,TaskbarY&[/COLOR][/FONT][FONT=Verdana][COLOR=black]Declare SKCon$,SKCondll&,x&,ProgrammPfad$[/COLOR][/FONT][FONT=Verdana][COLOR=black]ProgrammPfad$ = $ProgDir + "[URL='file://\\Firma']\\Firma[/URL]"[/COLOR][/FONT][FONT=Verdana][COLOR=black]ChDir ProgrammPfad$[/COLOR][/FONT][FONT=Verdana][COLOR=black]Struct RECT = ~RECT[/COLOR][/FONT][FONT=Verdana][COLOR=black]Dim RECT#, RECT[/COLOR][/FONT][FONT=Verdana][COLOR=black]Dim string#,255[/COLOR][/FONT][FONT=Verdana][COLOR=black]Dim Bereich#,320[/COLOR][/FONT][FONT=Verdana][COLOR=black]Dim F_bereich#,512[/COLOR][/FONT] [FONT=Verdana][COLOR=black]' *M DLL-Dateien[/COLOR][/FONT][FONT=Verdana][COLOR=black]SKCondll& = usedll("SKControl.dll")[/COLOR][/FONT][FONT=Verdana][COLOR=black]SKCtrl_InitDll()[/COLOR][/FONT][FONT=Verdana][COLOR=black]ProSpeed&=usedll("ProSpeed.dll")[/COLOR][/FONT][FONT=Verdana][COLOR=black]lvdll&=usedll("Listview.dll")[/COLOR][/FONT][FONT=Verdana][COLOR=black]Proc CreateMainMenu[/COLOR][/FONT][FONT=Verdana][COLOR=black]Popup "&"[/COLOR][/FONT][FONT=Verdana][COLOR=black]AppendMenu 1,"&"[/COLOR][/FONT][FONT=Verdana][COLOR=black]Popup "&"[/COLOR][/FONT][FONT=Verdana][COLOR=black]AppendMenu 2,"&"[/COLOR][/FONT][FONT=Verdana][COLOR=black]Popup "&"[/COLOR][/FONT][FONT=Verdana][COLOR=black]AppendMenu 3,"&"[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndProc[/COLOR][/FONT][FONT=Verdana][COLOR=black]Proc Arbeits_bereich[/COLOR][/FONT][FONT=Verdana][COLOR=black]Parameters Dialog_Fenster&[/COLOR][/FONT][FONT=Verdana][COLOR=black]~GetClientRect(Dialog_Fenster&, RECT#)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Arbeitsbereich_Max_X& = Int(RECT#.Right& - RECT#.Left&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Arbeitsbereich_Max_Y& = Int(RECT#.Bottom& - RECT#.Top&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndProc[/COLOR][/FONT][FONT=Verdana][COLOR=black]Proc PosY1[/COLOR][/FONT][FONT=Verdana][COLOR=black]'Fenster Mittig[/COLOR][/FONT][FONT=Verdana][COLOR=black]Parameters Win_Y&[/COLOR][/FONT][FONT=Verdana][COLOR=black]~SystemParametersInfo(~SPI_GETWORKAREA, 0, Rect#, 0)[/COLOR][/FONT][FONT=Verdana][COLOR=black]TaskbarY& = ((%MaxY - (Rect#.Bottom& - Rect#.Top&)) \ 2 )[/COLOR][/FONT][FONT=Verdana][COLOR=black]var YMax& = %MaxY - TaskbarY&[/COLOR][/FONT][FONT=Verdana][COLOR=black]If Win_Y& > YMax&[/COLOR][/FONT][FONT=Verdana][COLOR=black] 'Grösser als Max[/COLOR][/FONT][FONT=Verdana][COLOR=black] Win_Y& =  0[/COLOR][/FONT][FONT=Verdana][COLOR=black]Else[/COLOR][/FONT][FONT=Verdana][COLOR=black] Win_Y& = (((%MaxY  - Win_Y&) \ 2) - TaskbarY&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Endif[/COLOR][/FONT][FONT=Verdana][COLOR=black]Return Win_Y&[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndProc[/COLOR][/FONT][FONT=Verdana][COLOR=black]Proc PosX1[/COLOR][/FONT][FONT=Verdana][COLOR=black]'Fenster Mittig[/COLOR][/FONT][FONT=Verdana][COLOR=black]Parameters Win_X&[/COLOR][/FONT][FONT=Verdana][COLOR=black]~SystemParametersInfo(~SPI_GETWORKAREA, 0, Rect#, 0)[/COLOR][/FONT][FONT=Verdana][COLOR=black]TaskbarX& = ((%MaxX - (RECT#.Right& - RECT#.Left&)) \ 2 )[/COLOR][/FONT][FONT=Verdana][COLOR=black]var XMax& = %MaxX - TaskbarX&[/COLOR][/FONT][FONT=Verdana][COLOR=black]If Win_X& > XMax&[/COLOR][/FONT][FONT=Verdana][COLOR=black] 'Grösser als Max[/COLOR][/FONT][FONT=Verdana][COLOR=black] Win_X& =  0[/COLOR][/FONT][FONT=Verdana][COLOR=black]Else[/COLOR][/FONT][FONT=Verdana][COLOR=black] Win_X& = (((%MaxX  - Win_X&) \ 2) - TaskbarX&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Endif[/COLOR][/FONT][FONT=Verdana][COLOR=black]Return Win_X&[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndProc[/COLOR][/FONT][FONT=Verdana][COLOR=black]Proc PosY2[/COLOR][/FONT][FONT=Verdana][COLOR=black]'Fenster Mittig[/COLOR][/FONT][FONT=Verdana][COLOR=black]Parameters Win_Y&[/COLOR][/FONT][FONT=Verdana][COLOR=black]~SystemParametersInfo(~SPI_GETWORKAREA, 0, Rect#, 0)[/COLOR][/FONT][FONT=Verdana][COLOR=black]TaskbarY& = (%MaxY - (Rect#.Bottom& - Rect#.Top&))[/COLOR][/FONT][FONT=Verdana][COLOR=black]var YMax& = %MaxY - TaskbarY&[/COLOR][/FONT][FONT=Verdana][COLOR=black]If Win_Y& > YMax&[/COLOR][/FONT][FONT=Verdana][COLOR=black] 'Grösser als Max[/COLOR][/FONT][FONT=Verdana][COLOR=black] Win_Y& =  YMax&[/COLOR][/FONT][FONT=Verdana][COLOR=black]Else[/COLOR][/FONT][FONT=Verdana][COLOR=black] 'alles im grünen Bereich[/COLOR][/FONT][FONT=Verdana][COLOR=black]Endif[/COLOR][/FONT][FONT=Verdana][COLOR=black]Return Win_Y&[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndProc[/COLOR][/FONT][FONT=Verdana][COLOR=black]Proc PosX2[/COLOR][/FONT][FONT=Verdana][COLOR=black]'Fenster Mittig[/COLOR][/FONT][FONT=Verdana][COLOR=black]Parameters Win_X&[/COLOR][/FONT][FONT=Verdana][COLOR=black]~SystemParametersInfo(~SPI_GETWORKAREA, 0, Rect#, 0)[/COLOR][/FONT][FONT=Verdana][COLOR=black]TaskbarX& = (%MaxX - (RECT#.Right& - RECT#.Left&))[/COLOR][/FONT][FONT=Verdana][COLOR=black]var XMax& = %MaxX - TaskbarX&[/COLOR][/FONT][FONT=Verdana][COLOR=black]If Win_X& > XMax&[/COLOR][/FONT][FONT=Verdana][COLOR=black] 'Grösser als Max[/COLOR][/FONT][FONT=Verdana][COLOR=black] Win_X& = XMax&[/COLOR][/FONT][FONT=Verdana][COLOR=black]Else[/COLOR][/FONT][FONT=Verdana][COLOR=black] 'alles im grünen Bereich[/COLOR][/FONT][FONT=Verdana][COLOR=black]Endif[/COLOR][/FONT][FONT=Verdana][COLOR=black]Return Win_X&[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndProc[/COLOR][/FONT][FONT=Verdana][COLOR=black]Proc Draw3DText[/COLOR][/FONT][FONT=Verdana][COLOR=black]Parameters x%,y%,x22%,y22%,Mitt%,factor%,text$[/COLOR][/FONT][FONT=Verdana][COLOR=black]Declare x1%,x2%,y1%,y2%[/COLOR][/FONT][FONT=Verdana][COLOR=black]Let x1%=Add(x%,factor%)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Let y1%=Add(y%,factor%)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Let x2%=Add(x1%,factor%)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Let y2%=Add(y1%,factor%)[/COLOR][/FONT][FONT=Verdana][COLOR=black]TextColor GetSysColor(14),-1[/COLOR][/FONT][FONT=Verdana][COLOR=black]DrawText x%,y%,x22%,y22%,text$,Mitt%[/COLOR][/FONT][FONT=Verdana][COLOR=black]TextColor GetSysColor(16),-1[/COLOR][/FONT][FONT=Verdana][COLOR=black]DrawText x2%,y2%,x22%,y22%,text$,Mitt%[/COLOR][/FONT][FONT=Verdana][COLOR=black]TextColor GetSysColor(15),-1[/COLOR][/FONT][FONT=Verdana][COLOR=black]DrawText x1%,y1%,x22%,y22%,text$,Mitt%[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndProc[/COLOR][/FONT][FONT=Verdana][COLOR=black]Proc Auslesen_Sichern[/COLOR][/FONT][FONT=Verdana][COLOR=black]'@DestroyWindow(%hWnd) 'alles OK[/COLOR][/FONT][FONT=Verdana][COLOR=black]'ShowWindow(%hWnd,0) 'Prozesse 100% CPU warum????[/COLOR][/FONT] [FONT=Verdana][COLOR=black]SKCtrl_DeInitDll()[/COLOR][/FONT][FONT=Verdana][COLOR=black]'Dll freigeben...[/COLOR][/FONT][FONT=Verdana][COLOR=black]Freedll SKCondll&[/COLOR][/FONT][FONT=Verdana][COLOR=black]Freedll lvdll&[/COLOR][/FONT][FONT=Verdana][COLOR=black]DeleteObject hBild&[/COLOR][/FONT][FONT=Verdana][COLOR=black]Dispose Bereich#[/COLOR][/FONT][FONT=Verdana][COLOR=black]Dispose F_bereich#[/COLOR][/FONT][FONT=Verdana][COLOR=black]Dispose RECT#[/COLOR][/FONT][FONT=Verdana][COLOR=black]' ProSpeed.dll[/COLOR][/FONT][FONT=Verdana][COLOR=black]If array1& > 0[/COLOR][/FONT][FONT=Verdana][COLOR=black] FreeFX(array1&)[/COLOR][/FONT][FONT=Verdana][COLOR=black] FreeFX(array2&)[/COLOR][/FONT][FONT=Verdana][COLOR=black] FreeFX(array3&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Endif[/COLOR][/FONT][FONT=Verdana][COLOR=black]FreeImage(logo&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]FreeImage(logo2&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]FreeImage(logoback&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Freedll ProSpeed&[/COLOR][/FONT][FONT=Verdana][COLOR=black]'##################[/COLOR][/FONT][FONT=Verdana][COLOR=black]@DestroyWindow(%hWnd) 'Programm stürzt ab und MSN Debugger Startet???[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndProc[/COLOR][/FONT][FONT=Verdana][COLOR=black]'======================= HAUPTPROGRAMM =================================[/COLOR][/FONT][FONT=Verdana][COLOR=black]WindowStyle 11[/COLOR][/FONT][FONT=Verdana][COLOR=black]Set("TrueColor", 1)[/COLOR][/FONT][FONT=Verdana][COLOR=black]WindowTitle Programm_Info$[/COLOR][/FONT][FONT=Verdana][COLOR=black]Window (%MaxX + 20),0 - PosX2(%MaxX), PosY2(%MaxY)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Usermessages ~wm_close[/COLOR][/FONT][FONT=Verdana][COLOR=black]CLS ~GetSysColor(~Color_BtnFace)[/COLOR][/FONT][FONT=Verdana][COLOR=black]'**************************************************************************************[/COLOR][/FONT][FONT=Verdana][COLOR=black]UseFont "Arial",16,0,0,0,0[/COLOR][/FONT][FONT=Verdana][COLOR=black]SetDialogFont 1[/COLOR][/FONT][FONT=Verdana][COLOR=black]CreateMainMenu[/COLOR][/FONT][FONT=Verdana][COLOR=black]var ColorH_R& = GetRValue(~GetSysColor(~Color_BtnFace))[/COLOR][/FONT][FONT=Verdana][COLOR=black]var ColorH_G& = GetGValue(~GetSysColor(~Color_BtnFace))[/COLOR][/FONT][FONT=Verdana][COLOR=black]var ColorH_B& = GetBValue(~GetSysColor(~Color_BtnFace))[/COLOR][/FONT][FONT=Verdana][COLOR=black]var Damy_Button& =   Create("BUTTON",%hwnd,"",0,0,0,0)[/COLOR][/FONT][FONT=Verdana][COLOR=black]UseFont "Arial",40,20,0,0,0[/COLOR][/FONT][FONT=Verdana][COLOR=black]SetDialogFont 1[/COLOR][/FONT][FONT=Verdana][COLOR=black]Draw3DText 10,85,(%MaxX - 300),130,1,1,"Ich Teste mal"[/COLOR][/FONT][FONT=Verdana][COLOR=black]UseFont "Arial",16,0,0,0,0[/COLOR][/FONT][FONT=Verdana][COLOR=black]SetDialogFont 1[/COLOR][/FONT][FONT=Verdana][COLOR=black]' Tab Tabcontrol erstellen[/COLOR][/FONT][FONT=Verdana][COLOR=black]'-----------------------------------------------------------------------[/COLOR][/FONT][FONT=Verdana][COLOR=black]var pic& = create("hPic", 0, "TOOLBAR")[/COLOR][/FONT][FONT=Verdana][COLOR=black]var himg&=Create("ImageList", 16, 16, pic&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]deleteobject pic&[/COLOR][/FONT][FONT=Verdana][COLOR=black]Arbeits_bereich %Hwnd[/COLOR][/FONT][FONT=Verdana][COLOR=black]var PageControl1& = Create("TabCtrl",%hwnd,himg&,10,165,(Arbeitsbereich_Max_X& - 30),(Arbeitsbereich_Max_Y& - 200))[/COLOR][/FONT][FONT=Verdana][COLOR=black]InsertTab(PageControl1&, 0, "Gerd",56)[/COLOR][/FONT][FONT=Verdana][COLOR=black]var hBild& = Create("HPIC", -1, "Daten\\TOOLBAR32.BMP")[/COLOR][/FONT][FONT=Verdana][COLOR=black]var ToolBar1&= Create("TOOLBAR", %hWnd, hBild&, 0, 32, 4000, 1)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Toolbar("AddTextButton",ToolBar1&,15,4000,"Einstellungen","")[/COLOR][/FONT][FONT=Verdana][COLOR=black]Toolbar("Separator",ToolBar1&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Toolbar("AddTextButton",ToolBar1&,6,4001,"Angebote","")[/COLOR][/FONT][FONT=Verdana][COLOR=black]Toolbar("AddTextButton",ToolBar1&,56,4002,"betreute Objekte","")[/COLOR][/FONT][FONT=Verdana][COLOR=black]Toolbar("Separator",ToolBar1&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Toolbar("AddTextButton",ToolBar1&,39,4003,"Auswertung","")[/COLOR][/FONT][FONT=Verdana][COLOR=black]Toolbar("AddTextButton",ToolBar1&,19,4004,"Drucken","")[/COLOR][/FONT][FONT=Verdana][COLOR=black]Toolbar("Separator",ToolBar1&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Toolbar("AddTextButton",ToolBar1&,33,4005,"DB Synchronisation","")[/COLOR][/FONT][FONT=Verdana][COLOR=black]Toolbar("Separator",ToolBar1&)[/COLOR][/FONT][FONT=Verdana][COLOR=black]Toolbar("AddTextButton",ToolBar1&,49,4006,"Programm beenden!","")[/COLOR][/FONT][FONT=Verdana][COLOR=black]SetListviewStyle(12)    'LVS_SINGLESEL OR LSV_SHOWSELALWAYS, Mehrfach-Markierungen verhindern und Markierung immer sichtbar[/COLOR][/FONT][FONT=Verdana][COLOR=black]x&=MixRGBs(GetSysColor(15),$00FFFFFF)[/COLOR][/FONT][FONT=Verdana][COLOR=black]x&=MixRGBs(x&,$00FFFFFF)[/COLOR][/FONT][FONT=Verdana][COLOR=black]listview&=CreateListView(PageControl1&,%hinstance,0,x&,-1,$421)[/COLOR][/FONT][FONT=Verdana][COLOR=black]ShowListView(Listview&,280,45,((%MaxX - 580) - TaskbarX&),((%MaxY - 360) - TaskbarY&))[/COLOR][/FONT][FONT=Verdana][COLOR=black]'alles neu erstellen[/COLOR][/FONT][FONT=Verdana][COLOR=black]InsertColumn Listview&,"Von",50,0    'Spalten bilden[/COLOR][/FONT][FONT=Verdana][COLOR=black]InsertColumn Listview&,"Bis",70,2[/COLOR][/FONT][FONT=Verdana][COLOR=black]InsertColumn Listview&,"kurze Beschreibung", (%MaxX -730),0[/COLOR][/FONT][FONT=Verdana][COLOR=black]InsertColumn Listview&,"Zeit",1,0[/COLOR][/FONT][FONT=Verdana][COLOR=black]'Die automatische Sortierung abschalten[/COLOR][/FONT][FONT=Verdana][COLOR=black]AutoSortListview listview&,0,0,0,0[/COLOR][/FONT][FONT=Verdana][COLOR=black]SelectLine(Listview&,61,1)[/COLOR][/FONT][FONT=Verdana][COLOR=black]SetWindowPos %Hwnd = PosX1(%MaxX), PosY1(%MaxY) - PosX2(%MaxX), PosY2(%MaxY);0[/COLOR][/FONT] [FONT=Verdana][COLOR=black]InitMessages(%hwnd)[/COLOR][/FONT][FONT=Verdana][COLOR=black]' ##### Hauptprogrammschleife #####[/COLOR][/FONT][FONT=Verdana][COLOR=black]var Programm_Ende% = 0[/COLOR][/FONT][FONT=Verdana][COLOR=black]WhileNot Programm_Ende%[/COLOR][/FONT][FONT=Verdana][COLOR=black]Waitinput[/COLOR][/FONT][FONT=Verdana][COLOR=black]If (%Umessage = ~wm_close) & (&uWnd = %hWnd) 'Message zum Schließen des Fensters abzufangen[/COLOR][/FONT][FONT=Verdana][COLOR=black] Auslesen_Sichern[/COLOR][/FONT][FONT=Verdana][COLOR=black] 'Programm beenden[/COLOR][/FONT][FONT=Verdana][COLOR=black] Programm_Ende%=1[/COLOR][/FONT][FONT=Verdana][COLOR=black]ElseIf MenuItem(4000)[/COLOR][/FONT][FONT=Verdana][COLOR=black]ElseIf MenuItem(4001)[/COLOR][/FONT][FONT=Verdana][COLOR=black]ElseIf MenuItem(4002)[/COLOR][/FONT][FONT=Verdana][COLOR=black]ElseIf MenuItem(4003)[/COLOR][/FONT][FONT=Verdana][COLOR=black]ElseIf MenuItem(4004)[/COLOR][/FONT][FONT=Verdana][COLOR=black]ElseIf MenuItem(4005)[/COLOR][/FONT][FONT=Verdana][COLOR=black]ElseIf MenuItem(4006)[/COLOR][/FONT][FONT=Verdana][COLOR=black] Auslesen_Sichern[/COLOR][/FONT][FONT=Verdana][COLOR=black] 'Programm beenden[/COLOR][/FONT][FONT=Verdana][COLOR=black] Programm_Ende%=1[/COLOR][/FONT][FONT=Verdana][COLOR=black]ElseIf %key = 4[/COLOR][/FONT][FONT=Verdana][COLOR=black] @Redraw(%Hwnd)[/COLOR][/FONT][FONT=Verdana][COLOR=black] SetWindowPos ToolBar1& = 0, 0 - 0, 0; 0[/COLOR][/FONT][FONT=Verdana][COLOR=black]ElseIf %key = 5[/COLOR][/FONT][FONT=Verdana][COLOR=black] ' Hilfe[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndIf[/COLOR][/FONT][FONT=Verdana][COLOR=black]EndWhile[/COLOR][/FONT][FONT=Verdana][COLOR=black]End[/COLOR][/FONT]


    Ich möchte doch gern wissen warum und wo ich meine Fehler mache, ohne euch drehe ich da ewig im Kreiß;)

    Gerd
    Windows 8 - 7 - 64 -32Bit XP XProfanX2 12.1-NT

  • Das geht so nicht. Du musst erst die von den DLLs gesubclassten Controls zerstören, befor du die DLLs entlädst. Die Windowprocs der Fenster versuchen sonst, die Subclassingprozeduren in den DLLs anzuspringen. Das geht aber nicht, da die DLLs bereits entladen sind und das Programm hängt sich auf (100% Prozessorlast).

  • Zitat von AHT;891436

    Das geht so nicht. Du musst erst die von den DLLs gesubclassten Controls zerstören, befor du die DLLs entlädst. Die Windowprocs der Fenster versuchen sonst, die Subclassingprozeduren in den DLLs anzuspringen. Das geht aber nicht, da die DLLs bereits entladen sind und das Programm hängt sich auf (100% Prozessorlast).



    Ok kommt nicht wieder vor, jetzt weiß ich warum und hab verstanden.
    Und danke für die Erläuterung.

    Gerd
    Windows 8 - 7 - 64 -32Bit XP XProfanX2 12.1-NT

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!