I have a configuration file where I save the size of the client area when my application last run. I would like to be able to set
the size of the form's client area at start up to this value but if I use VS's designer tool I have to set a value in efffect for
the client area which it uses to initially draw the control.
Can I force the designer to use the value I have in my configuration file. I realize I can fix up the code the designer generates to
do this but then I would have a problem using the designer. I know the value before the control is created since I have already
read my config file by then.
It is annoying that I have to start off with some fixed size and then do a resize once it has generated the form and all it's
controls.
Thanks for any ideas,
Steve 2 2245
On Mon, 04 Aug 2008 13:48:15 -0700, steve <s_******@yahoo .comwrote:
I have a configuration file where I save the size of the client area
when my application last run. I would like to be able to set
the size of the form's client area at start up to this value but if I
use VS's designer tool I have to set a value in efffect for
the client area which it uses to initially draw the control.
Can I force the designer to use the value I have in my configuration
file. [...]
I don't think you can get the Designer to. But you can do what you want
otherwise. In particular, you could just add code to the constructor,
after the call to InitializeCompo nent(), to set the size. Alternatively,
I believe you can use data binding to bind the ClientSize property to your
settings (I've done something similar in the past, but don't recall the
specifics...it' s part of the usual data binding stuff you can set up in
the Designer though).
Pete
thanks, I have it working now. I took it out of my config file too and just use the Properties.Sett ings for the form.
Steve
On Mon, 04 Aug 2008 13:58:01 -0700, "Peter Duniho" <Np*********@nn owslpianmk.comw rote:
>On Mon, 04 Aug 2008 13:48:15 -0700, steve <s_******@yahoo .comwrote:
>I have a configuration file where I save the size of the client area when my application last run. I would like to be able to set the size of the form's client area at start up to this value but if I use VS's designer tool I have to set a value in efffect for the client area which it uses to initially draw the control.
Can I force the designer to use the value I have in my configuration file. [...]
I don't think you can get the Designer to. But you can do what you want otherwise. In particular, you could just add code to the constructor, after the call to InitializeCompo nent(), to set the size. Alternatively, I believe you can use data binding to bind the ClientSize property to your settings (I've done something similar in the past, but don't recall the specifics...it 's part of the usual data binding stuff you can set up in the Designer though).
Pete
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Erik |
last post by:
I want to write a Server Side PHP program that generates a HTML page
client side.
How would I get at the clients' screen size, before serving the
generated page ?
Would it be a two-step process: first let the client execute a piece
of JavaScript to generate Height and Width, and then send those values
to the PHP server (FORM, PUT) ?
Or can it be done in only one PHP program ?
|
by: subash |
last post by:
Hi All
how to create controls in non-client area of forms or usercontrol.Can any
one help in getting information on this or solution for this.
regards
subash
|
by: bilbothebagginsbab5 AT freenet DOT de |
last post by:
Hello, hello.
So. I've read what I could find on google(groups) for this, also the faq of
comp.lang.c.
But still I do not understand why there is not standard method to "(...)
query the malloc package to find out how big an allocated block is". (
Question 7.27)
Is there somwhere explained why - because it would seem to me, that free()
|
by: VMI |
last post by:
How can I change the size of the forms in my Windows application when the
screen resolution the user has is higher than the one I developed the
application in? I have a customer that has a screen resolution of 1600x1200
and I developed the application in a PC with 1024x768 resolution. Is it
possible to increase the forms' sizes accordingly?
Thanks.
|
by: 6tc1 |
last post by:
Hi all, I have a class (call it class A) that extends UserControl
(there is no reason that this couldn't extend Panel). I have a few
PictureBox objects in class A. When I increase the size of the
pictures in the PictureBox objects, I would also like to increase the
window, so that the scroll bars appear. For some reason none of the
following methods force the scroll bars to appear:
this.ClientSize = new Size(layout_w, layout_h);...
| |
by: 23s |
last post by:
I had this problem in the past, after a server reformat it went away, and
now after another server reformat it's back again - no clue what's doing it.
Here's the flow:
Website root is public, no SSL no forms auth. One of the subfolders in the
public area is the root of a "protected" area; SSL is required from this
subfolder on forward and a web.config in the subfolder specifies forms
authentication. From the public area, I provide a...
|
by: Lance |
last post by:
I need to know the bounds of the client area of an MDI parent form that is available to MDI child forms. In other words, the area of the MDI parent's ClientRectangle that does not include docked controls. What I'm doing is automatically setting the bounds of MDI child forms so that they fit within the area of the MDI parent that is available to MDI child forms. The only two properties that I know of are ClientRectangle and ClientSize, both of...
|
by: Galen Somerville |
last post by:
My current screen resolution is set to 1024 x 768. My form size always comes
up as 1032 x 748.
I have tried the help sample
' Retrieve the working rectangle from the Screen class
' using the PrimaryScreen and the WorkingArea properties.
Dim workingRectangle As System.Drawing.Rectangle = _
Screen.PrimaryScreen.WorkingArea
' Set the size of the form slightly less than size of
|
by: TheSteph |
last post by:
Hi,
I've made a CustomPanel derived from the Panel class.
How can I set my own size of the "client area" of that CustomPanel ?
("client area" = Size of the rectangle in which one can drop controls from
the toolbox, or place a control by code)
Because of the large border, some control too close of the border are on
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |