22 Apr 2017 @ 1:29 PM 

I wrote about a program that allows setting Application Volume on the Command line in my Slapping the Windows Master Volume as well as my Retrieving and Setting Individual Program Volume posts. It is a utility to manipulate Windows Session Audio via the command line.

As it happens, I’ve taken a slight interest in older hi-fi equipment. As a result I picked up a Denon DR-M07 Tape Deck- as well as three of the higher-end Metal audio cassettes for recording. I’ve found it to be very interesting. One aspect of the setup is that I have it routed to my PC. The Tape Deck playback output is connected via RCA cables to my Sound Card’s Daughterboard AUX RCA inputs. The Recording input is connected to the smaller Headphone connector that is on the “breakout” module, so I can record audio that is playing.

Now, this is obviously Audio related, but where does the Volume Slapper program fit in here? Well to Record, I must turn down the volume of all programs I do not want to record (for example, System sounds, Skype notifications, sound in Web browsers) and switch the sound card to Headphone mode. I also need to disable the Aux Input, as it causes feedback (the tape deck outputs a low level signal of it’s own as well when recording). Now, for the most part these are pretty simple to do but adjusting audio levels is slightly annoying to do- especially if their current levels were carefully crafted over a period of time to suit what I was doing. My thinking towards Volume Slapper was to make it easy to restore the Audio levels I was using before I had a “recording session”. Disabling sound devices and flipping hardware relays (the headphone setting of the card) are outside the scope of the program IMO.

it also seems more widely applicable. It could be useful to save the volume settings of active programs so you can restore them later for a number of reasons. Maybe you achieved a perfect balance between your browser being used for video playback on one monitor and the audio of your game being played on your other screen, for example.

Now that that is out of the way, the actual implementation is actually quite simple. We just need to handle the new save and load features, obviously. In order to simplify my own usage I had it default to a “quick.xml” file saved to appdata if a file isn’t specified. The file itself- as indicated by the filename, is an XML file. it is built using the standard XElement capabilities of the .NET Framework. Since the usage is so simple here I didn’t reference Elementizer. it just saves the session names and the volume to the XML file, or loads them from an XML file. Of course since the sessions can be different between saving and loading, it currently ignores new sessions or sessions that didn’t exist when the data was saved. Saving the volume, starting word, and loading the volume file that was created won’t affect Word’s audio volume, for example.

VolumeSlapper, including these recent modifications, can be found on github.

As an interesting aside I’ve started working on a sort of silly “task” project which basically acts as a strict task scheduler that runs precisely and shows the time before each task is going to be run next.

Posted By: BC_Programming
Last Edit: 22 Apr 2017 @ 01:29 PM

EmailPermalinkComments (0)
Categories: .NET, C#

 05 Apr 2017 @ 11:31 AM 

For a while now Windows 10 has had a “Game Mode” feature. I’m rather mixed on the feature myself, but generally find it strange.

I’ve never been a fan of the “Game Booster” software phenotype; it seems like it is largely snake oil fakery, and where it does have an effect, it is really just a result of the same sort of adjustments that can be made manually via services or other configuration options. Game Mode does have an advantage, here; the first is that it sort of puts those applications “out of business”, and, being built into the OS, it is a much safer implementation, and it’s  goals are less extreme. On the other hand, it does sort of legitimize the concept, which I’ve always found crazy, that such applications are in any way worth using.

I tend not to use the feature, however I can see it having benefits for some users and some systems. To me, overlay features such as the Game Bar that are used in this case feel like a sort of “chaff”; It is better than older approaches like the “Games for Windows Live” featureset, and better implemented as well, but I’ve found that- at least for now- it’s not really for me. This may be partly because I’m not a particularly heavy gamer, though- I seldom play games on my PC- nowhere near what I expected.

