473,946 Members | 24,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Shrinking a moving window

I have a basic Form. This form is mainly for displaying basic real-time data. I want to insure that is a user moves the windows to the right or left of the WorkingArea bounds that the window shrinks so the edges remain visable. Here is the code I put in the OnMove override. Be Gentle in your comments if the answer is obvious, I am a newbie to this.

base.OnMove (e);
if ( Bounds.Left < SystemInformati on.WorkingArea. Left)
{
ClientSize = new Size((Bounds.Wi dth + Bounds.Left),
ClientSize.Heig ht);
Location = new Point (0,Bounds.Top);
}

if ( Bounds.Right > SystemInformati on.WorkingArea. Right)
{
ClientSize = new Size ((SystemInforma tion.WorkingAre a.Right-Bounds.Left),
ClientSize.Heig ht);
}
Nov 16 '05 #1
0 1001

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

Similar topics

1
2247
by: willie | last post by:
Hi all: I restored one backup database (7.9 GB mdf) on two diffrent servers. I shrunk them by clicking "Move pages to beginning of file before shrinking". After shrinking, one mdf file is 6.7 GB, and the other is 4.2GB. I shunk again and again: 1. the 6.7GB become 5.9GB, 5.2GB, 4.7GB and 4.2Gb (four times) 2. the 4.2Gb become 4.0GB (just one more time)
6
2275
by: Thomas Mlynarczyk | last post by:
Hi! I have noticed something strange: I have an element styled to have padding, a border and some margin. The element contains preformatted text. When the browser window is made narrow enough, a horizontal scrollbar appears as the preformatted text becomes too wide and is not wrapped. So far so good. But why is the element itself shrunk to fit in the window (still having its full margin, padding and border visible) as if it's content was...
6
3106
by: Jens | last post by:
I have a database file LEAR_Index(yes, it hold index data) from a have have recently removed a bunch of data. It is about 120 Gb, 100Gb of which is not used. I wan´t to shrink the file to lean 30-40Gb. I´ve been trying this: dbcc shrinkfile('LEAR_Index',40000) But to no apparent avail; the file did not shrink.
1
1643
by: jeffreyv | last post by:
Hi! I'm studying to have my MCSE 70-228 certification and I'm trying some things with backing up transaction logs and shrinking it. Here's what I do: There is no activity in the database by the way. I have a transaction log of 1792 kb...
2
7573
by: John Baker | last post by:
Hi: I have a report that contains a remarks field which is a "memo" format field. I have that field on a single line in the report, and have it given a property of "Can Shrink", in the hope that he line will vanish when there is no data entered in the memo field. Its not shrinking! There is nothing else on the line, and no field name or anything else. I have tried shrinking it to a single small line and saying "Can Grow", but its growing...
2
1335
by: Piotrekk | last post by:
Hi. I wanna move window, by clicking its body ( not the strip ). Which event should i catch. I tried with mousedown, but then i only can update position of window, once. My task is to change it in real mode ( until mousebutton is up). Can anyone help? PK
2
1577
by: William | last post by:
I've been tasked with taking over the support for a client's SQL Server database. I'm not a DBA by profession, I'm a software developer who uses SQL Server as a database designer. The clients have reported that the server is running out of disk space and examination shows that the log files for several of the databases are at 5Gb or more. After reading around the subject I suggested the following sequence of operations:
0
1725
by: Jerry Mcnealy | last post by:
There is an interesting article on java.net about SOA reusability, Shrinking the Lag between Business and IT: http://today.java.net/pub/a/today/2007/07/24/soa-reusability-shrinking-lag-time.html Blessings from business owners are important in all SOA implementations. This article articulates the vision of reusability with a different spin around the business users, the ultimate end users of SOA.
1
3810
by: rsteph | last post by:
I bought a book to help me learn to use DirectX with windows programming. It's first trying to walk me through some basic windows programming and graphics before getting into DirectX. I'm trying to expand on one of the example programs in the book but I'm having some problems. I can get a frame to appear, then an image gets randomly placed in the box. It is suppose to move right, then when it hits the edge move left; it should repeate this...
0
10149
marktang
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...
0
11548
Oralloy
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...
0
11140
jinu1996
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...
1
11319
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,...
0
10679
tracyyun
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...
0
7402
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();...
0
6315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4927
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4520
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.