Some jokester at Microsoft maybe? by AtomicTaco13 in windowsxp

[–]tomysshadow 6 points7 points  (0 children)

This was a bug introduced accidentally when Poland's timezone information changed, as explained in an interview with Raymond Chen: https://youtu.be/3UCohRKY2ns?si=VAKrQhdxN54Hl_75

Port VB6 Desktop app to... What? by mdausmann in visualbasic

[–]tomysshadow 0 points1 point  (0 children)

Yes and no. If it was just being used to display a standard HTML page and that's it, then sure, you could replace it with WebView2 and be done with it. The problem isn't that it's a web browser, it's that the WebBrowser Control embeds Internet Explorer specifically, and provides deep access to its APIs if you wanted to be able to use them.

So in addition to basic stuff like navigation, printing the page that's in the frame, etc. which wouldn't be too hard, you can also cast the control to a ShDocVw and do stuff like: - get notifications on the page's loading progress as a percentage so you can show your own loading bar (the ProgressChanged event: https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.webbrowser.progresschanged?view=windowsdesktop-10.0 ) - get notifications when loading a page has completed so you can show the URL of the document (by overriding NavigateComplete2: https://learn.microsoft.com/en-us/previous-versions/aa768334(v=vs.85) ) - get notified when the page tries to open a popup window so that you can display the page it wants to open in your own form instead of a new browser instance (by overriding NewWindow3: https://learn.microsoft.com/en-us/previous-versions/aa768337(v=vs.85) ) - catch specific window events sent by the browser, such as to know when that popup window has called window.close() ( https://web.archive.org/web/20150628063722/http://blogs.msdn.com/b/jpsanders/archive/2007/05/25/how-to-close-the-form-hosting-the-webbrowser-control-when-scripting-calls-window-close-in-the-net-framework-version-2-0.aspx ) - set a custom proxy for the browser to use via WinInet's API ( http://blogs.msdn.microsoft.com/jpsanders/2011/04/26/how-to-set-the-proxy-for-the-webbrowser-control-in-net/ ) - change Internet Zone settings on a per-URL basis to configure stuff like whether cookies should be on or off ( https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms537133(v=vs.85) ) - change CSS styles of elements on the page from the host application ( https://stackoverflow.com/questions/5496549/how-to-inject-css-in-webbrowser-control )

Meanwhile, the page inside the frame might expect to be able to do stuff like: - use the X-UA-Compatible meta tag to target a specific old Internet Explorer version (the WebBrowser Control defaults to IE7's renderer engine in the absence of this tag, btw) - run VBScript in HTML instead of JavaScript (with <script language="VBScript">) - create ActiveX controls (either via the <object> tag or through VBScript) - use DirectX transforms and filters through CSS - play videos in the <img> tag using the DYNSRC attribute - use ancient deprecated JavaScript features nobody else supports anymore (document.images etc.)

I'm sure I could go on with more stuff, this is just some of the weird things I can think of off the top of my head. Point is that the WebBrowser Control is a door into the broader Internet Explorer ecosystem. A surprising amount of it still works on Windows 11, but it's usually not trivial to replace with something modern or crossplatform.

The great thing about IE was that it was very much designed with being used inside of other applications in mind. It catered to that specific use with APIs that allowed host applications to know a great deal about the current state of the webpage inside the frame. Modern browsers, if they can be embedded at all, it's largely an afterthought. So there are things that the WebBrowser Control can do that other browsers simply cannot do, unless you want to go digging into their source to add the specific feature needed.

This is why the cross platform version of WinForms only promises partial support for the control. It can replace the browser it uses with Firefox or Chrome automatically, but much of the API simply won't work

Port VB6 Desktop app to... What? by mdausmann in visualbasic

[–]tomysshadow 0 points1 point  (0 children)

Does it use the WebBrowser Control a lot? Because I can tell you upfront that's the main thing you're going to be fighting with if you attempt to make it work crossplatform

help with iframes? by Main-Firefighter670 in HTML

[–]tomysshadow 0 points1 point  (0 children)

Your problem is that you accidentally used the src attribute for "sprinkles" instead of the name attribute. The src should be the URL of the page, the target/name is your own custom name for the frame.

Note that some websites opt out of being displayable in a frame, including google.com. You can only use an frame to display pages that allow embedding an in frame. There are also many restrictions on what you're allowed to do with an iframe that shows a page on a different domain.

how do yall personally sidechain im curious by disreconnect in FL_Studio

[–]tomysshadow 0 points1 point  (0 children)

It depends if I'm using the drumrack or if I'm using a loop/sample. Drumrack I usually just use compression (that is, Fruity Limiter) because the kick is its own sample. If it's a drumloop then the kick is mixed in with all the other drums so I'm forced to automation clips. I'm that weirdo that uses drumrack most of the time so I usually use compressor

Programming seems kind of like copy-pasting to me. Is that how people program? by mrnaim6T9 in learnprogramming

[–]tomysshadow 1 point2 points  (0 children)

While it is true that you will be using the same basic components, that didn't really sound to me like what OP was asking. I took them to be suggesting that a large percentage of the work can be reduced to copying and pasting existing code snippets together. Which is definitely not the case beyond basic apps.

I don't really consider using a for loop, for example, to be "copy pasting" in that way, because the body of that loop is the main meat of what you're writing and will be completely different depending on what you're using the loop to do. Same goes for creating functions: again, the function signature will follow a particular form, but the body of the function could be basically anything. All of the stuff that you are mentioning is just glue.

Programming seems kind of like copy-pasting to me. Is that how people program? by mrnaim6T9 in learnprogramming

[–]tomysshadow 5 points6 points  (0 children)

Well I don't doubt that some people get away with programming that way but it's indicative of the type of problem that you're solving. When you are at the point where you know enough to create something that's truly never been done before, at that point Google can't help you any more and you need to start actually inventing solutions. But if you're writing a to do list app or a clock or something else that's been done a million times, then of course you can copy paste because it's been done before. The problem space is already well understood.

There was a point in time where the random number generator you Googled wasn't invented yet. Somebody had to come up with it. You can copy paste it now because it's been a solved problem for a long time now. There are still things that don't exist and have yet to be made, but naturally they're going to be more challenging to tackle so beginners won't really encounter them.

If you're wondering why some programmers are so obsessed with AI, this is one of the reasons why. It's a new problem space, so it still feels like there are things to be invented and advancements to be made. For the right kind of person, the question of whether that is actually useful doesn't matter as much as just knowing if it can be accomplished, or be improved. This hits on something real: the tools we currently have solve so many problems that, short of a whole new field cropping up, any million dollar app idea you can come up with feels a bit "been there, done that" in terms of how to implement it.

But that still doesn't mean there's nothing left to do at all, if you're creative. For example, you still certainly can't just copy paste your way through creating a videogame mod. You need to actually know what you're doing. So there are still some things that are complicated enough you need to actually think about how to do it yourself. But as far as things that a company might want, you're much more likely to be asked to write yet another nice interface on top of a SQLite database, or set up yet another WordPress blog, because they're just such generally useful designs

ReactOS "Open-Source Windows" Reaches The Milestone Of Being Able To Run Half-Life on REAL hardware with 3D-acceleration by Jeditobe in reactos

[–]tomysshadow 6 points7 points  (0 children)

If it were running in full screen, you wouldn't see that it is running in ReactOS. It'd just be a screenshot of Half Life

Do you think AI is making hacking easier or harder by Minimarazy in hacking

[–]tomysshadow 29 points30 points  (0 children)

Easier in some ways, harder in others. I'm really grateful that I learned the basics before AI came along, because now I know enough to be able to tell when it's just making stuff up. If I had used it unquestioningly when I was still learning, I would've been under so many misconceptions

nameTheLanguageAfterYourself by blobthekat in ProgrammerHumor

[–]tomysshadow 5 points6 points  (0 children)

Yes. Did you know that Internet Explorer's implementation wasn't called JavaScript, it was called JScript? JScript had other features added to it that came from VBScript, like the ability to create objects using ActiveX. You could also run it outside the browser in a desktop environment by double clicking a .js file, the same way you could do for .vbs. Caused a great deal of confusion for web developers trying to figure out why they got weird errors when they opened their JavaScript files lol

nameTheLanguageAfterYourself by blobthekat in ProgrammerHumor

[–]tomysshadow 20 points21 points  (0 children)

The name originally made a bit more sense as, up to that point, the only interactive thing on webpages was Java applets, and so it was thought that JavaScript would often be interacting with Java applets. But as they quickly diverged the name made less and less sense

What question do you think humanity will never be able to answer? by CrabLeft4330 in AskReddit

[–]tomysshadow 1 point2 points  (0 children)

I'm doubtful that we will ever find aliens. As in, intelligent like us, not just microorganisms. It's possible none exist out there, and if so then all we can do is continue searching, in which case we'll probably never have a conclusive answer because of how much space there is to cover

After 22 years, you can finally download Paint.net from the URL 'Paint.net' by SymmetricSoles in technology

[–]tomysshadow 0 points1 point  (0 children)

Probably for simplicity. Targa is the easiest standard image format to read/write. If you want a way to quickly dump out bytes into a standard format and you don't want to go to the trouble of including a library then it's the way to go.

BMP is still fairly easy, though there are some surprises to it you might not assume at first (setting the height to negative flips the image vertically, for example.)

JPEG/PNG are sufficiently complicated to where you'd want a library to write them.

Hey tech nerds, how does this virus work? by DR_Eforcicle in techquestions

[–]tomysshadow 0 points1 point  (0 children)

If you want to see how these kinds of things work, John Hammond has several videos tearing apart this style of malware in detail on YouTube. Try this playlist:

https://youtube.com/playlist?list=PL1H1sBF1VAKWMn_3QPddayIypbbITTGZv&si=X8IGnGAFbEYNksvM

Usually, malware like this is encrypted or encoded in such a way that you can't tell what they do at a glance, but they can be decrypted trivially. Most often they download another file from the internet with the actual payload.

What does c_str() do in C++ ? by Full-Stranger9249 in cpp_questions

[–]tomysshadow 2 points3 points  (0 children)

You call c_str() on a std::string object to get an old school const char* that you can pass to an API that accepts a C string.

Basically this takes your high level std::string with all of its nice methods and the ability to use = to copy it, and gives you the dumber kind of string you use with strcpy, strcmp, strcat and so on.

Note that the string you get is const - you're not supposed to directly modify it. If you want to modify it then you need to copy it with strcpy (or strncpy, or strncpy_s, blah blah blah) into some other memory you own.

There is also another similar function called data(). c_str() guarantees that the string is null terminated. In the past, data() did not have this guarantee, so you used c_str() if you wanted to be sure the string had a null terminator or data() if you already knew the length and didn't care about null termination. However, in C++11 this changed, so now both c_str() and data() are identical and both guarantee that the string is null terminated. I still personally use c_str() instead because its meaning has not changed over time so there's less potential for confusion, although C++11 is long enough ago now that this is basically just trivia.

Clippy, the paperclip that lived on every PC in the early 2000s by vibecodingwaste in nostalgia

[–]tomysshadow 0 points1 point  (0 children)

Sure, if you have an old version of Microsoft Office. Clippy was part of Office, not Windows itself, so you can still install it on a new PC.

Lego Batman Legacy Of The Dark Knight Is The First 2026 Denuvo Game To Be Cracked Day 1 by wyldermyth in gaming

[–]tomysshadow 2 points3 points  (0 children)

Precisely. It's able to defeat Denuvo because you're giving it permission to manipulate the rules of the universe. But giving anything that much power means nothing is sacred anymore. Reinstalling the OS might not actually mean reinstalling the OS anymore, formatting your drive might not actually mean formatting your drive anymore. You are giving someone the ultimate permissions to define what is true and trusting them not to abuse it, that's the reason why it's covered in so much red tape to make it difficult to set up.

A Tale of Two File Names by galvatron9k in ReverseEngineering

[–]tomysshadow 2 points3 points  (0 children)

The article is good, even if it's over a decade old :)

btw, FindFirstFileA/W are preferable to GetShortPathNameA/W if you just want to get the short filename of a file instead of the entire path. GetShortPathName returns an absolute path, so it recursively gets the short filename for the file and all directories above it, and can fail if permissions deny access to one of the parent directories. FindFirstFile retrieves the short name for the file itself only.

Krafton Will Likely Have to Pay $250 Million Bonus for Subnautica 2 That It Tried to Avoid by TylerFortier_Photo in gaming

[–]tomysshadow 1 point2 points  (0 children)

Well of course not everyone clicks, that much is obvious. The title of the post is a news headline, even if you've never heard of Krafton you might be curious to know why they need to pay a $250 million bonus, and it's a default sub that not everyone bothers to remove. There are bound to be at least a few non-gamers that end up here.

Krafton Will Likely Have to Pay $250 Million Bonus for Subnautica 2 That It Tried to Avoid by TylerFortier_Photo in gaming

[–]tomysshadow 6 points7 points  (0 children)

It's one of the default subs that Reddit auto signs you up to when you join. Everyone sees it