I also tend to enjoy older titles. Interestingly, I’ve found many older games- even going back to Win98 Games, run surprisingly well on Windows 10, most issues I’ve encountered with older titles tend to be a result of either lack of 16-bit compatibility (with much older titles) or are a result of the hardware being far in excess of what the game ever expected. A lot of older titles don’t have support for 2560×1440 for example because it is such a high resolution, requiring minor patches. Windows 10 is surprisingly backwards compatible in this regard. Even better than previous Post-Vista Windows releases, including Windows 7 which had an interesting explorer palette realization issue. that tended to cause problems with games that used 256-color modes.

Posted By: BC_Programming
Last Edit: 05 Apr 2017 @ 11:31 AM

EmailPermalinkComments (0)
Categories: Games, Windows

 26 Mar 2017 @ 4:12 PM 

I’m writing this, right now, on a computer from 1999; a Rev C iMac G3 system that I got off Craigslist for $20. This system has 64MB of memory and a 333Mhz Processor, using Microsoft Word 2001 running under Mac OS 9.2.2.

Considering the advances we’ve seen in tech, you would expect this system to be entirely unusable; and yet here I am using a relatively full-featured productivity application with seemingly the same responsive behaviour and capability as a more modern system.

This is leading inexhorably to a discussion regarding bloat. As computers grow faster, the software that runs on them expands to use the additional capabilities. I’ve had modern text editors that type out what I wrote in slow motion- updating a character every second or so, on a 4Ghz quad core system with 32GB of Memory that isn’t otherwise being taxed. There is very little excuse for this, and yet it happens.

As computers moved forward we find that extra capability is, oftentimes, absorbed by developers. That is, a faster Processor means they can get the same speed by using C instead of Assembly, or they can write the software in a higher-level Language like Java or C# instead of writing it in C. Those are entirely reasonable as, in a way, they do eventually reduce the cost of software to the consumer. Nowadays that question is in regards to web applications. We have many pieces of software that are themselves written in Javascript for example, which put a heavy load on the interpreter under which they run. As an interpreted language the performance is reduced even further, but it is considered acceptable because faster systems are the norm and your typical system is capable of running that at speed.

But in many respects, we’ve been upgrading our hardware but running in place. While many aspects have certainly improved- entertainment/game software, for example, has higher resolutions, more colours, higher-res textures and more polygons than ever before – a lot of otherwise basic tasks have not greatly improved.

But at the same time one is often left wondering exactly what features we have gained in this inexhorable forward march. As I type this the system I’m writing on is not connected to the  Internet; I’m not receiving any notifications or tips, I’m not seeing advertisements for Cloud storage or nag screens about installing the latest update to the system software. I can install applications and use them, and in many cases I can use them with a lot of the same effectiveness and even performance as corresponding modern software. Accounting for the exception, of course, of web browsers.

Web browsers are an interesting case in looking how computing has changed.  Your typical system from the late nineties would have had perhaps 64MB of RAM, like the iMac G3 I’m using right now. I can run Internet Explorer and open local web pages (I’m too lazy to move the system to connect it via Ethernet, since it naturally has no Wireless capabilities on it’s own), and Internet Explorer only consumes 10MB of memory. Compared to my main desktop system, the proportions are similar- oftentimes I find Firefox or Chrome consuming upwards of 1GB of Memory! It is easy to blame this on software bloat- that browsers have merely started using more memory because they don’t need to not- obviously a web browser using upwards of 1GB of memory couldn’t have existed at all in 1999, but it runs without issue on most modern systems, particularly now that 4GB is becoming a “bare minimum” to run a system with. Blaming it on that would be an oversimplification, as the task of browsing has ballooned from the time period where it could be done with that much RAM; now browsers need to not only support more complicated HTML structures as well as features such as Stylesheets, but they are effectively becoming a platform on their own, with web applications running inside of browsers. To make a contemporary reference- it’s like a Hypercard stack, to put it in terms relative to the older Mac systems I’ve been fiddling with lately. As a result, saying it is entirely due to bloat would certainly be unfair.

Perhaps, then, we need a better benchmark for comparison. I’m writing this in Microsoft Word 2001 for Mac, so perhaps Microsoft Word is a better comparison? As I write this, Microsoft Word is using 10MB of Memory. Launching Microsoft Word 2013, and opening a blank document, I find that, to begin with, it is using 55MB of memory.

