473,231 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

RunTime Control Anchor & Font Scaling

Hi all -- I have two questions.

First, I'm adding a control to my form at runtime and the control/form
seems to ignore the anchor property of the runtime control. Any idea
how I can get a runtime control to anchor properly?

Second -- the program I'm writting is supposed to look like a dos
application (long story). When the application is "Normal" aka a
small window then everything looks great. But when I resize the
window to Maximize (going full screen w/o a toolbar) it doesn't look
right. What I'd like to have happen is the font's to rescale based
upon the window size. Any suggestions on how to accomplish this?

Thanks!

Joseph

Jun 12 '07 #1
3 4479
On Jun 12, 6:55 am, Joseph Gruber <joseph.gru...@gmail.comwrote:
Hi all -- I have two questions.

First, I'm adding a control to my form at runtime and the control/form
seems to ignore the anchor property of the runtime control. Any idea
how I can get a runtime control to anchor properly?

Second -- the program I'm writting is supposed to look like a dos
application (long story). When the application is "Normal" aka a
small window then everything looks great. But when I resize the
window to Maximize (going full screen w/o a toolbar) it doesn't look
right. What I'd like to have happen is the font's to rescale based
upon the window size. Any suggestions on how to accomplish this?

Thanks!

Joseph
First, I'm adding a control to my form at runtime and the control/form
seems to ignore the anchor property of the runtime control. Any idea
how I can get a runtime control to anchor properly?
Something like:

