Exemplo n.º 1
0
        protected void btnCreate_Click(object sender, EventArgs e)
        {
            Thread thread = new Thread(() => WebPageBitmap.InitBitmap("wtest3", ShareMode.Question, ""));

            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
            thread.Join();
        }
Exemplo n.º 2
0
        public static void LoadBitmapSTA(String word, String path)
        {
            Thread thread = new Thread(() => WebPageBitmap.InitBitmap(word, ShareMode.Question, path)); // make sure bitmap exists

            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
            thread.Join();
        }