Now, compared to the total amount of memory on each system, Word 2013 is actually using a much smaller percent; 10MB is about %15 of the total memory on this Mac, but 55MB is only 0.32% of the total 16GB of memory on the laptop I started Word 2013 on; so in that sense I suppose we could argue that memory usage of applications has reduced compared to the available hardware. But of course in absolute terms the story told is different, and a blank document is using over 5 times as much memory as it takes for this older release on an older computer to maintain and display a multiple-page document.

There are a number of reasons for this sort of difference. For one thing, excessive memory usage by certain components might not come up in testing on more recent machines; as long as it runs, excess memory usage might not be detected, and even if 55MB is higher than it is on this older system, as established, the smaller usage of total physical memory on most any modern system is going to result in it not being considered an issue. Another reason is that sometimes with additional capabilities, Software gets added effects. Features like Aero Glass and the drawing of features like the modern Office Ribbon, for example. Also to be considered are modern features like font smoothing, which were less prevalent and advanced in 1999.

Nonetheless, it is still somewhat humourous that a basic word processor has managed to start using that much more memory for what is effectively the same task! The actual word processing capabilities are largely equivalent between the two releases of the software, which is not something we can argue with browsers.

Perhaps it is not something that is too much of a problem. In many respects, it would seem that application needs eventually dictate what people consider a “bare minimum” of RAM, meanwhile, we can see many different productivity tasks remained largely the same and contain similar feature sets and capabilities as those requirements rise. Early versions of Microsoft Word or Excel, for example, generally contain the bulk of features that people make use of in the latest release of the software, while using a relatively infinitesimal amount of system memory in doing so. This does lead to what I find cringeworthy proclamations such as “How can you possibly do anything with only 2GB of Memory?” which make sense in a certain context but when applied broadly can be pretty silly; We managed to do many of the same things we are doing nowadays with desktop computers 20 or 30 years ago, with far less memory and processing power, after all. Additionally one could easily imagine bringing somebody from, say, 1994 forward in time to hear such a statement and have them be in awe at how such an unimaginably large amount of memory – an amount still unheard of even for Hard Disk sizes to them – was being dismissed as far too little RAM for many of the same sort of tasks they had performed without issue.

Personally, I’ve found popping onto an old computer- like this iMac G3, to be a helpful experience. These are computers that, many years ago, were top of the line, the sort of systems some people would drool over. And now they are relegated to $20 Craigslist ads, which are the only thing between them and the dump. Meanwhile, the Operating Systems are not only responsive but are designed in such a way that they are quite easy to use and even, dare I say it, fun to use! Mac OS 9.2.2 has little audio flairs and clicks and pops and swoosh sounds associated with UI interactions that actually had me missing it when using my more recent systems. Which is not to suggest that I think it wouldn’t become annoying fairly quickly with regular usage.

Unfortunately — or I suppose in some ways, fortunately — the systems are relics of a bygone era. Computers are commonplace enough that we have them in a form that we can keep in our pocket. We have become so accustomed to the devices that they are now a part of daily life, as are the networked components, perhaps even more so. People are constantly updating their Facebook feed, checking other people’s posts, reading their Twitter feeds or their Instagram, sending people text messages, arguing about politics with some brother of a friend of a friend of a friend on Facebook who they’ve never met, etc. We are living in what could effectively be described as a “Fantasy World” by people in the 90’s and yet here we are living it everyday to the point where it is not only mundane, but where things considered unimaginable conveniences only a decade ago are now unacceptable.

This is not intended to suggest we should not strive for or even demand progress, just that maybe we should lay off the hyperbole in describing how lack of such progress is detrimental to our life. A web portal missing a minor convenience feature is not something to throw a fuss over; software beign released at a price point you disagree with is not a reason to go on the warpath against it’s developer, and just because you have a Tumblr blog with 5 readers doesn’t make you a social media influencer that developers- or anybody, for that matter- should cater to in any way.

