Aug
|
Spurious/Incorrect .NET Form.Activated() Event
2017
Notice: Using the "fix" below can result in the form's Notice 2: I've added another version below. A couple of new categories for this blog: But, let's continue with the subject of this post: the Quite a few years ago I created my own Metro-style form based on the idea of Microsoft's flat-style interface. Metro was approximately a couple of years away from release and there wasn't really any screenshots of what it would look like. I ploughed on with my version - including a break of a year because it took a long time to get it working correctly as working with forms that have their The biggest issue was getting Windows to treat the borderless form as a true window; it just didn't give a crap about it. A quick way to tell if Windows regards a form as a true window is to minimise it to the taskbar. Does it immediately disappear from view? It's not a true window. Does it animate down into the taskbar? It's a true window. There were two issues remaining (that I remember, anyway): restoring the window from its minimised state causes the window to gain an extra X number of pixels on its height. That's still an issue and seems random as to which form it affects. The fix I put in-place seems to work most of the time, but regardless, the child controls gain extra height with/without the form growing in size. Clearly more work to be done, there. The second issue which I'm going to talk about here is the form's It seems somewhat random when it happens, but here's how it generally goes:
This causes a problem in my particular case because I handle and expose the activation event via a For example, here's a (currently work-in-progress) form that's active: And here's that same form when it has become inactive: As you can see, having the form become active when it actually isn't is confusing to the user. And extremely irritating to me. My first quick go at fixing this seems to work; I'll have to keep testing it over the long term but it seems like it may have solved it. Not a fan that I have to do this in the first place, but what can ya do? Have this at the first line(s) within the
Here's another version (see notice at top of this post):
It appears I'm not sure if it's worth putting a check into the |
Aug
|
Server Going Offline
2017
Well, I'm not surprised in all honesty. The server this and my other sites are hosted on has started to go offline for 10 - 240 minutes per day, at (seemingly?) random times. About 15 years ago (christ, really!?) UK2 moved me from my original server when I upgraded my hosting and since then it's been going to shit. I - finally - got them to move me about within the last year to another server after constant down times, except within the last week it's all gone to shit again. The difference is that before this server change, the sites were going offline for (typically) a few minutes a time numerous times per day around two days out of the week, but on this new server the sites are going offline for extended periods of time once or twice a day every other day. Compared to other hosting providers, UK2 isn't actually that cheap; I haven't switched providers because there's two decades worth of infrastructure I've built-up with UK2 that I really can't be arsed sorting out. |
Aug
|
No, I Haven't Binned This Off
2017
Still here. I haven't posted in a couple of days because I didn't have anything to write about. While I begin working on a new program yesterday and got a bulk of it done today, I'm not going to write anything on it until it's near being released. It's more of a "tool" than a fully-feature application, but it's still useful for those wanting, er, it. |
Aug
|
In the works: Voting
2017
A new feature is coming and that is...
Each post will have a thumbs up and down buttons. This'll allow posts to be voted on and will give me an idea of the types of posts to make more of in future - or fewer of. It would've gone live today but I'm having a bit of a pisser of a time when it comes to actually displaying the voting results to myself. For some reason, a value of I can only imagine it is something to do with the Once this is fixed, then I'll upload the changes. |
Aug
|
Formatting Fix for Mobiles
2017
I was just about to go to bed and then thought it would be a great idea to jump right into PHP and sort out the mobile-issue with the quote above. D'oh. Alright, the blue quote at the top of this page seems to be a bit too long for mobile browsers and overflows out of its header bar. The solution? Don't show it on mobile browsers - sorted! Did a quick search to see if I could just detect This somewhat goes against my own lightweight way of doing things, but presumably it's not quite as easy as detecting a Integrated it and all that and then the site stopped working due to an exception. Deleted the A quick addition of
along with a change to remove the appropriate Does it work? No idea. Haven't actually tried it on a mobile device yet (although inversing the logic works so I'm hopeful it's all fiiine) as my phone is elsewhere in the house. But, there are no errors and so worst case is that it makes no difference. |
Aug
|
Documentation - is it worth it?
2017
It feels like I should be writing another post as it's been a few days. While that's technically true, there's been posts every day now but they were actually written earlier in the week and published once per day with the new timed publish update. So I'll write a quick post about documentation. Specifically, the FileSieve documentation. I haven't done any programming for the past couple of days and so thought I should at least do something, and that something was some FileSieve docs. I remembered a thing: a couple of days ago I looked at the Analytics for the FS documentation and it appears hardly anyone even looks at it. So, really; am I just wasting my time with it? Honestly... yes, I think I am. I started reworking the single Automation page into an entire section before this realisation and now I'm starting to wonder if there's any point? Unlike a lot of the rest of the application, automation requires documentation. Maybe I should just shove out the required info (and not bother polishing it all up) and be done with it and spend any other FileSieve time on the application itself. |
Aug
|
Timed Publishing? In!
2017
Woke up yesterday morning and had a thought while I was on my way to the bathroom: timed publishing doesn't need to be Cron-based. Just set a date on the post and display that post if the current date/time is past it. It seems I got somewhat fixated on the whole Cron job method of allowing posts to go live based on a set date and time that the obvious non-scheduled way of doing things just passed me by. I spent yesterday getting the feature in and made it live. Posts are now displayed based in their (newly added) I gave the site a quick test on mobile after someone mentioned it doesn't work. Seems it's just a minor formatting issue, at least on Android Chrome, involving the quote in the header at the top of the page. I'll probably just not display it on mobile browsers; presumably there's a Didn't quite get around to sorting out the categories display (click on a category at the top of this post) and so viewing a category right now doesn't work quite how you'd expect. I probably should've gone with keywords rather than rigid main and sub categories. Finally, I added a set of badges to posts so I can see at-a-glance if any specific flags are set rather than having to rely on remembering what their background colours denote. |
Aug
|
FileSieve Documentation
2017
I seem to be on a major productivity roll lately. I realised why, too: this new Corsair K95 RGB Platinum keyboard (US version can be seen here). It might seem like I'm babbling on about mechanical keyboards like a zealot, but I had to plug in my previous rubber-domed Logitech G19 keyboard recently and holy crap. The holiest of holy craps.
Since I got this new keyboard (a week or two, now?), I just can't stop typing on it. I'm having to come up with excuses to work on something just so I can use it. The upshot of this is that my productivity is going a bit insane. Even these posts you're reading are starting to be written days in advance - that's how much I'm writing now. In fact, I've decided to add a whole new I don't even want to imagine how much output has been gimped while having to use that previous rubber-johnny keyboard. Ugh. |
Aug
|
VB Runtimes Pack, release 8
2017
Speaking of unexpected happenings, I got contacted a couple of days ago by someone asking me if the Visual Basic 6 Runtimes Pack was free for enterprise use (spoiler: it is). The pack doesn't require me having to recompile anything using the Visual Basic 6 IDE, as I haven't had that thing installed in well over a decade, so I thought I'd repackage it in an updated installer. Running the original VB Pack installer itself shows that it was littered with errors. Not errors in the files it was installing (well, maybe a couple - but more on that later), but in the instructions and license. As with all of my software installers, there are three text documents the installer shows to the user. There's the License that is shown at the very start which contains the licensing terms that must be agreed to before the installer will do its thing. Second is the Before, which contains general information. In this case, it outlines what the pack is and what it'll install. Also included is the pack version and its release date, just like the other two docs. Thirdly, and lastly, is the After. This is just a quick message letting the user know that everything is installed. The problems are down to the site each document points to: they're wrong. As this pack was originally released way back in 2002, the URLs are pointing to my old site Another problem is the release date. Each of the three documents mentioned above have entirely different dates! No idea how that happened. Oh, the file errors that I alluded to above. There was a note in the Before text saying that any .dll registration errors that occur can safely be ignored. While setting other properties within the installer, I noticed there was a flag for ignoring any errors that are thrown during the As well as general quality control, I wanted to get this site properly advertised in there as there is a huge amount of downloads of that pack. It seems people and companies just tell their customers to download the installer from my site. I might as well get a little bit of advertisement from it as it's not exactly like I'm gaining anything. |
Aug
|
Timed Publishing
2017
I could do with setting a Publish Date on unpublished posts and have them go live at specified times. Except of course such functionality isn't present on this blog. I'm on shared hosting, so I never really got into messing with Cron jobs. I think Laravel has support for some time-based thing, but I'm not entirely sure how it can trigger itself. Must be based on visitor access - that's the only thing I can think of. If the site doesn't have visitors then the job would be missed... too unreliable in my opinion, so gawd knows. |