MyControl.Anchor = Anchor.Top Or Anchor.Left
Second -- the program I'm writting is supposed to look like a dos
application (long story).
And I'm sure an interesting one :-)
When the application is "Normal" aka a
small window then everything looks great. But when I resize the
window to Maximize (going full screen w/o a toolbar) it doesn't look
right. What I'd like to have happen is the font's to rescale based
upon the window size. Any suggestions on how to accomplish this?'
Any screen shots? Since your not doing a standard app (I assume your
not using textboxes et all since you're going for a DOS look), it's a
bit difficult to tell you how you could resize your fonts since I
don't know how you're using them.

Thanks,

Seth Rowe

Jun 12 '07 #2
On Jun 12, 7:09 am, rowe_newsgroups <rowe_em...@yahoo.comwrote:
On Jun 12, 6:55 am, Joseph Gruber <joseph.gru...@gmail.comwrote:
Hi all -- I have two questions.
First, I'm adding a control to my form at runtime and the control/form
seems to ignore the anchor property of the runtime control. Any idea
how I can get a runtime control to anchor properly?
Second -- the program I'm writting is supposed to look like a dos
application (long story). When the application is "Normal" aka a
small window then everything looks great. But when I resize the
window to Maximize (going full screen w/o a toolbar) it doesn't look
right. What I'd like to have happen is the font's to rescale based
upon the window size. Any suggestions on how to accomplish this?
Thanks!
Joseph
First, I'm adding a control to my form at runtime and the control/form
seems to ignore the anchor property of the runtime control. Any idea
how I can get a runtime control to anchor properly?

Something like:

MyControl.Anchor = Anchor.Top Or Anchor.Left
Second -- the program I'm writting is supposed to look like a dos
application (long story).

And I'm sure an interesting one :-)
When the application is "Normal" aka a
small window then everything looks great. But when I resize the
window to Maximize (going full screen w/o a toolbar) it doesn't look
right. What I'd like to have happen is the font's to rescale based
upon the window size. Any suggestions on how to accomplish this?'

Any screen shots? Since your not doing a standard app (I assume your
not using textboxes et all since you're going for a DOS look), it's a
bit difficult to tell you how you could resize your fonts since I
don't know how you're using them.

Thanks,

Seth Rowe
Regarding the anchor property -- I've set that (on a label) but it
doesn't seem to get configured at runtime. It doesn't anchor.

Can upload a screenshot in a bit -- basically though it's a lot of
labels. Some stretched to the size of the form while other "rows" may
have 2 or 3 labels in a panel.

Jun 12 '07 #3
On Jun 12, 7:28 am, Joseph Gruber <joseph.gru...@gmail.comwrote:
On Jun 12, 7:09 am, rowe_newsgroups <rowe_em...@yahoo.comwrote:
On Jun 12, 6:55 am, Joseph Gruber <joseph.gru...@gmail.comwrote:
Hi all -- I have two questions.
First, I'm adding a control to my form at runtime and the control/form
seems to ignore the anchor property of the runtime control. Any idea
how I can get a runtime control to anchor properly?
Second -- the program I'm writting is supposed to look like a dos
application (long story). When the application is "Normal" aka a
small window then everything looks great. But when I resize the
window to Maximize (going full screen w/o a toolbar) it doesn't look
right. What I'd like to have happen is the font's to rescale based
upon the window size. Any suggestions on how to accomplish this?
Thanks!
Joseph
First, I'm adding a control to my form at runtime and the control/form
seems to ignore the anchor property of the runtime control. Any idea
how I can get a runtime control to anchor properly?
Something like:
MyControl.Anchor = Anchor.Top Or Anchor.Left
Second -- the program I'm writting is supposed to look like a dos
application (long story).
And I'm sure an interesting one :-)
When the application is "Normal" aka a
small window then everything looks great. But when I resize the
window to Maximize (going full screen w/o a toolbar) it doesn't look
right. What I'd like to have happen is the font's to rescale based
upon the window size. Any suggestions on how to accomplish this?'
Any screen shots? Since your not doing a standard app (I assume your
not using textboxes et all since you're going for a DOS look), it's a
bit difficult to tell you how you could resize your fonts since I
don't know how you're using them.
Thanks,
Seth Rowe

Regarding the anchor property -- I've set that (on a label) but it
doesn't seem to get configured at runtime. It doesn't anchor.

Can upload a screenshot in a bit -- basically though it's a lot of
labels. Some stretched to the size of the form while other "rows" may
have 2 or 3 labels in a panel.
Regarding the anchor property -- I've set that (on a label) but it
doesn't seem to get configured at runtime. It doesn't anchor.
On a new form the following works fine:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim l As New Label()
l.Text = "My Label"
l.Anchor = AnchorStyles.Bottom Or AnchorStyles.Right
Me.Controls.Add(l)
l.Location = New Point(150, 150)
End Sub

After you add that code drag out the bottom left corner of the form to
see the anchor property reposition the label. If you replace that code
with the following it will demonstrate how the anchor property can be
used to stretch a label:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim l As New Label()
l.Text = "My Label"
' Since the font won't increase, I changed
' the backcolor to demonstrate the effect better
l.BackColor = Color.Red
l.Anchor = AnchorStyles.Bottom Or AnchorStyles.Right Or
AnchorStyles.Top Or AnchorStyles.Left
Me.Controls.Add(l)
l.Location = New Point(150, 150)
End Sub

Thanks,

Seth Rowe

Jun 12 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Michel Joly de Lotbiniere | last post by:
I hope this is the correct newsgroup for this subject. The other day I came across a site www.safesquid.com that specified font-family:Terminal font-size:9pt in the inline css for command-line...
27
by: skeeterbug | last post by:
please see http://www.geocities.com/operationsengineer1/test.htm for an idea of how i want my logo header div to be layed out. when i went to resize "Test" to 2em (from 1em), this is what...
4
by: Eric Eggermann | last post by:
Hello all, I'm building an app that lays out and prints flash cards. Now the card might be any size, but when the user is working on the card, I draw the preview isotropically, as large as...
8
by: knoxautoguy | last post by:
This problem has consumed a lot of my time, and I'm aftraid someone will tell me that my whole approach to this objective is wrong; however, I would like to know if there is a way to do this. I...
2
by: Ola K | last post by:
Hi guys, I wrote a script that works *almost* perfectly, and this lack of perfection simply puzzles me. I simply cannot point the whys, so any help on it will be appreciated. I paste it all here,...
1
by: mudasserrafiq | last post by:
I am using following asp file default.asp <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content="0...
1
by: =?Utf-8?B?RnJlZEM=?= | last post by:
When I add controls to a pocket PC form at design time, all the scaling works fine. I see in the initialize code the use of AutoScaleDeminsions and AutoScaleMode. However, when I add a control...
0
by: igalep132 | last post by:
Hey all, I was trying to resize control size to the form size. I'm changing my form size according to current Screen Size by using Screen.PrimaryScreen.WorkingArea; and then I'm making a...
1
by: praveenb000 | last post by:
Hi every one, I designed a web page, having horizontal menu using UL and LI tags; I need to be set rollover effect for a menu items. whenever user hover on a menu item, the entire...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.