There is an argument that something ineffable has been lost with the rise and ubiquity of the internet that is very much beyond description. While nowadays “research” is loading up Google in a new tab and running a few searches, it used to consist of going to the library and looking up Index cards and reference material. Where dealing with say a Programming conundrum or trying to use a program feature you weren’t familiar with meant looking it up in the hard-copy manual, or in the former case, actually working on your own solution based on what you needed, now you just Google for it and go directly to the answer on sites like Stack Overflow- you copy paste the code function and use it, or you mindlessly follow the steps outlined to use the program feature you want. Neither way is of course better than the other, it’s just that the Internet really is the ultimate Enabler.

I have about a half dozen books that I’ve barely even cracked open that, if I had them a decade ago, I would have read cover to cover several times over by now. I’ve had Project ideas squashed before I even started them by a quick Google search to find out that there are already programs that performed the function and they did it better than I even imagined. Whereas before I would have pursued such projects anyway- not knowing there was anything already done, and end up learning as a result.

As much as the ubiquity of the Internet has helped us, it has also acted as the ever-present enabler to our addictions. It feeds our addiction to information, our addiction to instant gratification, and our ever-present curiousity, but it does so with what could almost be described as empty calories. It’s like eating hard candies when you are hungry. So it leaves many unsatisfied and seeking more, wondering what is missing.

It was the hunt for the information, the trail that you blazed while doing research or cross-referencing in a Dewey-decimal index. It was the excitement of finding a nice thick book on a subject you were interested in, knowing it would keep your information “mouth” fed for weeks to come as you read and reread it, sucking in all the information it had to offer. Even the bits you couldn’t use. I read “Applied Structured BASIC” from cover to cover multiple times despite it covering ancient BASIC dialects that had long since stopped mattering.

Now, I find that there is a place for the phrase “information overload”. No bookshelf, no matter how full, can possibly compete with the World wide web in terms of the ease of access to information, the accuracy and inaccuracy of that information, as well as the sheer amount of that information, to the point where one could almost argue there is too much. Perhaps the skill in using the Internet for information is having a proper “tunnel vision” to get the information you want and ‘get out’ when you are looking for something specific. The alternative, of course, is to go looking up how to create a Jump List in Windows 7 and later and suddenly finding yourself reading about how Strawberries are harvested.

Posted By: BC_Programming
Last Edit: 26 Mar 2017 @ 04:12 PM

EmailPermalinkComments (0)
Categories: General Computing

 19 Mar 2017 @ 4:42 PM 

With older CRT screens, “Burn in” was when the phosphor coating was effectively “burned off” by the scanning beam. There were many examples of older computer displays that were permanently displaying the WordStart Menu or Lotus 1-2-3 Menus, for example, because people would have them open so long.

This problem was “solved” by LCD displays. But as it happens there is a similar symptom that can occur with IPS displays, it’s just not typically quite as permanent.

A few years ago I got a 2560×1440 IPS Monitor to replace the 1440×900 TN panel I was using. It has served me well, however over time I’ve noticed a “darkening” near  the top of the screen. It never matched up with images I would display- my browser or Visual Studio- for extended periods of time, so I figured it was a minor defect. It was not particularly noticable either.

More recently, though, I was able to clearly make out many Firefox icons in precisely the location they are when the Firefox Window is maximized on that screen. This is because on a few occasions I decided not to turn that screen off overnight. The image persists apparently because of electrical changes in the actual cells, which effectively result in it letting less backlight through at the same voltage level.

I’ve already ordered a new monitor, but I’ve had some success at least diminishing the afterimage by leaving a full white screen overnight a few times. (Just a quick Windows Forms program). I’ve also taken to not having Firefox maximized but instead expanded manually to fill the screen but shrunk downwards a bit so the same elements aren’t in the location that was “persisted”.

It’s interesting that the afflictions of yesterday’s technology that were purported to have been solved have at least in some way remained with us. While it allegedly can be fixed (with either a full white or full black screen, depending who you ask), it is certainly something worth avoiding to begin with. I certainly found the behaviour unexpected, thus making this quick little post on the topic.

Posted By: BC_Programming
Last Edit: 19 Mar 2017 @ 04:42 PM

