Da stellt sich mir die Frage: Warum ist das so?
Ich dachte bisher, dass alles was nicht "klassisches Design" ist irgendwie auf das "native" Fensterdesign "aufgepropft" ist und entsprechend mehr Ressourcen und Leistung verbraucht.
Offenbar kommt die Windows 7 Grafikengine aber besser mit dem Aero zurecht, denn die Gadgets des folgenden Code-Schnippsels flackern unter dem Win 7 klassischen Design wie Sau... unter Aero dagegen fast gar nicht. Ändert mal die Größe des Fensters recht schnell. Unter dem klassischen Design kommen die Gadgets und die Textfelder kaum hinterher.
Sollte ich mit meiner Vermutung "klassisch = ressourcenschonend" falsch liegen?
Code: Alles auswählen
Enumeration
#Gad_Editor
#Gad_Filelist
#Gad_FileSize
#Gad_TextSize
#Gad_Button_ClearFilelist
#Gad_Button_Convert
#Gad_Button_CopyTo
EndEnumeration
If OpenWindow(0, #PB_Ignore, #PB_Ignore, 350, 180, "Flickertest", #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
; Fenster
WindowBounds(0, 260, 180, #PB_Ignore, #PB_Ignore)
StickyWindow(0, 1)
SmartWindowRefresh(0, 1)
; Statusbar
If CreateStatusBar(0, WindowID(0))
AddStatusBarField(7)
StatusBarText(0, 0, "", #PB_StatusBar_BorderLess)
AddStatusBarField(#PB_Ignore)
StatusBarText(0, 1, "djfslhrhfuirshnuihgsuigsgeg", #PB_StatusBar_BorderLess)
EndIf
; Gadgets
EditorGadget(#Gad_Editor, 10, 10, #PB_Ignore, #PB_Ignore, #PB_Editor_ReadOnly)
SetGadgetColor(#Gad_Editor, #PB_Gadget_BackColor, $B3B3B3)
EnableGadgetDrop(#Gad_Editor, #PB_Drop_Files, #PB_Drag_Copy)
ButtonGadget(#Gad_Button_ClearFilelist, #PB_Ignore, #PB_Ignore, #PB_Ignore, #PB_Ignore, "1", #PB_Button_MultiLine)
ButtonGadget(#Gad_Button_Convert, #PB_Ignore, #PB_Ignore, #PB_Ignore, #PB_Ignore, "2", #PB_Button_MultiLine)
ButtonGadget(#Gad_Button_CopyTo, #PB_Ignore, #PB_Ignore, #PB_Ignore, #PB_Ignore, "3", #PB_Button_MultiLine)
TextGadget(#Gad_FileSize, #PB_Ignore, #PB_Ignore, #PB_Ignore, #PB_Ignore, "lalalalalala")
TextGadget(#Gad_TextSize, #PB_Ignore, #PB_Ignore, #PB_Ignore, #PB_Ignore, "lalalalalala")
; Eventloop
Repeat
iEvent = WaitWindowEvent()
iEventGadget = EventGadget()
iEventType = EventType()
Select iEvent
Case #PB_Event_SizeWindow
ResizeGadget(#Gad_Editor, 10, 10, WindowWidth(0) - 110, WindowHeight(0) - 30)
ResizeGadget(#Gad_Button_ClearFilelist, WindowWidth(0) - 90, 10, 80, 20)
ResizeGadget(#Gad_Button_Convert, WindowWidth(0) - 90, 40, 80, 30)
ResizeGadget(#Gad_Button_CopyTo, WindowWidth(0) - 90, 75, 80, 30)
ResizeGadget(#Gad_FileSize, WindowWidth(0) - 90, 110, 80, 15)
ResizeGadget(#Gad_TextSize, WindowWidth(0) - 90, 125, 80, 15)
Case #PB_Event_CloseWindow
iQuit = 1
EndSelect
Until iQuit = 1
EndIf
End