Try the VistaClock - Major performance update!
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
I have DirectX 9.0c installed. And unlike my other computer, this graphics card usually works pretty well.netmaestro wrote:Ah, interesting. Thanks for the feedback, I suspect the issue there is that it uses a windowed screen and sprite3d graphics, which requires dx7 or better to be available. I'll put cleaner code in there so it ends gracefully if it can't run. (I'm guessing no dx7 is the issue, anyway) The reason for the cpu usage will be that it can't verify the background so it's always trying to update it. Good one, thanks again.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
nice clock netmaestro.
hum, maybe you can find this interesting (desktop painting) :
hum, maybe you can find this interesting (desktop painting) :
Code: Select all
Procedure.l myCallback(hwnd.l,uMsg.l,wParam.l,lParam.l)
Select uMsg
Case #WM_ERASEBKGND
ProcedureReturn #False
Case #WM_PAINT
For i=1 To 2
x = GadgetX(i)
y = GadgetY(i)
SetRect_(rect.RECT,x,y,x+GadgetWidth(i),y+GadgetHeight(i))
ValidateRect_(hwnd,rect)
RedrawWindow_(GadgetID(i),0,0,$407)
Next
PaintDesktop_(BeginPaint_(hwnd,ps.PAINTSTRUCT))
EndPaint_(hwnd,ps)
Case #WM_SIZING,#WM_MOVING
InvalidateRect_(hwnd,0,1)
EndSelect
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
If OpenWindow(0,100,100,320,240,"",#PB_Window_SystemMenu|#PB_Window_SizeGadget)
;SmartWindowRefresh(0,1)
CreateGadgetList(WindowID(0))
ButtonGadget(1,5,5,100,50,"Hello")
EditorGadget(2,5,60,100,175)
SetWindowCallback(@myCallback(),0)
InvalidateRect_(WindowID(0),0,1)
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
-
- Enthusiast
- Posts: 372
- Joined: Sun Apr 03, 2005 2:14 am
- Location: England