EmailPermalinkComments (0)

 17 Mar 2017 @ 9:59 PM 

There has been some concern and even repudiation about Microsoft’s decision to not provide updates to Windows 7, 8, and 8.1 when run on hardware using a newer processor, such as the Intel Kaby Lake processors. This has been claimed by some as a marketing move to try to “force” users to use Windows 10.

Now, I’m not the greatest fan of some of the things introduced with Windows 10. At the same time, I have no modern systems- other than Virtual Machines- not running either Linux or Windows 10. So it’s more an annoyance at how much one has to do to appropriately assert one’s desired options with Windows 10.

Windows 7 and 8/8.1 have continued to be supported as per the Windows lifecycle; the change is for hardware that was literally introduced after the end of mainstream support for both operating systems. Extended support only applies to Security updates; however, supporting security updates on Windows 7 and 8/8.1 with those Processors would mean supporting the processor. The issue there is that while the newer chips likely run the same way as older chips did with the same code, there is no guarantee of that, and it would still require the software to be tested and bugfixed specifically for those newer chips, which means effectively, supporting the new processors.

The Updates cannot go out on an “as is” basis to systems with the new processors because hten any problems will incur support costs and bugfixes to those updates that will also effectively mean supporting the new processors on the older software.

Worth noting is that this doesn’t lock out enterprising users who are willing to take the risk that their entire Win7/Win8/8.1 system will stop functioning due to said updates. One can still workaround this, it just requires you to step off the beaten path even further, making it much more clear and far “safer” for Microsoft to tell you to basically piss off if you try to get support.

It’s likely this approach may have been adopted to try to prevent another repeat of the Windows XP diehards. Mind you, it hasn’t worked so far; Many people are now Windows 7 diehards to much the same capacity. But at least- from Microsoft’s perspective- they won’t be financing it.

Posted By: BC_Programming
Last Edit: 17 Mar 2017 @ 09:59 PM

EmailPermalinkComments (0)

 26 Feb 2017 @ 12:21 PM 

BASeCamp Network Menu, which I wrote about previously, was a handy little tool for connecting to my VPN networks. It, however, had one disadvantage- It was clearly out of place- the style was “outdated” for the OS themes:

BCNetMenu displaying available VPN connections.

As we can see above, the style it uses is more like Office 2003, Windows XP, etc. Since the program is intended for Windows 10, that was a bit of a style issue, I think. Since none of the other Renderers really fit the bill, I set about writing my own “Win10” style menu foldout ToolStrip Renderer; Since the intent was merely to provide for drawing this menu, I’ve skipped certain features as a result to make it a bit easier.

Windows 10 uses an overwhelmingly “flat” style. This worked in my favour since that makes it fairly easy to draw using that style. Windows Forms- and thus the ContextMenuStrip one attaches to the NotifyIcon, allows overriding the standard drawing logic with a ToolStripRenderer implementation; so the first step was to create a class which I derived from the ToolStripSystemRenderer. This attempts to mimic the appearance of many Windows 10 foldouts by first drawing a dark background, then drawing a color over top. However- the color over top is where things were less clear. We want to use the Accent Color that is defined in the Windows Display Properties. How do we find that?

As it happens, dwmapi.dll has us covered. However, it bears warning that this is currently an undocumented function- we need to reference it by ordinal, and since it’s undocumented, it could be problematic when it comes to future compatibility. It’s very much a “use at your own risk” function:

This function uses DWMCOLORIZATIONPARAMS, which we of course, need to define:

Once defined, we can now create a helper method that will give us a straight-up color value:

We allow for an “Opaque” parameter to specify whether the caller wants the Alpha value or not; of course, t he caller could always do this itself but the entire point of functions is to reduce code so may as well put it in this way. it takes the 32-bit integer representing the color and splits it into it’s appropriate byte-sized components through shift operators, and uses those to construct an appropriate Color to return.

Using this color to paint over an opaque dark background (the color used with the Taskbar Right-click menu, for example) gives the following Menu, using the new WIndows 10 Renderer I created:

