PC Review


Reply
Thread Tools Rate Thread

Control location problem on a form ( C# )

 
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      29th Jun 2004
Hi! I posted this question in browser_ctl group as well but got no results.

I have a form with embedded WebBrowser. Upon clicking on a link in the embedded webbrowser that calls JavaScript's window.open() call where I pass different width, height, top, left and other parameters, I open a new form of the same type as the original.

I noticed that the webbrowser in the newly opened form is shifted to the right and bottom leaving gray areas on the left and top of the form. I narrowed down the problem to the Top and Left parameters being pass in the call to window.open().
If I set these parameters = 0, the browser positions itself nicely within the form.
If these parameters != 0 , the browser is shifted to the right and bottom.

I figured that I can adjust the layout etc in the ClientToHostWindow() event which seems to fire. However, I have not been able to reposition the browser. What can I do ? If I do not fix this, I'll have to spend months fixing all 7500+ instances of the window.open() in all web pages. Any samples on how to do it, please?
I am not that great of a C# programmer, so may be somebody can show me
how to adjust the position of webbrowser within the form, please.

I am also open to the idea of taking the browser control and painting it onto a new
location. I am open to whatever works as I am pretty desperate.




Many Thanks in Advance,

--Mike



Expand AllCollapse All
 
Reply With Quote
 
 
 
 
Shakir Hussain
Guest
Posts: n/a
 
      30th Jun 2004
Mike,

can you paste the code where you create a new form (after clicking link) and
adding browser control?

It will help me to investigate. I believe this problem can be fixed.

Shak
(Houston)


"Mike" <(E-Mail Removed)> wrote in message
news:ACF00E8B-2BE0-4050-8906-(E-Mail Removed)...
> Hi! I posted this question in browser_ctl group as well but got no

results.
>
> I have a form with embedded WebBrowser. Upon clicking on a link in the

embedded webbrowser that calls JavaScript's window.open() call where I pass
different width, height, top, left and other parameters, I open a new form
of the same type as the original.
>
> I noticed that the webbrowser in the newly opened form is shifted to the

right and bottom leaving gray areas on the left and top of the form. I
narrowed down the problem to the Top and Left parameters being pass in the
call to window.open().
> If I set these parameters = 0, the browser positions itself nicely within

the form.
> If these parameters != 0 , the browser is shifted to the right and bottom.
>
> I figured that I can adjust the layout etc in the ClientToHostWindow()

event which seems to fire. However, I have not been able to reposition the
browser. What can I do ? If I do not fix this, I'll have to spend months
fixing all 7500+ instances of the window.open() in all web pages. Any
samples on how to do it, please?
> I am not that great of a C# programmer, so may be somebody can show me
> how to adjust the position of webbrowser within the form, please.
>
> I am also open to the idea of taking the browser control and painting it

onto a new
> location. I am open to whatever works as I am pretty desperate.
>
>
>
>
> Many Thanks in Advance,
>
> --Mike
>
>
>
> Expand AllCollapse All



 
Reply With Quote
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      30th Jun 2004
Hi! Thank you for taking a look. Please navigate to

http://users.adelphia.net/~mikezat/m...pplication.zip

Inside, you'll find the entire C# solution as well as the TestPage.htm
Open the solution and change the url in the form load event to
wherever you place the html file:

private void PRSPopupForm_Load(object sender, System.EventArgs e)
{
this.Browser_Navigate(@"C:\Documents and Settings\conmxz\Desktop\TestPage.htm");
}

The test page contains 2 links. 1 is the one that calls window.open() without specifying the Left and Top. As you can see, it works great.
The second is the one giving me all the problem in the world. I am pretty desperate as the alternative is to modify almost 8000 pages.

"Shakir Hussain" wrote:

> Mike,
>
> can you paste the code where you create a new form (after clicking link) and
> adding browser control?
>
> It will help me to investigate. I believe this problem can be fixed.
>
> Shak
> (Houston)
>
>
> "Mike" <(E-Mail Removed)> wrote in message
> news:ACF00E8B-2BE0-4050-8906-(E-Mail Removed)...
> > Hi! I posted this question in browser_ctl group as well but got no

> results.
> >
> > I have a form with embedded WebBrowser. Upon clicking on a link in the

> embedded webbrowser that calls JavaScript's window.open() call where I pass
> different width, height, top, left and other parameters, I open a new form
> of the same type as the original.
> >
> > I noticed that the webbrowser in the newly opened form is shifted to the

> right and bottom leaving gray areas on the left and top of the form. I
> narrowed down the problem to the Top and Left parameters being pass in the
> call to window.open().
> > If I set these parameters = 0, the browser positions itself nicely within

> the form.
> > If these parameters != 0 , the browser is shifted to the right and bottom.
> >
> > I figured that I can adjust the layout etc in the ClientToHostWindow()

> event which seems to fire. However, I have not been able to reposition the
> browser. What can I do ? If I do not fix this, I'll have to spend months
> fixing all 7500+ instances of the window.open() in all web pages. Any
> samples on how to do it, please?
> > I am not that great of a C# programmer, so may be somebody can show me
> > how to adjust the position of webbrowser within the form, please.
> >
> > I am also open to the idea of taking the browser control and painting it

> onto a new
> > location. I am open to whatever works as I am pretty desperate.
> >
> >
> >
> >
> > Many Thanks in Advance,
> >
> > --Mike
> >
> >
> >
> > Expand AllCollapse All

>
>
>

 
Reply With Quote
 
Shakir Hussain
Guest
Posts: n/a
 
      30th Jun 2004
Mike,

I am investigating your code and able to see your problem. Give me some
time. Will bring up a solution hopefully.

--
Shak
(Houston)


"Mike" <(E-Mail Removed)> wrote in message
news:F2B46CFF-3EDB-43A9-BAF5-(E-Mail Removed)...
> Hi! Thank you for taking a look. Please navigate to
>
> http://users.adelphia.net/~mikezat/m...pplication.zip
>
> Inside, you'll find the entire C# solution as well as the TestPage.htm
> Open the solution and change the url in the form load event to
> wherever you place the html file:
>
> private void PRSPopupForm_Load(object sender, System.EventArgs e)
> {
> this.Browser_Navigate(@"C:\Documents and

Settings\conmxz\Desktop\TestPage.htm");
> }
>
> The test page contains 2 links. 1 is the one that calls window.open()

without specifying the Left and Top. As you can see, it works great.
> The second is the one giving me all the problem in the world. I am pretty

desperate as the alternative is to modify almost 8000 pages.
>
> "Shakir Hussain" wrote:
>
> > Mike,
> >
> > can you paste the code where you create a new form (after clicking link)

and
> > adding browser control?
> >
> > It will help me to investigate. I believe this problem can be fixed.
> >
> > Shak
> > (Houston)
> >
> >
> > "Mike" <(E-Mail Removed)> wrote in message
> > news:ACF00E8B-2BE0-4050-8906-(E-Mail Removed)...
> > > Hi! I posted this question in browser_ctl group as well but got no

> > results.
> > >
> > > I have a form with embedded WebBrowser. Upon clicking on a link in

the
> > embedded webbrowser that calls JavaScript's window.open() call where I

pass
> > different width, height, top, left and other parameters, I open a new

form
> > of the same type as the original.
> > >
> > > I noticed that the webbrowser in the newly opened form is shifted to

the
> > right and bottom leaving gray areas on the left and top of the form. I
> > narrowed down the problem to the Top and Left parameters being pass in

the
> > call to window.open().
> > > If I set these parameters = 0, the browser positions itself nicely

within
> > the form.
> > > If these parameters != 0 , the browser is shifted to the right and

bottom.
> > >
> > > I figured that I can adjust the layout etc in the ClientToHostWindow()

> > event which seems to fire. However, I have not been able to reposition

the
> > browser. What can I do ? If I do not fix this, I'll have to spend months
> > fixing all 7500+ instances of the window.open() in all web pages. Any
> > samples on how to do it, please?
> > > I am not that great of a C# programmer, so may be somebody can show me
> > > how to adjust the position of webbrowser within the form, please.
> > >
> > > I am also open to the idea of taking the browser control and painting

it
> > onto a new
> > > location. I am open to whatever works as I am pretty desperate.
> > >
> > >
> > >
> > >
> > > Many Thanks in Advance,
> > >
> > > --Mike
> > >
> > >
> > >
> > > Expand AllCollapse All

> >
> >
> >



 
Reply With Quote
 
Shakir Hussain
Guest
Posts: n/a
 
      30th Jun 2004
Mike,

Iadded two lines of code (dirty way ofcourse) to get the layout properly in
the 2nd case. Replace this function in the sample you gave to me. It works

private void OnDocumentComplete(object pDisp, ref object URL)
{
//Debug.WriteLine("OnDocumentComplete");
try
{
// TODO parse the string and get rid off server
HTMLDocument myDoc =(HTMLDocument) this.webMain.Document;
if(null!=myDoc)
{
string pageTitle = myDoc.title.Trim();
if (pageTitle != string.Empty)
{
this.Text =
pageTitle.Substring(pageTitle.IndexOf("-")+ 1);
}
else
{
this.Text = myDoc.url;
}
}
}
catch
{
this.Text = "PRS";
}

//ADD THESE 2 LINES OF CODE
this.webMain.Dock = System.Windows.Forms.DockStyle.None;
this.webMain.Dock = System.Windows.Forms.DockStyle.Fill;
}

--
Shak
(Houston)


"Mike" <(E-Mail Removed)> wrote in message
news:F2B46CFF-3EDB-43A9-BAF5-(E-Mail Removed)...
> Hi! Thank you for taking a look. Please navigate to
>
> http://users.adelphia.net/~mikezat/m...pplication.zip
>
> Inside, you'll find the entire C# solution as well as the TestPage.htm
> Open the solution and change the url in the form load event to
> wherever you place the html file:
>
> private void PRSPopupForm_Load(object sender, System.EventArgs e)
> {
> this.Browser_Navigate(@"C:\Documents and

Settings\conmxz\Desktop\TestPage.htm");
> }
>
> The test page contains 2 links. 1 is the one that calls window.open()

without specifying the Left and Top. As you can see, it works great.
> The second is the one giving me all the problem in the world. I am pretty

desperate as the alternative is to modify almost 8000 pages.
>
> "Shakir Hussain" wrote:
>
> > Mike,
> >
> > can you paste the code where you create a new form (after clicking link)

and
> > adding browser control?
> >
> > It will help me to investigate. I believe this problem can be fixed.
> >
> > Shak
> > (Houston)
> >
> >
> > "Mike" <(E-Mail Removed)> wrote in message
> > news:ACF00E8B-2BE0-4050-8906-(E-Mail Removed)...
> > > Hi! I posted this question in browser_ctl group as well but got no

> > results.
> > >
> > > I have a form with embedded WebBrowser. Upon clicking on a link in

the
> > embedded webbrowser that calls JavaScript's window.open() call where I

pass
> > different width, height, top, left and other parameters, I open a new

form
> > of the same type as the original.
> > >
> > > I noticed that the webbrowser in the newly opened form is shifted to

the
> > right and bottom leaving gray areas on the left and top of the form. I
> > narrowed down the problem to the Top and Left parameters being pass in

the
> > call to window.open().
> > > If I set these parameters = 0, the browser positions itself nicely

within
> > the form.
> > > If these parameters != 0 , the browser is shifted to the right and

bottom.
> > >
> > > I figured that I can adjust the layout etc in the ClientToHostWindow()

> > event which seems to fire. However, I have not been able to reposition

the
> > browser. What can I do ? If I do not fix this, I'll have to spend months
> > fixing all 7500+ instances of the window.open() in all web pages. Any
> > samples on how to do it, please?
> > > I am not that great of a C# programmer, so may be somebody can show me
> > > how to adjust the position of webbrowser within the form, please.
> > >
> > > I am also open to the idea of taking the browser control and painting

it
> > onto a new
> > > location. I am open to whatever works as I am pretty desperate.
> > >
> > >
> > >
> > >
> > > Many Thanks in Advance,
> > >
> > > --Mike
> > >
> > >
> > >
> > > Expand AllCollapse All

> >
> >
> >



 
Reply With Quote
 
Shakir Hussain
Guest
Posts: n/a
 
      30th Jun 2004
hahaha,

Thx for the offer man. Any way try out the solution i gave you. It works
fine in my machine, with just 2 lines of code.

//attaching the previous post

I added two lines of code (dirty way ofcourse) to get the layout properly in
the 2nd case. Replace this function in the sample you gave to me. It works

private void OnDocumentComplete(object pDisp, ref object URL)
{
//Debug.WriteLine("OnDocumentComplete");
try
{
// TODO parse the string and get rid off server
HTMLDocument myDoc =(HTMLDocument) this.webMain.Document;
if(null!=myDoc)
{
string pageTitle = myDoc.title.Trim();
if (pageTitle != string.Empty)
{
this.Text =
pageTitle.Substring(pageTitle.IndexOf("-")+ 1);
}
else
{
this.Text = myDoc.url;
}
}
}
catch
{
this.Text = "PRS";
}

//ADD THESE 2 LINES OF CODE
this.webMain.Dock = System.Windows.Forms.DockStyle.None;
this.webMain.Dock = System.Windows.Forms.DockStyle.Fill;
}





--
Shak
(Houston)




"Mike" <(E-Mail Removed)> wrote in message
news:A198918A-DE45-43F5-9663-(E-Mail Removed)...
> Free pizza if you solve the problem!
>
> "Shakir Hussain" wrote:
>
> > Mike,
> >
> > I am investigating your code and able to see your problem. Give me some
> > time. Will bring up a solution hopefully.
> >
> > --
> > Shak
> > (Houston)
> >
> >
> > "Mike" <(E-Mail Removed)> wrote in message
> > news:F2B46CFF-3EDB-43A9-BAF5-(E-Mail Removed)...
> > > Hi! Thank you for taking a look. Please navigate to
> > >
> > > http://users.adelphia.net/~mikezat/m...pplication.zip
> > >
> > > Inside, you'll find the entire C# solution as well as the TestPage.htm
> > > Open the solution and change the url in the form load event to
> > > wherever you place the html file:
> > >
> > > private void PRSPopupForm_Load(object sender, System.EventArgs e)
> > > {
> > > this.Browser_Navigate(@"C:\Documents and

> > Settings\conmxz\Desktop\TestPage.htm");
> > > }
> > >
> > > The test page contains 2 links. 1 is the one that calls window.open()

> > without specifying the Left and Top. As you can see, it works great.
> > > The second is the one giving me all the problem in the world. I am

pretty
> > desperate as the alternative is to modify almost 8000 pages.
> > >
> > > "Shakir Hussain" wrote:
> > >
> > > > Mike,
> > > >
> > > > can you paste the code where you create a new form (after clicking

link)
> > and
> > > > adding browser control?
> > > >
> > > > It will help me to investigate. I believe this problem can be fixed.
> > > >
> > > > Shak
> > > > (Houston)
> > > >
> > > >
> > > > "Mike" <(E-Mail Removed)> wrote in message
> > > > news:ACF00E8B-2BE0-4050-8906-(E-Mail Removed)...
> > > > > Hi! I posted this question in browser_ctl group as well but got no
> > > > results.
> > > > >
> > > > > I have a form with embedded WebBrowser. Upon clicking on a link

in
> > the
> > > > embedded webbrowser that calls JavaScript's window.open() call where

I
> > pass
> > > > different width, height, top, left and other parameters, I open a

new
> > form
> > > > of the same type as the original.
> > > > >
> > > > > I noticed that the webbrowser in the newly opened form is shifted

to
> > the
> > > > right and bottom leaving gray areas on the left and top of the form.

I
> > > > narrowed down the problem to the Top and Left parameters being pass

in
> > the
> > > > call to window.open().
> > > > > If I set these parameters = 0, the browser positions itself nicely

> > within
> > > > the form.
> > > > > If these parameters != 0 , the browser is shifted to the right and

> > bottom.
> > > > >
> > > > > I figured that I can adjust the layout etc in the

ClientToHostWindow()
> > > > event which seems to fire. However, I have not been able to

reposition
> > the
> > > > browser. What can I do ? If I do not fix this, I'll have to spend

months
> > > > fixing all 7500+ instances of the window.open() in all web pages.

Any
> > > > samples on how to do it, please?
> > > > > I am not that great of a C# programmer, so may be somebody can

show me
> > > > > how to adjust the position of webbrowser within the form, please.
> > > > >
> > > > > I am also open to the idea of taking the browser control and

painting
> > it
> > > > onto a new
> > > > > location. I am open to whatever works as I am pretty desperate.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Many Thanks in Advance,
> > > > >
> > > > > --Mike
> > > > >
> > > > >
> > > > >
> > > > > Expand AllCollapse All
> > > >
> > > >
> > > >

> >
> >
> >



 
Reply With Quote
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      30th Jun 2004
Wow! Thank you very much !!!
You are a genious!

I insist you email me your name and address to (E-Mail Removed)

I'll treat you with pizza as promissed.

G-d bless,

--Mike Z....


"Shakir Hussain" wrote:

> Mike,
>
> Iadded two lines of code (dirty way ofcourse) to get the layout properly in
> the 2nd case. Replace this function in the sample you gave to me. It works
>
> private void OnDocumentComplete(object pDisp, ref object URL)
> {
> //Debug.WriteLine("OnDocumentComplete");
> try
> {
> // TODO parse the string and get rid off server
> HTMLDocument myDoc =(HTMLDocument) this.webMain.Document;
> if(null!=myDoc)
> {
> string pageTitle = myDoc.title.Trim();
> if (pageTitle != string.Empty)
> {
> this.Text =
> pageTitle.Substring(pageTitle.IndexOf("-")+ 1);
> }
> else
> {
> this.Text = myDoc.url;
> }
> }
> }
> catch
> {
> this.Text = "PRS";
> }
>
> //ADD THESE 2 LINES OF CODE
> this.webMain.Dock = System.Windows.Forms.DockStyle.None;
> this.webMain.Dock = System.Windows.Forms.DockStyle.Fill;
> }
>
> --
> Shak
> (Houston)
>
>
> "Mike" <(E-Mail Removed)> wrote in message
> news:F2B46CFF-3EDB-43A9-BAF5-(E-Mail Removed)...
> > Hi! Thank you for taking a look. Please navigate to
> >
> > http://users.adelphia.net/~mikezat/m...pplication.zip
> >
> > Inside, you'll find the entire C# solution as well as the TestPage.htm
> > Open the solution and change the url in the form load event to
> > wherever you place the html file:
> >
> > private void PRSPopupForm_Load(object sender, System.EventArgs e)
> > {
> > this.Browser_Navigate(@"C:\Documents and

> Settings\conmxz\Desktop\TestPage.htm");
> > }
> >
> > The test page contains 2 links. 1 is the one that calls window.open()

> without specifying the Left and Top. As you can see, it works great.
> > The second is the one giving me all the problem in the world. I am pretty

> desperate as the alternative is to modify almost 8000 pages.
> >
> > "Shakir Hussain" wrote:
> >
> > > Mike,
> > >
> > > can you paste the code where you create a new form (after clicking link)

> and
> > > adding browser control?
> > >
> > > It will help me to investigate. I believe this problem can be fixed.
> > >
> > > Shak
> > > (Houston)
> > >
> > >
> > > "Mike" <(E-Mail Removed)> wrote in message
> > > news:ACF00E8B-2BE0-4050-8906-(E-Mail Removed)...
> > > > Hi! I posted this question in browser_ctl group as well but got no
> > > results.
> > > >
> > > > I have a form with embedded WebBrowser. Upon clicking on a link in

> the
> > > embedded webbrowser that calls JavaScript's window.open() call where I

> pass
> > > different width, height, top, left and other parameters, I open a new

> form
> > > of the same type as the original.
> > > >
> > > > I noticed that the webbrowser in the newly opened form is shifted to

> the
> > > right and bottom leaving gray areas on the left and top of the form. I
> > > narrowed down the problem to the Top and Left parameters being pass in

> the
> > > call to window.open().
> > > > If I set these parameters = 0, the browser positions itself nicely

> within
> > > the form.
> > > > If these parameters != 0 , the browser is shifted to the right and

> bottom.
> > > >
> > > > I figured that I can adjust the layout etc in the ClientToHostWindow()
> > > event which seems to fire. However, I have not been able to reposition

> the
> > > browser. What can I do ? If I do not fix this, I'll have to spend months
> > > fixing all 7500+ instances of the window.open() in all web pages. Any
> > > samples on how to do it, please?
> > > > I am not that great of a C# programmer, so may be somebody can show me
> > > > how to adjust the position of webbrowser within the form, please.
> > > >
> > > > I am also open to the idea of taking the browser control and painting

> it
> > > onto a new
> > > > location. I am open to whatever works as I am pretty desperate.
> > > >
> > > >
> > > >
> > > >
> > > > Many Thanks in Advance,
> > > >
> > > > --Mike
> > > >
> > > >
> > > >
> > > > Expand AllCollapse All
> > >
> > >
> > >

>
>
>

 
Reply With Quote
 
Shakir Hussain
Guest
Posts: n/a
 
      30th Jun 2004
Mike,

I am glad that your problem is fixed. As i mentioned, its a dirty solution.
I will investigate your code more today and will figure out a better
solution.

Things i observed, after adding that two lines

a) When i press the 2nd link multiple times (pretty fast, which is a rare
case)
your form hangs with the new code.

I have mailed you couple of minutes ago from my office email

--
Shak
(Houston)


"Mike" <(E-Mail Removed)> wrote in message
newsD2F47E2-E573-4725-8484-(E-Mail Removed)...
> Wow! Thank you very much !!!
> You are a genious!
>
> I insist you email me your name and address to (E-Mail Removed)
>
> I'll treat you with pizza as promissed.
>
> G-d bless,
>
> --Mike Z....
>
>
> "Shakir Hussain" wrote:
>
> > Mike,
> >
> > Iadded two lines of code (dirty way ofcourse) to get the layout properly

in
> > the 2nd case. Replace this function in the sample you gave to me. It

works
> >
> > private void OnDocumentComplete(object pDisp, ref object URL)
> > {
> > //Debug.WriteLine("OnDocumentComplete");
> > try
> > {
> > // TODO parse the string and get rid off server
> > HTMLDocument myDoc =(HTMLDocument) this.webMain.Document;
> > if(null!=myDoc)
> > {
> > string pageTitle = myDoc.title.Trim();
> > if (pageTitle != string.Empty)
> > {
> > this.Text =
> > pageTitle.Substring(pageTitle.IndexOf("-")+ 1);
> > }
> > else
> > {
> > this.Text = myDoc.url;
> > }
> > }
> > }
> > catch
> > {
> > this.Text = "PRS";
> > }
> >
> > //ADD THESE 2 LINES OF CODE
> > this.webMain.Dock = System.Windows.Forms.DockStyle.None;
> > this.webMain.Dock = System.Windows.Forms.DockStyle.Fill;
> > }
> >
> > --
> > Shak
> > (Houston)
> >
> >
> > "Mike" <(E-Mail Removed)> wrote in message
> > news:F2B46CFF-3EDB-43A9-BAF5-(E-Mail Removed)...
> > > Hi! Thank you for taking a look. Please navigate to
> > >
> > > http://users.adelphia.net/~mikezat/m...pplication.zip
> > >
> > > Inside, you'll find the entire C# solution as well as the TestPage.htm
> > > Open the solution and change the url in the form load event to
> > > wherever you place the html file:
> > >
> > > private void PRSPopupForm_Load(object sender, System.EventArgs e)
> > > {
> > > this.Browser_Navigate(@"C:\Documents and

> > Settings\conmxz\Desktop\TestPage.htm");
> > > }
> > >
> > > The test page contains 2 links. 1 is the one that calls window.open()

> > without specifying the Left and Top. As you can see, it works great.
> > > The second is the one giving me all the problem in the world. I am

pretty
> > desperate as the alternative is to modify almost 8000 pages.
> > >
> > > "Shakir Hussain" wrote:
> > >
> > > > Mike,
> > > >
> > > > can you paste the code where you create a new form (after clicking

link)
> > and
> > > > adding browser control?
> > > >
> > > > It will help me to investigate. I believe this problem can be fixed.
> > > >
> > > > Shak
> > > > (Houston)
> > > >
> > > >
> > > > "Mike" <(E-Mail Removed)> wrote in message
> > > > news:ACF00E8B-2BE0-4050-8906-(E-Mail Removed)...
> > > > > Hi! I posted this question in browser_ctl group as well but got no
> > > > results.
> > > > >
> > > > > I have a form with embedded WebBrowser. Upon clicking on a link

in
> > the
> > > > embedded webbrowser that calls JavaScript's window.open() call where

I
> > pass
> > > > different width, height, top, left and other parameters, I open a

new
> > form
> > > > of the same type as the original.
> > > > >
> > > > > I noticed that the webbrowser in the newly opened form is shifted

to
> > the
> > > > right and bottom leaving gray areas on the left and top of the form.

I
> > > > narrowed down the problem to the Top and Left parameters being pass

in
> > the
> > > > call to window.open().
> > > > > If I set these parameters = 0, the browser positions itself nicely

> > within
> > > > the form.
> > > > > If these parameters != 0 , the browser is shifted to the right and

> > bottom.
> > > > >
> > > > > I figured that I can adjust the layout etc in the

ClientToHostWindow()
> > > > event which seems to fire. However, I have not been able to

reposition
> > the
> > > > browser. What can I do ? If I do not fix this, I'll have to spend

months
> > > > fixing all 7500+ instances of the window.open() in all web pages.

Any
> > > > samples on how to do it, please?
> > > > > I am not that great of a C# programmer, so may be somebody can

show me
> > > > > how to adjust the position of webbrowser within the form, please.
> > > > >
> > > > > I am also open to the idea of taking the browser control and

painting
> > it
> > > > onto a new
> > > > > location. I am open to whatever works as I am pretty desperate.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Many Thanks in Advance,
> > > > >
> > > > > --Mike
> > > > >
> > > > >
> > > > >
> > > > > Expand AllCollapse All
> > > >
> > > >
> > > >

> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to obtain the location of a specified control in a form in Acc form control location Access Microsoft Access VBA Modules 1 14th Sep 2009 12:06 PM
Control of save location and name of form Graham Mayor Microsoft Word Document Management 1 26th Oct 2006 03:59 PM
Control location problem on a form ( C# ) =?Utf-8?B?TWlrZQ==?= Microsoft Dot NET Framework Forms 0 28th Jun 2004 11:01 PM
setting the location of a web form control Billy Cormic Microsoft VB .NET 0 27th Nov 2003 08:18 PM
Read location of web control on a web form. Jim Mitchell Microsoft Dot NET 0 7th Jul 2003 04:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:21 PM.