Search found 66 matches

by novablue
Sat Oct 16, 2021 12:19 am
Forum: Coding Questions
Topic: Get current network usage (upload/download)?
Replies: 3
Views: 1516

Re: Get current network usage (upload/download)?

I am still not having any luck, Could a more experienced user make an example for it?
by novablue
Tue Oct 12, 2021 8:34 am
Forum: Coding Questions
Topic: Prevent Drag&Drop of files onto 3rd party windows?
Replies: 0
Views: 490

Prevent Drag&Drop of files onto 3rd party windows?

I am looking for a simple way to prevent files from being dropped onto third party applications on win10. For example a text file dropped onto the notepad window or onto Firefox. The following code works with programs like notepad however for Firefox it does not. Is there any other way to prevent ce...
by novablue
Wed Sep 29, 2021 4:30 am
Forum: Tricks 'n' Tips
Topic: Get the Shell Thumbnail for files
Replies: 27
Views: 12428

Re: Get the Shell Thumbnail for files

On Some computers/file types the image is upside down, does somebody know a better solution to this? Ziltch's post just above fixes that. That is the code i used. On one computer the video files will show in the correct rotation and on my other system its showing them upside down, there must be a f...
by novablue
Wed Sep 29, 2021 12:26 am
Forum: Tricks 'n' Tips
Topic: Get the Shell Thumbnail for files
Replies: 27
Views: 12428

Re: Get the Shell Thumbnail for files

On Some computers/file types the image is upside down, does somebody know a better solution to this?
by novablue
Fri Sep 24, 2021 11:33 am
Forum: Bugs - Windows
Topic: DesktopScaledX / Y not working?
Replies: 7
Views: 1115

DesktopScaledX / Y not working?

Hello, i don't know if this a bug or if i am doing something wrong but DesktopScaledX / DesktopScaledY always returns 100 for me. i have dpi aware flag on and i set my desktop dpi to 125% or 150% but it always returns 100 on windows 10, PB 5.73 LTS x64. ExamineDesktops() Debug DesktopScaledX(100) De...
by novablue
Sun Sep 19, 2021 2:36 am
Forum: Coding Questions
Topic: Private Public Key String Encryption?
Replies: 4
Views: 843

Re: Private Public Key String Encryption?

Thanks for the examples and links but I have looked at those before and it is not really what i am looking for unless i am misunderstanding. My scenario: Person A creates a key and gives it to x number of people. then they all can encrypt something with that key but they can not decrypt it again wit...
by novablue
Sat Sep 18, 2021 5:34 am
Forum: Coding Questions
Topic: Private Public Key String Encryption?
Replies: 4
Views: 843

Private Public Key String Encryption?

Hello, i am looking for a simple solution to encrypt a string with one key that can only be decrypted with another. i searched the forums and looked at asymmetric encryption and Diffie Hellman but i can not wrap my head around it. Is there any simple example on how this can be done?
by novablue
Tue Sep 14, 2021 11:41 am
Forum: Bugs - Windows
Topic: AESEncoder crashes with files bigger than 2gb
Replies: 3
Views: 1264

AESEncoder crashes with files bigger than 2gb

PB 5.73 LTS/6.00 a 4 x64 (ASM) :

AESEncoder crashes with files that are bigger than 2gb. I haven't found any warning about such limitation in the help file so i assume it is a bug?
by novablue
Mon Sep 13, 2021 4:33 am
Forum: Coding Questions
Topic: ListIconGadget event for scrollbar change?
Replies: 8
Views: 566

Re: ListIconGadget event for scrollbar change?

Thanks, here is my solution for now, there must be a better way to avoid spamming of events when holding and dragging the scrollbar but it works. The visible lines output being wrong could be dpi setting related, at least that's my guess. EnableExplicit Define MainWindow.i = OpenWindow(#PB_Any, 0, 0...
by novablue
Mon Sep 13, 2021 3:39 am
Forum: Coding Questions
Topic: ListIconGadget event for scrollbar change?
Replies: 8
Views: 566

Re: ListIconGadget event for scrollbar change?

For Windows only, you can do it like below (thanks to Netmaestro for the original code at https://www.purebasic.fr/english/viewtopic.php?p=573040#p573040). But the visible lines in the Debug Output are off; you'll have to work that bit out yourself. Sorry! Define MainWindow.i = OpenWindow(#PB_Any, ...
by novablue
Mon Sep 13, 2021 1:28 am
Forum: Coding Questions
Topic: ListIconGadget event for scrollbar change?
Replies: 8
Views: 566

ListIconGadget event for scrollbar change?

Hi, Now i am looking for a way to get an event whenever the scrollbar of an Listicon changes position. Right now i am doing it with Timers but i would like it to be triggered by an event only when an actual change occurs. Here is how i am doing it for now: EnableExplicit Define MainWindow.i = OpenWi...
by novablue
Mon Sep 13, 2021 1:13 am
Forum: Coding Questions
Topic: Update Icon in Task manager of my own program?
Replies: 6
Views: 1176

Re: Update Icon in Task manager of my own program?

Try this (change the paths to point to your icons first): Procedure ChangeWindowIcon(Image$) hIcon = LoadImage(0,Image$) SetClassLongPtr_(WindowID(0),#GCL_HICON,hIcon ) EndProcedure OpenWindow(0, 200, 200, 320,240, "Test Window", #PB_Window_SystemMenu ) AddWindowTimer(0,1, 2000) Repeat Ev...
by novablue
Mon Sep 13, 2021 1:08 am
Forum: Coding Questions
Topic: Speed up filling ListiconGadget from thread?
Replies: 5
Views: 607

Re: Speed up filling ListiconGadget from thread?

Thank you all, i thought i was being smart by putting it into a thread and not lagging the main thread out but i will try a different approach. Virtual Listicon sounds interesting i am surprised nobody made an module for it yet for easier use? :lol:
by novablue
Sun Sep 12, 2021 12:30 am
Forum: Coding Questions
Topic: Speed up filling ListiconGadget from thread?
Replies: 5
Views: 607

Speed up filling ListiconGadget from thread?

I am filling a ListiconGadget with a lot of lines so i put it into a seperate thread to not lock up the program, hower this seems to significantly slow it down with thread safe on or off, i also notice that SetGadgetItemColor from a thread is very slow too. My Times are 2000ms filling from thread an...
by novablue
Wed Sep 01, 2021 5:00 am
Forum: Coding Questions
Topic: is dll thread safe when host application is not?
Replies: 1
Views: 388

is dll thread safe when host application is not?

Will a dll run in thread safe mode If i compile it with the thread safe flag on and call it from a non thread safe application or will it always be the host application that decides how it runs? Or in other words: Does the exe who calls the dll need to be compiled with thread safe flag on too for th...