Not a bad representation, if I say so myself! Not perfect, mind you, but certainly fits better than the Professional ToolStrip Renderer, so I don’t think calling it a success would be entirely out of band. A more interesting problem presents itself, however- When configured in the display properties to have transparency effects,The default Windows 10 Network foldout has a “Blur” effect. How can we do the same thing?

After unsuccessful experiments with DwmExtendGlassIntoFrame and related functions, I eventually stumbled on the SetWindowCompositionAttribute(). This could be used to set an accent on a window directly- including, setting Blur Behind. Of course, as with any P/Invoke, one needs to prepare yourself for the magical journey with some declarations:

If the Blur setting is enabled, then the EnableBlur function is called to enable blur; otherwise, to disable blur. In both cases, it tosses in the Handle of the ToolStrip that is opening, which, apparently, is the Window handle to the actual menu’s “Window”, so it actually works as intended:

I also found that darker colours being drawn seemed to be “more” transparent. Best I could determine was that there is some kind of transclucency key; the closer to black, the more “clear” the glass appears. References I found suggest that SetLayeredWindowAttributes() could be used to adjust the colour key, but I wasn’t able to get it to work as I intended; Since the main effect is that the “Disabled” text, which is gray, appears like more “clear” glass within the coloured blurred menu, I found it to be fine.

It will still be ideal to write additional custom draw routines in order to allow checked/selected items in the listing to be more apparent. As it stands the default “Check” draw routine appears more like an overlay on the top left of the icon, but it’s easy to miss; it would be better to custom draw the items entirely, and instead of a checkmark perhaps highlight the Icon in some fashion to indicate selection.

Posted By: BC_Programming
Last Edit: 26 Feb 2017 @ 12:21 PM

EmailPermalinkComments (0)

 16 Feb 2017 @ 5:16 PM 

I’ve adjusted the program to add more options:

  • Font settings can be customized
  • Left-clicking on the Notification Icon will now show the network menu
  • The tooltip will now display connected networks
  • implemented a new “Windows 10 Style” Menu Renderer. This is the default when installed on Windows 10, and will by default use the Windows 10 Accent Color as well. (No blur behind). It’s not precise and is more a stylistic imitation but it fits better with Win10 than the other Renderers (IMO)

As usual the latest source can always be found On github. And The Installer for 1.1 can be found Here.

Posted By: BC_Programming
Last Edit: 16 Feb 2017 @ 05:17 PM

EmailPermalinkComments (0)

 29 Jan 2017 @ 6:11 PM 

I wrote previously about manners in which the SimpleWifi library can be utilized to enumerate available wireless connections and disconnect or connect to them. As my entire reason for writing BCNetMenu, however, was for VPN connections- not for wireless connections- it was necessary to figure out that piece of the puzzle as well.

The approach I discovered may not be entirely forward compatible, however it appears to be functional going back through many versions of Windows, so it ought to keep working. I wasn’t able to find a more official, “sanctioned” method. Thje basic idea is to effectively read the configuration information directly. The Configuration information for VPN connections can be found in the file “%APPDATA%\Microsoft\Network\Connections\Pbk\rasphone.pbk”. I suspect it may also be in the corresponding Common Application Data folder, found set in the %PROGRAMDATA% environment variable.

Retrieving the VPN names is fairly straight forward; effectively, we just want to find the section names. We can use a straight String parse of each line, but we can also use a Regular Expression with a group to define the actual name. Matches to:

is sufficient to find all the appropriate sections, and retrieve the names via the matches. However, the name is not quite enough; we need to cross-reference this information with information available via the NetworkInterface class; then we can use appropriate properties to return a particular data object representing the VPN connection:

is a direct link to the code in question as it appears in the BCNetMenu project. I’ve been pleased with the programs performance over the past month or so in replacing the default Windows network foldout to which I have less positive affinity.

