Search found 11 matches

by MinerDac
Sat Aug 10, 2024 3:43 pm
Forum: Coding Questions
Topic: Has anyone figured out how to write to and read Windows 11 Terminal?
Replies: 2
Views: 1592

Has anyone figured out how to write to and read Windows 11 Terminal?

In Windows 10 I could do this for PowerShell:

; example version
; psrun$ = "pwsh.exe" ; for powershell 7
psrun$ = "powershell.exe" ; for native PS 5

a$ = " <some ps command code here>;"
b$ = " <some ps command code here>;"
c$ = " <some ps command code here - and what ever the return is>;"

cmdx ...
by MinerDac
Tue Jul 30, 2024 2:16 pm
Forum: Coding Questions
Topic: CopyImage_ doesn't resize image
Replies: 6
Views: 1178

Re: CopyImage_ doesn't resize image

Ah HA! 😀

Thanks RASHAD.
by MinerDac
Tue Jul 30, 2024 12:55 pm
Forum: Coding Questions
Topic: CopyImage_ doesn't resize image
Replies: 6
Views: 1178

Re: CopyImage_ doesn't resize image

RASHAD wrote: Tue Jul 30, 2024 12:50 pm Hi MinerDac
You must use the proper Image Decoder
In your case PNG image decoder

Code: Select all

UsePNGImageDecoder()
I did use UsePNGImageDecoder() (I just didn't show it in the post ... edited to show it, sorry bout that, didn't copy n paste correctly)
by MinerDac
Tue Jul 30, 2024 12:42 pm
Forum: Coding Questions
Topic: CopyImage_ doesn't resize image
Replies: 6
Views: 1178

CopyImage_ doesn't resize image

I used the post at > https://www.purebasic.fr/english/viewtopic.php?t=60212&sid=2b21435b6a89c51d00e419daa2f60adb > the code by RASHAD to derive the below:



UsePNGImageDecoder()

#IMAGE_ICON = 1

CatchImage(100, ?myimage)

pcon.ICONINFO
pcon\fIcon = #True
pcon\hbmMask = ImageID(100)
pcon\hbmColor ...
by MinerDac
Thu Jul 25, 2024 11:30 am
Forum: Tricks 'n' Tips
Topic: color emojis windows 10/11
Replies: 9
Views: 2727

Re: color emojis windows 10/11

This is nice. Thank You.

I have a couple of questions though.

How do you generate the information in the data section?

Is this for only emojis that are already present in the Windows 10/11 OS? For example, Windows does not have emoji's for country flags so how would you generate an emoji for ...
by MinerDac
Tue Jul 23, 2024 12:19 pm
Forum: Coding Questions
Topic: Questions about DPI aware
Replies: 1
Views: 487

Questions about DPI aware

If the DPI aware thing is enabled in compiler options does that mean the produced window will scale according to the Windows 10 desktop settings?

For example: desktop is 1920 x 1080 @125%. If I make a window, say, 1000 x 540 at that desktop resolution - if I change the desktop to 1920 x 1080 @100 ...
by MinerDac
Mon Jul 22, 2024 11:06 am
Forum: Coding Questions
Topic: catchImage memory address
Replies: 14
Views: 2747

Re: catchImage memory address



I too liked the approach Demivec applied. Wasn't able to get it to work out though, not sure why but I'd put money on it that's its something I'm not doing or did wrong 😀
--- snipped ---

The 'Map' approach put forth by Little John is enticing, and since it seems I'm going to need to end up ...
by MinerDac
Mon Jul 22, 2024 10:54 am
Forum: Coding Questions
Topic: catchImage memory address
Replies: 14
Views: 2747

Re: catchImage memory address


Why don't you create one image for all your small images then just grab the needed image when needed
I think it will be fast enough



Because the displayed images will change over time for different conditions and purposes thus more complexity in the code and more 'refreshes' and a new "one ...
by MinerDac
Sat Jul 20, 2024 7:08 pm
Forum: Coding Questions
Topic: catchImage memory address
Replies: 14
Views: 2747

Re: catchImage memory address



I kind of wanted to avoid a big 'Select : EndSelect' section, hoping to convert the string name (countrycode$ below) to a memory address flag pointer instead

You can use GetRuntimeInteger() .
However, I think Demivec's approach is more elegant.


; PB 6.04 LTS

EnableExplicit

Define ...
by MinerDac
Sun Jul 14, 2024 6:55 pm
Forum: Coding Questions
Topic: catchImage memory address
Replies: 14
Views: 2747

Re: catchImage memory address

thanks for the responses folks.

After playing around with it some more I ended up going with that posted by infratec above.

I kind of wanted to avoid a big 'Select : EndSelect' section, hoping to convert the string name (countrycode$ below) to a memory address flag pointer instead (i.e. "US ...
by MinerDac
Sat Jul 13, 2024 12:29 pm
Forum: Coding Questions
Topic: catchImage memory address
Replies: 14
Views: 2747

catchImage memory address

Hello;

New to PureBasic, playing around with CatchImage(). I'm wondering how to get the memory address for the label in the include data section if the label changes?

I have several images in the data section with include section using IncludeBinary, each image is 1Kb in size. But the problem is ...