Författare: harriklingsten0009

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)


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);