Search found 4535 matches
- Mon Mar 18, 2024 4:33 am
- Forum: Coding Questions
- Topic: I need native image drawn on a ButtonGadget
- Replies: 7
- Views: 264
- Mon Mar 18, 2024 4:31 am
- Forum: Tricks 'n' Tips
- Topic: Color Button using API [Windows]
- Replies: 0
- Views: 156
Color Button using API [Windows]
1- Using Windows API 2- Usual Windows Button effects 3- Use Vector lib. to do what you want to do Suit yourself it's only a scratch for beginning Have fun Procedure colorBUTTON(gad,w,h,font.s,fsize,text.s,tcolor) LoadFont(0,font,fsize) CreateImage(gad,w-6,h-8,32,#PB_Image_Transparent) StartVectorDra...
- Sun Mar 17, 2024 6:48 am
- Forum: Coding Questions
- Topic: Programming a Timer
- Replies: 14
- Views: 451
Re: Programming a Timer
Better use of BindEvent() Exactly it's not perfect because if it stopped and started again the continuation of the timer cycle is messed up ;EnableExplicit #XCounterDefaultValue = 10 #LongTimerDefaultValue = 45 #ShortTimerDefaultValue = 15 Global LongTimerCounter,ShortTimerCounter,XCounter Procedure...
- Sat Mar 16, 2024 5:56 pm
- Forum: Coding Questions
- Topic: Programming a Timer
- Replies: 14
- Views: 451
- Sat Mar 16, 2024 5:45 pm
- Forum: Coding Questions
- Topic: Programming a Timer
- Replies: 14
- Views: 451
Re: Programming a Timer
infratec fine code with BindEvent() ;EnableExplicit #XCounterDefaultValue = 10 #LongTimerDefaultValue = 45 #ShortTimerDefaultValue = 15 Global LongTimerCounter,ShortTimerCounter,XCounter Procedure timerCB() If LongTimerCounter > 0 LongTimerCounter - 1 Debug LongTimerCounter If LongTimerCounter = 0 S...
- Fri Mar 15, 2024 8:07 am
- Forum: Coding Questions
- Topic: Fading a sound's volume using MiniAudio
- Replies: 9
- Views: 316
Re: Fading a sound's volume using MiniAudio
Maybe #1 : InitSound() ; Initialize Sound system UseOGGSoundDecoder() ; Use ogg files LoadSound(0, GetTemporaryDirectory()+"01AlicesRestaurantMassacree.ogg") length = SoundLength(0,#PB_Sound_Millisecond) interval = Length / 1000 volume = 100 PlaySound(0) Repeat For i = 1 To interval SoundV...
- Thu Mar 14, 2024 11:40 am
- Forum: Windows
- Topic: Refresh/Reload a web page
- Replies: 7
- Views: 168
Re: Refresh/Reload a web page
Maybe you can use Thread to do the job every min
- Thu Mar 07, 2024 4:30 pm
- Forum: Coding Questions
- Topic: ReDim : Array not initialized
- Replies: 5
- Views: 146
Re: ReDim : Array not initialized
PB 6.04 x86 or x64 Windows 11 x64
No problem
No problem
- Thu Mar 07, 2024 7:24 am
- Forum: Coding Questions
- Topic: KeyboardPushed() without 2D (Sendkeys?)
- Replies: 2
- Views: 149
Re: KeyboardPushed() without 2D (Sendkeys?)
No Window required No Local or Global Hook Esc to end Repeat Delay(1) For k = 65 To 90 If GetAsyncKeyState_(#VK_ESCAPE) & $8000 = 32768 End EndIf If GetAsyncKeyState_(k) & $8000 = 32768 keybd_event_(k, 0, 0, 0) keybd_event_(k, 0,#KEYEVENTF_KEYUP, 0) If GetAsyncKeyState_(#VK_LSHIFT) & $80...
- Mon Mar 04, 2024 5:11 am
- Forum: Coding Questions
- Topic: When resizing the window, the text is highlighted
- Replies: 4
- Views: 186
Re: When resizing the window, the text is highlighted
Code: Select all
For c=0 To 3
For i=0 To 7
AddGadgetItem(c, -1, Str(i))
Next
SetGadgetState(c, i - 1)
Next
- Sun Mar 03, 2024 2:37 am
- Forum: Coding Questions
- Topic: Ckeck if Excel is installed
- Replies: 2
- Views: 169
Re: Ckeck if Excel is installed
Use the next for both Windows x86,x64 Procedure.s RegRead(Root, KeyPath.s, ValueName.s) Protected valueData.s, hKey, size, type If #ERROR_SUCCESS = RegOpenKeyEx_(Root, KeyPath, 0, #KEY_QUERY_VALUE|#KEY_ENUMERATE_SUB_KEYS|#KEY_WOW64_64KEY, @hKey) ; open with READ access rights If #ERROR_SUCCESS = Reg...
- Fri Mar 01, 2024 9:51 am
- Forum: Coding Questions
- Topic: Canvas and #PB_Canvas_ClipMouse
- Replies: 11
- Views: 368
Re: Canvas and #PB_Canvas_ClipMouse
Hi Lord You can use the next and I think it's much better than SetRect_() It will save you the calculations of the ScrollArea() Gadget dimensions After all it's your private code :) Glad to talk to you GetWindowRect_(GadgetID(0),r.RECT) r\bottom - 20 r\right - 20 ClipCursor_(r)
- Fri Mar 01, 2024 9:17 am
- Forum: Coding Questions
- Topic: Button inside a Listicon ?
- Replies: 2
- Views: 272
Re: Button inside a Listicon ?
For Windows Add any Gadget at any Cell (I presume :D ) If needs more work to do if the Listicon will be scrolled vertically or horizontally Procedure WinCallback(hWnd, uMsg, wParam, lParam) result = #PB_ProcessPureBasicEvents Select uMsg Case #WM_NOTIFY *NMHDR.NMHDR = lParam If *NMHDR\hWndFrom = Get...
- Thu Feb 29, 2024 8:35 pm
- Forum: Coding Questions
- Topic: Canvas and #PB_Canvas_ClipMouse
- Replies: 11
- Views: 368
Re: Canvas and #PB_Canvas_ClipMouse
Hi Lord You are welcome Next more direct and more powerful OpenWindow(0, 0, 0, 800,600, "",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ScrollAreaGadget(0, 10,10, 780, 580,800,600, 10, #PB_ScrollArea_Single) CloseGadgetList() Repeat Select WaitWindowEvent() Case #PB_Event_CloseWindow Q...
- Thu Feb 29, 2024 7:31 pm
- Forum: Coding Questions
- Topic: Canvas and #PB_Canvas_ClipMouse
- Replies: 11
- Views: 368
Re: Canvas and #PB_Canvas_ClipMouse
ScrollArea clip cursor c to clip Esc to release Global r.RECT OpenWindow(0, 0, 0, 800,600, "",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ScrollAreaGadget(0, 10,10, 780, 580,800,600, 10, #PB_ScrollArea_Single) CloseGadgetList() SetRect_(r,GadgetX(0,#PB_Gadget_ScreenCoordinate),GadgetY...