But enumerating connections is one thing- connecting or disconnecting is another. After some searching I ended up finding only one method that was suitable for my use case, as other methods either required manual password input or to have BCNetMenu manage passwords, which I felt was outside the scope of what I wanted to do. Instead, the program will basically just run rasphone.exe with the appropriate VPN name; while this will show a dialog, the saved login information is pre-populated, so, at least for my intended use, I’ve found it sufficient to improve upon the default Windows 10 VPN Foldout.

For the same of comparison, here is the “before” image:

The default Windows 10 Network Foldout

This is an entirely usable foldout- or, it appears that way. However, clicking a connection takes one to the Control Panel. For example, here is the WIndow that appears when I click the connected “Mainframe” option:

From a UI design perspective this boggles my mind. There is zero indication that I clicked “Mainframe” at all. Why are these options listed separately and clickable individually if they all lead to the same place? Clicking a connected VPN connection should disconnect it; clicking a disconnected VPN connection should connect it. The way it has been altered in Windows 10 defies good UI design as far as I’m concerned.

Not that I’m any expert on good UI design; I just know what is easy to use for myself and when a “feature” or alteration causes one to occasionally mumble to themselves angrily or laugh about how silly the feature is even months after it’s introduction it probably wasn’t for the best. As far as getting the desired behaviour, I had two alternatives; the one that I originally used was a registry adjustment which would set the foldout to use the Windows 8 implementation. This worked for some time, however I found that, since the dialog hadn’t had adjustments for Windows 10, some features didn’t work properly; I found in some cases it wouldn’t respond to clicks or refused to connect to a wireless network, but the network control panel functioned as intended. In order to bring back my own desired behaviour, I created BCNetMenu, which appears like this:

BCNetMenu displaying available VPN connections.

It’s not the fanciest thing in the world; it’s not intended to blow anybody’s mind with an amazing glass-like appearance or transparent Window blur or anything like that. It’s a relatively basic pop-up menu that just lists available connections. Clicking a connected one disconnects. Clicking a disconnected one connects.

As it should be, if you ask me!

Posted By: BC_Programming
Last Edit: 05 Feb 2017 @ 10:27 PM

EmailPermalinkComments (0)
Categories: .NET, C#

 08 Jan 2017 @ 12:10 PM 

When I wrote BCNetMenu, it was primarily for replacing Windows 10’s built in network foldout for VPN connections. However since that Network foldout also managed Wireless connections, I decided to add that in as well.

When you have a need that would be filled by a library, it’s always a good idea to look through results on NuGet and see what there is. As with most requirements there are many options when it comes to reading Access Point information. In my case, I settled on SimpleWifi

The Consumer code for SimpleWifi is, well, Simple, which is one of the reasons I opted for it. It provides the information needed and was quite easy to use. Here is an example static that provides an enumerator method that retrieves Access Points:

I found there was an odd issue with this approach. it seemed as if AP info would “trickle” in over time; the second time I opened the menu there would be more access points. I don’t know why that was, but I added a bit of extra code with the intent of providing a larger set of “seed” networks when the menu is opened for the first time. It seems like the act of inspecting Access Points causes more to be actually added. At any rate this is the logic I added to the start of the GetWirelessConnections() logic:

This appeared to rectify my problems, and the Menu that used this method was properly showing available wireless networks appropriately.

Posted By: BC_Programming
Last Edit: 08 Jan 2017 @ 12:10 PM

EmailPermalinkComments (0)
Categories: .NET, C#, Networking

 17 Dec 2016 @ 7:20 PM 

I’ve complained before about Windows 10’s rather odd VPN and even wireless connection interface, in that it has excessive levels of redirection. I went ahead and wrote a small program that appears as a notification icon which attempts to make it a bit more straightforward. It’s not fancy, but it seems to get the job done.

I’ve put it up on github, it can be found here.

Posted By: BC_Programming
Last Edit: 17 Dec 2016 @ 07:20 PM

EmailPermalinkComments (0)
Categories: .NET, C#

 Last 50 Posts
Change Theme...
  • Users » 42425
  • Posts/Pages » 353
  • Comments » 104
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight


    No Child Pages.

Windows optimization tips

    No Child Pages.

BC’s Todo List

    No Child Pages.