<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : [SOLVED]Resize event and GetClientRec fails</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Docking Pane : [SOLVED]Resize event and GetClientRec fails]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 28 Apr 2026 18:42:53 +0000</pubDate>
  <lastBuildDate>Thu, 05 Nov 2009 16:10:38 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=15052</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[[SOLVED]Resize event and GetClientRec fails : A lot of times when I see a control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15052&amp;PID=54602&amp;title=solvedresize-event-and-getclientrec-fails#54602</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5180">pate</a><br /><strong>Subject:</strong> 15052<br /><strong>Posted:</strong> 05 November 2009 at 4:10pm<br /><br />A lot of times when I see a control get resized much smaller than I would think it has to do with the scaling.&nbsp; You may expect twips and are using pixels instead and vice-versa.&nbsp; Not sure that is the problem, but it has happened to me a number of times in the past.&nbsp; Getting them on the same scaling usually solved the issue.]]>
   </description>
   <pubDate>Thu, 05 Nov 2009 16:10:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15052&amp;PID=54602&amp;title=solvedresize-event-and-getclientrec-fails#54602</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED]Resize event and GetClientRec fails : I have similar question: In my...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15052&amp;PID=53315&amp;title=solvedresize-event-and-getclientrec-fails#53315</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=729">tobi</a><br /><strong>Subject:</strong> 15052<br /><strong>Posted:</strong> 21 September 2009 at 12:23pm<br /><br />I have similar question: In my VB6 app I have a textbox in a docking pane and want to "manually" resize it because I want a little more borders !<br>So I use this code in the CommandBars_Resize event handler:<br><br><b>Dim Left As Long, Top As Long, Right As Long, Bottom As Long<br><br>CommandBars.GetClientRect Left, Top, Right, Bottom<br>Text1.Move Left, Top, Right - Left, Bottom - Top<br><br>DockingPane.GetClientRect Left, Top, Right, Bottom<br>Text2.Move Left + 5, Top + 5, Right - Left, Bottom - Top<br><br></b>The first Textbox which should cover mainform works right, but the Text2 control, which should fill the docking pane<br>does not - it is sized to a much smaller size than the docking pane area !?!?!?!<br><br>Btw. I created the docking pane by directly attaching Text2.hwnd which is placed on the mainform ! Is this best practice<br>or should I use a PictureBox where the textbox is placed in ?<br><br><br>]]>
   </description>
   <pubDate>Mon, 21 Sep 2009 12:23:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15052&amp;PID=53315&amp;title=solvedresize-event-and-getclientrec-fails#53315</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED]Resize event and GetClientRec fails :    many, thanks. problem solved.   ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15052&amp;PID=52444&amp;title=solvedresize-event-and-getclientrec-fails#52444</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4998">iamgtd</a><br /><strong>Subject:</strong> 15052<br /><strong>Posted:</strong> 27 August 2009 at 7:50am<br /><br /><DIV></DIV><DIV></DIV><DIV></DIV><DIV>many, thanks. problem solved.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void cjCommandBars_ResizeEvent(object sender, EventArgs e)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int left, top, right, bottom;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cjCommandBars.GetClientRect(out left, out top, out right, out bottom);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; userControl.SetBounds(left, top, right - left, bottom - top);</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;</DIV><DIV>It's interesting that the resize event of the commandbar reacts to the resizing of panes in the dockingpane, because in this case the size of the commandbar isn't changed.</DIV>]]>
   </description>
   <pubDate>Thu, 27 Aug 2009 07:50:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15052&amp;PID=52444&amp;title=solvedresize-event-and-getclientrec-fails#52444</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED]Resize event and GetClientRec fails : Hi,  if you have both COmmandBars...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15052&amp;PID=52438&amp;title=solvedresize-event-and-getclientrec-fails#52438</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 15052<br /><strong>Posted:</strong> 27 August 2009 at 7:23am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>if you have both COmmandBars and DockingPane you need handle only CommandBars_ResizeEvent.</DIV>]]>
   </description>
   <pubDate>Thu, 27 Aug 2009 07:23:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15052&amp;PID=52438&amp;title=solvedresize-event-and-getclientrec-fails#52438</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED]Resize event and GetClientRec fails : In a form I&amp;#039;m using a ribbonbar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15052&amp;PID=52432&amp;title=solvedresize-event-and-getclientrec-fails#52432</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4998">iamgtd</a><br /><strong>Subject:</strong> 15052<br /><strong>Posted:</strong> 27 August 2009 at 5:10am<br /><br /><P>In a form I'm using a ribbonbar and a dockingpane. In the client area should be placed a usercontrol.</P><P>The dockingpane is associated with the commandar with the following code:<BR>cjDockingPaneManager.SetCommandBars(this.cjCommandBars.GetDispatch());</P><P>The resizing of the usercontrol in the client area sholud be done with:</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void cjDockingPaneManager_ResizeEvent(object sender, EventArgs e) <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int left, top, right, bottom;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cjDockingPaneManager.GetClientRect(out left, out top, out right, out bottom);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; userControl.SetBounds(left, top , right - left, bottom - top);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P><P>But the resize event occurs only once at the program start and the second thing&nbsp;is that the values from the GetClientRect method delivers wrong values (left and top = 0, right and bottom are the values from this.ClientSize).</P><P>I have tried to resize the client usercontrol in an other resize event (form, commandbar). But the GetClientRect method delivers always wrong values. I have also tried to use a richtextbox instead of the usercontrol, but the result is the same.</P><P>It seems that the GetClientRect method only work correct if no commandbar is present.</P><P>Is there a way to solve this behavior?</P><P>-------------------------------<BR>OS: Win XP prof. SP3<BR>Codejock Version 13.1.0<BR>Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM<BR>Microsoft .NET Framework Version 3.5 SP1<BR>Installed Edition: Enterprise<BR>Microsoft Visual C# 2008 <BR>-------------------------------<BR></P>]]>
   </description>
   <pubDate>Thu, 27 Aug 2009 05:10:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15052&amp;PID=52432&amp;title=solvedresize-event-and-getclientrec-fails#52432</guid>
  </item> 
 </channel>
</rss>