Search found 1078 matches

by Paul
Sat Oct 16, 2021 12:48 am
Forum: Coding Questions
Topic: ReplaceString only once syntax ?
Replies: 5
Views: 501

Re: ReplaceString only once syntax ?

Additional options are required in order.

Example.. if you only need the 1st option the options that follow are not required.
If you need the 3rd option then you must also include the 2 options before it.
by Paul
Sat Oct 16, 2021 12:18 am
Forum: Coding Questions
Topic: ReplaceString only once syntax ?
Replies: 5
Views: 501

Re: ReplaceString only once syntax ?

If you want to specify the NbOccurrences option then you must put something in the optional fields that come before it.

Code: Select all

OneHtmlLineOut$ = ReplaceString(ImageHtmlLineIn$ ,"FolderAddress" ,HoldFolderAddress$,#PB_String_NoCase,1,1)
by Paul
Fri Oct 15, 2021 2:09 am
Forum: Tricks 'n' Tips
Topic: Update Manifest in Executable
Replies: 6
Views: 783

Re: Update Manifest in Executable

An app that is truly DPI aware would look the same size as a non DPI ware app that is auto scaled by Windows. For example, this is your interface recreated and compiled as non DPI aware (left) and then DPI aware (right) on a 4k monitor at 175%. Notice how everything is identical regardless of scalin...
by Paul
Thu Oct 14, 2021 6:26 pm
Forum: Tricks 'n' Tips
Topic: Update Manifest in Executable
Replies: 6
Views: 783

Re: Update DPI Manifest in Executable

Why would you want to modify the manifest like this? When an app is not DPI aware, Windows will auto scale the app to make everything the proper size when scaling is used. (things get blurry due to the scaling but everything is scaled properly) https://reelmedia.org/test/dpi1.jpg If the DPI flag is ...
by Paul
Mon Oct 11, 2021 4:27 pm
Forum: Tricks 'n' Tips
Topic: Extract Icon from Dll/exe at non standard size(WINDOWS ONLY)
Replies: 14
Views: 2349

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

PathFindOnPath_() expects a bigger buffer than it get's. Ah, you are right. If I change this part I no longer get a crash... If Not PathFileExists_(@file$) file$ = GetFilePart(file$) *buf=AllocateMemory(#MAX_PATH) PokeS(*buf,file$) PathFindOnPath_(*buf, #Null) file$=PeekS(*buf) FreeMemory(*buf) End...
by Paul
Mon Oct 11, 2021 3:28 pm
Forum: Tricks 'n' Tips
Topic: Extract Icon from Dll/exe at non standard size(WINDOWS ONLY)
Replies: 14
Views: 2349

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

@ ChrisR

On my Windows 10 machine your code works fine but on Windows 7 it just crashes.
by Paul
Sun Oct 10, 2021 6:22 am
Forum: Tricks 'n' Tips
Topic: Extract Icon from Dll/exe at non standard size(WINDOWS ONLY)
Replies: 14
Views: 2349

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

BarryG wrote: Sun Oct 10, 2021 3:51 am Also, if your icon is different, could you please post a screenshot so I can see what it is. Thanks!
On my copy of Windows 7, Explorer.exe is not in System32 folder, it's in the main Windows folder and your code extracts this icon...

Image
by Paul
Sat Oct 09, 2021 3:06 pm
Forum: Coding Questions
Topic: Run second sqlite query before finishing the previous query?
Replies: 7
Views: 634

Re: Run second sqlite query before finishing the previous query?

Or do something as simple as open the database a 2nd time for temp queries... OpenDatabase(#db,"mydatabase.sqlite") OpenDatabase(#qry2,"mydatabase.sqlite") DatabaseQuery(#db, "SELECT id, Name, Address, OrderCount FROM People Where Address LIKE '%AVENUE%'") While NextDat...
by Paul
Sat Oct 09, 2021 3:45 am
Forum: Coding Questions
Topic: Drawing image with transparent background on canvas
Replies: 3
Views: 447

Re: Drawing image with transparent background on canvas

I would do this... OpenWindow(0,0,0,300,300,"Test",#PB_Window_ScreenCentered|#PB_Window_SystemMenu) CanvasGadget(1,0,0,300,300) CreateImage(2,300,300,32,#PB_Image_Transparent) StartDrawing(ImageOutput(2)) DrawingMode(#PB_2DDrawing_AlphaBlend) Box(100,100,100,100,RGBA(255,0,0,255)) StopDraw...
by Paul
Fri Oct 08, 2021 6:18 pm
Forum: The PureBasic Editor
Topic: IDE and Icon bar on 4K monitor
Replies: 14
Views: 3823

Re: IDE and Icon bar on 4K monitor

For me Version 6 has IDE toolbar correct size in 4k monitor, while version 5.73 has very little icons. Maybe some improvment happended behind the scenes. No difference here, icons are tiny using both old and new IDE on 4K monitor and 175% scaling (toolbar and menubar) :( (also tiny icons on all app...
by Paul
Fri Oct 08, 2021 4:21 pm
Forum: Applications - Feedback and Discussion
Topic: PureBasic Template Manager
Replies: 14
Views: 2921

Re: PureBasic Template Manager

I wanted to update this tool but it was canceled due to the low popularity of users. @ Amitris_de Is this a tool that you yourself uses every day? Does it increase your workflow and make working on projects easier for you? If the answer if NO, that would be why it is not very popular with others. I...
by Paul
Sat Oct 02, 2021 2:24 pm
Forum: Tricks 'n' Tips
Topic: [Windows] IsProcessEvelated()
Replies: 4
Views: 746

Re: [Windows] IsProcessEvelated()

@ Mijikai

I really appreciate how you show 3 different ways to accomplish the same goal.
Nice work!
by Paul
Sat Oct 02, 2021 4:26 am
Forum: Tricks 'n' Tips
Topic: [Windows] IsProcessEvelated()
Replies: 4
Views: 746

Re: [Windows] IsProcessEvelated()

Just a note from docs.microsoft.com SHTestTokenMembership "Uses CheckTokenMembership to test whether the given token is a member of the local group with the specified RID." "This function wraps CheckTokenMembership and only checks local groups." IsUserAnAdmin "Tests whether ...
by Paul
Fri Sep 24, 2021 6:29 pm
Forum: General Discussion
Topic: LCase faster than #PB_String_NoCase
Replies: 14
Views: 1275

Re: LCase faster than #PB_String_NoCase

NicTheQuick wrote: Fri Sep 24, 2021 6:19 pm It's interesting that only on my system the FindString variant is faster. Maybe it's because I am using Linux?
Maybe.
These are my results on Linux (my other post was under Windows)
LCase: 142ms
NoCase: 64ms
by Paul
Fri Sep 24, 2021 5:24 pm
Forum: General Discussion
Topic: LCase faster than #PB_String_NoCase
Replies: 14
Views: 1275

Re: LCase faster than #PB_String_NoCase

@ jacdelad
Thanks, good to know.

Results on my system...
LCase: 93ms
NoCase: 394ms

Results with Debugger ON
LCase: 1596ms
NoCase: 4655ms