By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,030 Members | 1,323 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,030 IT Pros & Developers. It's quick & easy.

Dialog Form CutOff

P: n/a
I have a form that I show as a Dialog but before I show it, I reset the
form's location. I have the StartPostion set to Manual. If I have
ControlBox set to True, all works ok but if I set the form's Controlbox to
False in the Design Properties window then run my app, the bottom part of the
form doesn't show.

Why is this happening? I can reset the form's controlbox property to False
in runtime code just before I show the form and all works well but if I set
it false in the Design Mode, it doesn't show the bottom 20 or 30 so pixel
lines.

--
Dennis in Houston
Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Dennis,

I thought that I made some code to try what you told and had not that
behaviour.

Can you make now a simple sample to show where/how it is happening and let
us try that.

In the way you are asking this now to us, gives only for us to endless
work.

Just my thought,

Cor
Nov 21 '05 #2

P: n/a
Cor, I ask this question again because even though I did find out how to
resolve the problem no one gave me a reason why. Here's how to reproduce it:

Create a new Windows Form Project (Form1)
Size the Form at least 400 x 400
Add a Button (Button1) to Form1
Add a new form to the project (Form2)
Set Form2 Properties in the Design Property Window to:
BorderStyle = FixedDialog
ControlBox = False
StartPosition = Manual
Add a Button (Button1) to Form2 so it's bottom is at the bottom of the Form2

In the Button1 on Form1, add the following code in the button click event:

Dim f as new Form2
f.Left = 100
f.Right = 200
f.ShowDialog

Run the program and click on Button1 on Form1
You will see most of the Button1 on Form2 is cut off and not showing!

However, if you set the ControlBox Property to True in the Design Properties
Window, then add code in Button1 of Form1;

Dim f as new Form2
f.ControlBox = False
f.Left = 100
f.Right = 200
f.ShowDialog
Run the program again and you will see that all of Form2 is showing ok.

"Cor Ligthert" wrote:
Dennis,

I thought that I made some code to try what you told and had not that
behaviour.

Can you make now a simple sample to show where/how it is happening and let
us try that.

In the way you are asking this now to us, gives only for us to endless
work.

Just my thought,

Cor

Nov 21 '05 #3

P: n/a
Dennis,

You told right = 200 that does not work for me.

However I saw a half button, it seems that it with the designer keeps no
track that the form is slightly smaller, however what is the problem with
that, just set it 3mm higher?

Cor
Nov 21 '05 #4

P: n/a
Sorry, I meant TOP, not Right. Anyway, you can set the button a bit higher
but also leave the ControlBox to True in the Designer Properties WIndow then
set Controlbox to False in the runtime code. This works to show all of the
form.

"Cor Ligthert" wrote:
Dennis,

You told right = 200 that does not work for me.

However I saw a half button, it seems that it with the designer keeps no
track that the form is slightly smaller, however what is the problem with
that, just set it 3mm higher?

Cor

Nov 21 '05 #5

P: n/a
Dennis,

I think that you can call this a small bug. However very small.

Cor
Nov 21 '05 #6

P: n/a
It may be a small bug but it cost me two precious Saturday Afternoons trying
to sort it out which is the only time I get to work on VB.Net!

"Cor Ligthert" wrote:
Dennis,

I think that you can call this a small bug. However very small.

Cor

Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.