As you know, You can set the location property of most objects through this code
.Location = new System.Drawing.Point(40, 60);
I could change the location of the webBrowser1 easily and erveything was ok..
but when I tried to use it again to change the location of gecko webBrowser, the location hasn't changed also I didn't get any error message when I used it with gecko webBrowser
geckoWebBrowser.Location = new System.Drawing.Point(40, 60);
Also I found this code in a website but in vain nothing has changed.
geckoWebBrowser.Left = (???);
geckoWebBrowser.Top = (???);
Could I know how can I change the location of geckoWebBrowser ??
BTW, I'm running my code in STA thread (new form)
Also the version of gecko is 60.55
Here is my full code
private void button2_Click(object sender, EventArgs e)
{
Thread threadgec = new System.Threading.Thread(() => rungecko());
threadgec.SetApartmentState(ApartmentState.STA);
threadgec.IsBackground = true;
threadgec.Start();
}
static void rungecko()
{
Xpcom.Initialize("Firefox");
var geckoWebBrowser = new GeckoWebBrowser { Dock = DockStyle.Fill };
geckoWebBrowser.Location = new System.Drawing.Point(40, 60);
Form1 f = new Form1();
f.Controls.Add(geckoWebBrowser);
geckoWebBrowser.Navigate("www.google.com");
Application.Run(f);
}