C# General

mouse wheel and flowlayoutpanel

This little magical code makes it all happends. After I added this code any action with the mouse wheel will make the flow layout panel to scroll.

private void flowLayoutPanel1_MouseEnter(object sender, EventArgs e)


Resources for Game Developers

Jared Bienz is sharing good links to resources on the web if you thinking about begining developing games.


circle, social, twitter icon https://twitter.com/jbienz

More resources: http://content.gpwiki.org/index.php/Game_Content_Resources

File path to my self

Sometimes when you are working and backend with code that could be in diffrent types of context, called from a ASP.NET client or winform, unit test or something else. Using relative path to files could be a problem. This code could then be usefull.

static string AssemblyDirectory
var codeBase = Assembly.GetExecutingAssembly().CodeBase;
var uri = newUriBuilder(codeBase);
var path = Uri.UnescapeDataString(uri.Path);

Jquery tips, using not

Today I hade problem with a Jquery selector that was supose to select every visible items in a list. The visible or not visible is toggled with show and hide function. The result is that the style attribute display is either none or empty.

$(‘li.instruction:visible’).each(function () {


If the list where the item belongs to is not visible for some reason in my case because of  multiple tabs, it worked as long as the active tab was the same as the list belonged to, otherwise the selctor visible failed, or failed is the wrong word, it is sureley true the list and any items in it is no longer visible.

This is a safer aproach, works even if the list itself is hided.

$(‘li.instruction’).not(”[style=’display: none;’]”).each(function () {