Search found 4052 matches

by RASHAD
Mon Oct 18, 2021 5:24 pm
Forum: Coding Questions
Topic: Get dimensions of Icon
Replies: 8
Views: 279

Re: Get dimensions of Icon

Then use CopyImage_() with the Handle instead of LoadImage_()
by RASHAD
Mon Oct 18, 2021 5:20 pm
Forum: Coding Questions
Topic: Preserve transparency when copying icon on image
Replies: 12
Views: 323

Re: Preserve transparency when copying icon on image

Use CopyImage_() to get the Icon with the new width & height

Code: Select all

newiconH = CopyImage_(IconH,#IMAGE_ICON,newwidth,newheight,#LR_COPYDELETEORG)
by RASHAD
Mon Oct 18, 2021 4:42 pm
Forum: Coding Questions
Topic: Preserve transparency when copying icon on image
Replies: 12
Views: 323

Re: Preserve transparency when copying icon on image

Can you post a workable snippet ?
by RASHAD
Mon Oct 18, 2021 4:40 pm
Forum: Coding Questions
Topic: Get dimensions of Icon
Replies: 8
Views: 279

Re: Get dimensions of Icon

bitH = LoadImage_(0,GetTemporaryDirectory()+"test.xxx",#IMAGE_BITMAP,16,16,#LR_LOADFROMFILE ) If bitH Debug "Bitmap" Else iconH = LoadImage_(0,GetTemporaryDirectory()+"test.xxx",#IMAGE_ICON ,16,16,#LR_LOADFROMFILE ) If iconH Debug "Icon" EndIf EndIf
by RASHAD
Mon Oct 18, 2021 3:28 pm
Forum: Coding Questions
Topic: Get dimensions of Icon
Replies: 8
Views: 279

Re: Get dimensions of Icon

If you got the Handle of the Icon

Code: Select all

GetIconInfo_(hIcon, iconinfo.ICONINFO)
GetObject_(iconinfo\hbmMask, SizeOf(BITMAP), bitmap.BITMAP)

width = bitmap\bmWidth
height = bitmap\bmHeight
by RASHAD
Wed Oct 13, 2021 2:37 pm
Forum: Coding Questions
Topic: Transparent window title bar no longer selectable (Windows 10)
Replies: 5
Views: 575

Re: Transparent window title bar no longer selectable (Windows 10)

Change #MaskColor to any color but not Pure Black or Pure White EnableExplicit ExamineDesktops() #MaskColor = $010000 Define hWndInv = OpenWindow(0, 0, 0, DesktopWidth(0) / 2, DesktopHeight(0) / 2, "Transparent",#PB_Window_ScreenCentered| #PB_Window_TitleBar | #PB_Window_SystemMenu) SetWin...
by RASHAD
Tue Oct 12, 2021 10:37 am
Forum: Tricks 'n' Tips
Topic: Alpha Blend 32 bit Images w PB
Replies: 3
Views: 442

Re: Alpha Blend 32 bit Images w PB

My bad
I always think that Point() is equal to GetPixel_() which return RGB() not RGBA()
by RASHAD
Tue Oct 12, 2021 2:50 am
Forum: Tricks 'n' Tips
Topic: Alpha Blend 32 bit Images w PB
Replies: 3
Views: 442

Alpha Blend 32 bit Images w PB

Hi CreateImage(0,600,600,32) StartDrawing(ImageOutput(0)) For i = 0 To 100 DrawingMode(#PB_2DDrawing_AllChannels ) alpha = Random(255,0) Circle(Random(600,10),Random(600,10),Random(50,10),RGBA(255,0,0,alpha)) Next StopDrawing() CreateImage(1,600,600,32) StartDrawing(ImageOutput(1)) For i = 0 To 100 ...
by RASHAD
Mon Oct 11, 2021 6:32 pm
Forum: Coding Questions
Topic: Combining Red, Green and Blue parts of an image in PB.
Replies: 6
Views: 625

Re: Combining Red, Green and Blue parts of an image in PB.

Tested with Demivec captured the 3 colored images and I came to same conclusion ; UsePNGImageDecoder() ; UsePNGImageEncoder() ; LoadImage(0,GetTemporaryDirectory()+"Image_000.png") ; LoadImage(1,GetTemporaryDirectory()+"Image_001.png") ; LoadImage(2,GetTemporaryDirectory()+"...
by RASHAD
Mon Oct 11, 2021 5:11 pm
Forum: Tricks 'n' Tips
Topic: Extract Icon from Dll/exe at non standard size(WINDOWS ONLY)
Replies: 14
Views: 2312

Re: Extract Icon from Dll/exe at non standard size(WINDOWS ONLY)

The problem with BarryG code is the icon number
Windows 10,11 icon 8
Windows 7,8.x icon 10
It's MS after all :)
by RASHAD
Sun Oct 10, 2021 10:11 pm
Forum: Coding Questions
Topic: [SOLVED] Scale on Win10 screws up fade function
Replies: 2
Views: 463

Re: Scale on Win10 screws up fade function

Hi h.WINDOWPLACEMENT GetWindowPlacement_(GetDesktopWindow_(),@h) x = h\rcNormalPosition\left y = h\rcNormalPosition\top WW = h\rcNormalPosition\right - h\rcNormalPosition\left WH = h\rcNormalPosition\bottom - h\rcNormalPosition\top bs=OpenWindow(#PB_Any,0,0,WW,WH,"",#PB_Window_BorderLess|#...
by RASHAD
Sun Oct 10, 2021 9:56 pm
Forum: Coding Questions
Topic: TreeGadget node being detected
Replies: 12
Views: 976

Re: TreeGadget node being detected

@BarryG
That it's strange
Tested with PB 5.73 x86 Windows 11 x64
by RASHAD
Sun Oct 10, 2021 1:58 pm
Forum: Coding Questions
Topic: TreeGadget node being detected
Replies: 12
Views: 976

Re: TreeGadget node being detected

Previous post updated
The items selected automatic by tracking not by clicking
by RASHAD
Sun Oct 10, 2021 5:53 am
Forum: Coding Questions
Topic: TreeGadget node being detected
Replies: 12
Views: 976

Re: TreeGadget node being detected

Maybe the next snippet will suit your needs I hope so :) Global ID #TVM_MAPHTREEITEMTOACCID = #TV_FIRST + 43 Procedure winCB(hWnd, uMsg, WParam, LParam) Protected *NMHDR.NMHDR Select uMsg Case #WM_NOTIFY *NMHDR = LParam Select *NMHDR\hwndFrom Case GadgetID(0) If *NMHDR\code = #NM_DBLCLK And GetGadge...