I know for Slovenia that you can start a company there as a foreigner, and then get a work visa simply by employing yourself, it's a fairly simple procedure. After 5 years you qualify for permanent residency (I believe that's the same everywhere in EU).