Shrinking controls in vb.net 2005

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2007
Posts: 6
Reputation: dkstevens is an unknown quantity at this point 
Solved Threads: 0
dkstevens dkstevens is offline Offline
Newbie Poster

Shrinking controls in vb.net 2005

 
0
  #1
Jan 7th, 2007
I'm new to vb.net though I've done a fair bit of work in vb6. My problem is this. I have a form with two tabcontrols and on the tab pages are text boxes, group boxes, check boxes, etc. for entering parameters. While I'm developing using debuggging in vb.net 2005, each time I run the project the controls shrink and move to the left. I understand the vb.net resizes controls according to the fonts used but I haven't changed any fonts and anyway, why would they be moved even if they are resized. I'll resize a control and 2-3 debug sessions later it is unusable because the width is too small to read or enter text. Is there a setting I don't know about?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,266
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Shrinking controls in vb.net 2005

 
0
  #2
Jan 7th, 2007
This is odd do you have any code so I can see what you mean?
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 6
Reputation: dkstevens is an unknown quantity at this point 
Solved Threads: 0
dkstevens dkstevens is offline Offline
Newbie Poster

Re: Shrinking controls in vb.net 2005

 
0
  #3
Jan 7th, 2007
Originally Posted by iamthwee View Post
This is odd do you have any code so I can see what you mean?
The code is large (10000 lines) - adapted from the vb6 project. However, the only sizing/resizing I do is what vb.net does for me to load/initialize controls and when the form resize event is fired. I'll share the latter here:

[vbcode]

Private Sub Main_Resize()

' this tab control is the one giving me trouble and nothing else on the tab control is resized by code

With TabControl2
.Width = Me.Width - 18
End With

With TabControl1
.Width = Me.Width - 18
.Height = Me.Height - TabControl2.Height - 80
End With

With zgProbability
.Width = TabControl1.Width - 12
.Height = TabControl1.Height - 45
End With

With zgHistogram
.Width = TabControl1.Width - 12
.Height = TabControl1.Height - 45
End With

With zgBox
.Width = TabControl1.Width - 12
.Height = TabControl1.Height - 45
End With

With zgAnnualBox
.Width = TabControl1.Width - 12
.Height = TabControl1.Height - 45
End With

With zgSeasonalBox
.Width = TabControl1.Width - 12
.Height = TabControl1.Height - 45
End With

With zgMonthlyBox
.Width = TabControl1.Width - 12
.Height = TabControl1.Height - 45
End With

With zgTimeSeries
.Width = TabControl1.Width - 12
.Height = TabControl1.Height - 82
End With

Me.Visible = True
With zgMaster
Me.Visible = True
.Width = TabControl1.Width - 12
.Height = TabControl1.Height - 45
End With

With dgSummary
.Width = TabControl1.Width - 12
End With

With dgData
.Width = TabControl1.Width - 12
End With

With dgModel
.Width = Me.TabControl1.Width - 12
' .Height = TabControl1.Height - 45
End With

end sub
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,266
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Shrinking controls in vb.net 2005

 
0
  #4
Jan 7th, 2007
I need more than that. Code I can actually test and compile.

Cheers. If you could upload some pictures as well.
Last edited by iamthwee; Jan 7th, 2007 at 12:24 pm.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: Shrinking controls in vb.net 2005

 
0
  #5
Jan 8th, 2007
Are you saving your settings? If so that is why it keeps getting smaller with each session. I see a lot of resizing in your code. If the tab control is made smaller then the other controls on it are made smaller. Something in your code is changing the size of the tab control and the changes are saved to use again.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 1
Reputation: k.a is an unknown quantity at this point 
Solved Threads: 0
k.a k.a is offline Offline
Newbie Poster

Re: Shrinking controls in vb.net 2005

 
0
  #6
Jan 8th, 2007
thankz guys
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 6
Reputation: dkstevens is an unknown quantity at this point 
Solved Threads: 0
dkstevens dkstevens is offline Offline
Newbie Poster

Re: Shrinking controls in vb.net 2005

 
0
  #7
Jan 8th, 2007
Originally Posted by waynespangler View Post
Are you saving your settings? If so that is why it keeps getting smaller with each session. I see a lot of resizing in your code. If the tab control is made smaller then the other controls on it are made smaller. Something in your code is changing the size of the tab control and the changes are saved to use again.
I don't know that I'm saving any settings. The code is saved each time changes are made and the debugging session starts, but I'm not sure about settings. How is this done?

As far as I know the only resizing that is done is when the form initiates or if I physically resize the form by dragging the lower right corner. Is the fact that if the tabcontrol changes size all the other controls change size a feature? or a bug?
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: Shrinking controls in vb.net 2005

 
0
  #8
Jan 9th, 2007
iamthwee is right, we need more code to analize. Take out any code you don't want to show. If it is large enough zip it.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 6
Reputation: dkstevens is an unknown quantity at this point 
Solved Threads: 0
dkstevens dkstevens is offline Offline
Newbie Poster

Re: Shrinking controls in vb.net 2005

 
0
  #9
Jan 11th, 2007
Originally Posted by waynespangler View Post
iamthwee is right, we need more code to analize. Take out any code you don't want to show. If it is large enough zip it.
I appreciate your interest in this - it's not just the code, it's the 500 Mb database that it works from and the third party controls that need to be installed on the developer's machine. I guess I was hoping to hear from someone who's had a similar problem and found a solution. I could cut it all down but then it would be a different project and may not generate the error - it'd take me a few days...
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 1
Reputation: rmblefsh is an unknown quantity at this point 
Solved Threads: 0
rmblefsh rmblefsh is offline Offline
Newbie Poster

Re: Shrinking controls in vb.net 2005

 
0
  #10
Nov 16th, 2008
I'm having the same issue in VB2005 and I've got no resize code at all. Any ideas?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC