f



VB6 Form resize diable user from manually resizing it?

 have a VB6 project that on the form I have set the BorderStile to 2 -
sizable and created a function to resize the form and its controls min or
max.

Although, I am trying to find a way to disable the user from dragging the
bottom right hand corner from resizing. I only want min and max.

Any ideas how I can do this in code. If so, can I get an example of this
please?

Thank you,
JT




0
jtsoft (75)
5/20/2007 2:36:42 PM
comp.lang.visual.basic 2233 articles. 0 followers. please859 (33) is leader. Post Follow

3 Replies
331 Views

Similar Articles

[PageSpeed] 16

JT wrote:
>  have a VB6 project that on the form I have set the BorderStile to 2 -
> sizable and created a function to resize the form and its controls min or
> max.
> 
> Although, I am trying to find a way to disable the user from dragging the
> bottom right hand corner from resizing. I only want min and max.
> 
> Any ideas how I can do this in code. If so, can I get an example of this
> please?

If you want to have the standard minimise and maximise buttons, you will 
need to subclass and handle the WM_GETMINMAXINFO message.

-- 
Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems
0
dean.earley (138)
5/21/2007 7:47:32 AM
Dean Earley wrote:
> JT wrote:
>>  have a VB6 project that on the form I have set the BorderStile to 2 -
>> sizable and created a function to resize the form and its controls min or
>> max.
>>
>> Although, I am trying to find a way to disable the user from dragging the
>> bottom right hand corner from resizing. I only want min and max.
>>
>> Any ideas how I can do this in code. If so, can I get an example of this
>> please?
> 
> If you want to have the standard minimise and maximise buttons, you will 
> need to subclass and handle the WM_GETMINMAXINFO message.

Or you could use a hack and just set the form size in the Resize event.
This will cause it to flicker.

With both these methods you MUST take into account the form border as it 
is different for different windows versions and themes.

-- 
Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems
0
dean.earley (138)
5/21/2007 7:49:31 AM
You could cheat, and set it to style 3 (Fixed Dialog), and plant your own 
Min/Max buttons
on the form. :)

"JT" <jtsoft@hotmail.com> wrote in message 
news:46505d6e$0$15096$4c368faf@roadrunner.com...
> have a VB6 project that on the form I have set the BorderStile to 2 -
> sizable and created a function to resize the form and its controls min or
> max.
>
> Although, I am trying to find a way to disable the user from dragging the
> bottom right hand corner from resizing. I only want min and max.
>
> Any ideas how I can do this in code. If so, can I get an example of this
> please?
>
> Thank you,
> JT
>
>
>
> 


0
5/21/2007 12:38:58 PM
Reply:

Similar Artilces:

Resizing Form Objects when a form is resized
I know this has probably been asked a million times and I have searched Google on and off -- what I need however is a dumbed down tutorial or a demo project I can play with. I have coded a multi threaded IRC client that can hit multiple servers at the same time and do all kindsa snazzy stuff however it looks crappy when forms are resized -- Cheers James Starritt wrote: > I know this has probably been asked a million times and I have searched > Google on and off -- what I need however is a dumbed down tutorial or a demo > project I can play with. I have coded a multi threaded I...

Manual resize vs. programmatic resize
I need to know whether a JComponent is being (or has been) resized manually by dragging its border etc. OR if it is the result of a programmed (by myself) setSize statement. Use: A window should automatically (programmed) adjust its size as needed UNLESS the user manually changed the size. In that case the user's choice should be maintained. Any idea how this could be done? Thanks. On Wed, 22 Sep 2004 18:58:11 +0200, Christoph Duelli wrote: > I need to know whether a JComponent is being (or has been) resized manually > by dragging its border etc. OR if it is the result of a progra...

VB6 form "zooming" resize a form and all it's components
Hi, may I ask a VB6 question: How do I resize a form and it's components at run-time with the mouse in VB6. Example "digital clock" consisting of 1 form & 1 label field which displays time. Pull the lower right corner of the form and change the formsize, label size and (true type) fontsize while maintaining aspect ratio, making the "clock" larger �r smaller, like "zooming". As a follow-up question, when I get above example working, how do I program resizable forms, either for "zooming" or to be resolution independent. regards, h.w. -- to...

VB6 form "zooming" resize a form and all it's components #2
Hi, may I ask a VB6 question: How do I resize a form and it's components at run-time with the mouse in VB6. Example "digital clock" consisting of 1 form & 1 label field which displays time. Pull the lower right corner of the form and change the formsize, label size and (true type) fontsize while maintaining aspect ratio, making the "clock" larger �r smaller, like "zooming". regards, h.w. -- to email remove the Xes Helmut Wabnig <hxwabnig@xaxoxnx.at>'s wild thoughts were released on Fri, 22 Jul 2005 14:12:08 +0200 bearing the following frui...

Noob alert: trouble resizing canvas when app window is manually resized
I've been trying on and off for a day or three to get a simple Tcl/Tk app using a canvas to behave "intuitively" when the app's main window is manually resized. Specifically, the ideal result would be the canvas (and its contents) is redrawn to fill the new size of window, whether it be larger or smaller than before. The following code example and embedded comments hopefully provide more detail, maybe even *sufficient* detail, to help identify what I want, what I'm seeing, and how my current code might be improved (which might include throwing it away :)). I'm new to...

Resizing a CEdit textbox to accomodate a resized CDialog window in Visual C++ .NET
I'm currently using a pop-up dialog window to display some information in my program. Depending on the output, however, the user may want to resize the dialog window to see all of it at once (also, depending on their screen resolution). The dialog box consists of one text box that takes up most of the room and an "OK" button. However, when I resize the dialog box the text box remains the same size (i.e. it doesn't expand to fill in the extra area in the dialog) and the "OK" button stays in the same place. How do I set up a method that is called whenever ...

Help Needed With How To Stop User Resizing Form
I'm designing a database which will be the only application used on a touch screen. There are only 2 forms and they are both Modal, Popup and Thin border style. The forms cover the whole screen including the task bar which is what is required. Is there a way to stop a user resizing the forms by double clicking the form's Title Bar? Any help would be appreciated. Change the border srtly to none. this will eliminate the title bar Change the border srtly to none. this will eliminate the title bar change the border style to noe. Sorry bad typist Change the border style to none. s...

Form resizing
Did you look at StartUpPosition and BorderStyle properties of your form? This should help. Max Kudrenko Brainbench MVP Program for Visual Basic www.brainbench.com "VB 6 Newbie" <myispnet@netzero.net> wrote in message news:<bm2p5p$h63tu$1@ID-76492.news.uni-berlin.de>... > How do you make a form resizable...and have it center in the owners screen? > it seems every time I set the form properties for centering, it reverts back > to > it former setting (which is to the left-most part). > then I can't seem to make the form resizable.......why is this? H...

Resizing a form
VB 6: frame1.width = form1.width - 200 VB .NET: ? Can someone please help with this simple line of code...thanks.. Almost everybody in this newsgroup is using VB6 or lower. While you may get a stray answer to VB.NET (including VB2003 and VB2005 which has dropped .NET from its name) questions here, you should ask them in newsgroups devoted exclusively to .NET programming. Look for newsgroups with either the word "dotnet" or "vsnet" in their name. For the microsoft news server, try these newsgroups... microsoft.public.dotnet.general microsoft.public.dotn...

Form resizing
I am using the Getz et al approach to form resizing, and have encountered a problem, which doesn't seem to have been mentioned here: If I "squeeze" the form that I want to resize, so that the edge of the form covers some of the objects in the form, the code seems to enter some sort of infinite loop (perhaps - I haven't waited long enough ;-), the cursor remains as hourglass, and the only solution is to break out of code. Is there some parameter that I should be setting in code in the OnOpen event, to prevent this behavior? Should I be setting the MinWidth, MaxWidth, MinHeight...

Form Resize
Hi I want to have a form resizeable but with a minimum width. Here's the essence of my code. Option Explicit Dim frmwidth As Long Private Sub Form_Load() frmwidth = Me.Width End Sub Private Sub Form_Resize() If Me.Width < frmwidth Then Me.Width = frmwidth End If End Sub That works but the form flashes badly when attempting to go below the original size. Is there a way to do that neatly? TIA. Martin On 31 Jan, 17:13, Martin Trump <mar...@wmeadow.demon.co.uk> wrote: > I want to have a form resizeable but with a minimum > ...

Resizing an OLEControl when you resize the window
I am using CLassmate and have a Crystal Report Control on a resizable dialog window. The Ole control fills the dialog window so it looks like one window. When I resize the dialog window I would also like to resize the control so it fills the dialog window. I would also like to save the coordinates so the window remembers the last settings when I open the window again. Hi Geoffrey The easy way would be to set the Alignment Mode property of the control to AUTOALIGN_CLIENT. Another way would be to figure out the new origin and size of the control's BoundingBox in the window'...

How can I make a resize control similar to those used in any Ide like Visual Basic?
Hi! I have tried everything, but so far I haven't been able to create a good resize control similar to those used in any Ide like, Visual Basic. I wish to make a control that will "attach" itself to the target control: this is the control which is going to be resized. I have something using releasecapture/setcapture API but the problem is that the resizeControl(user defined control) must be transparent (except, of course, the little resize squares) and when using releasecapture stuff I will see the resizeControl (not the control to be resized) moving not growing... Do...

Resize forms utility and forms with pictures as background
Anyone use the AHRESIZE utility to resize a form dynamically who is also using background images? I have an app that creates electronic versions of manual forms. I digitize the manual form and load it (at run time) as the form background. then, on top of it I place the fields. Seems to work well. Now I am trying to allow use of the resize utility to allow the form to be automatically resized to fit the screen resolution of each individual user. Unfortunately, I initially built the form I used "zoom" as the picture sizing method. I think that does not work with the resizi...

resizing objects in the window when the window resizes...
How do you anchor objects on the gui so that they resize and change as the main window is changed? JustSomeGuy a �crit: > How do you anchor objects on the gui so that they resize and change as the > main window is changed? Assuming the objects are actually on the main window, use the LockLeft, LockTop, LockRight and LockBottom properties. For example, if you set the LockTop and LockBottom properties to true, the control's height will change accordingly to the window. For more information, check the RectControl class in the language reference (help) and look fo...

Resizing a div by resizing its borders 8784
What I have so far is this http://mxamples.googlepages.com/drag-borders.html But this script has a few disadvantages. The main disadvantage is in my eyes that the drag event isn't smooth enough, I mean if the mouse cursor is too fast it will loose the border and therefore the dragging of the border will stop. Thats the reason why the borders in the example are so fat. Making the borders smaller would show at once what I mean because its no more possible to grab the borders with the cursor. I know that this can be done in another way, and I've done similar things already a few years...

Resizing JApplet as browser window resizes
Hi all, another JApplet question... How can I accomplish that my applet resizes if the browser window resizes and the browser window is not big enough to show the applet completely (i.e. I don't want the scrollbars to show up? Thanks, Filip On 18 Jul 2005 01:01:25 -0700, polsa wrote: > How can I accomplish that my applet resizes if the browser window > resizes .. The trick is in the HTML and styles. There is a PLAF changer applet here that fills the full (width of the) browser window, <http://www.physci.org/codes/resize/> though a better example is <http://www.physci...

Accessing data from one form from main form in Visual Basic 6
How do I extract data from a form into the main form for processing? For instance, I have several image files in a form called images(images.frm), indexed from 0 to 99, and I want to import these into a variable array in my main form, main (form1.frm). How do I code a control to get these images into an array in my main form from the images.frm? TIA "JC" <not_clancy1965@hotmail.com> wrote in message news:<bklrfm$pmq$1@sun-news.laserlink.net>... > How do I extract data from a form into the main form for processing? For > instance, I have several image files in a...

Accessing data from one form from main form in Visual Basic 6
How do I extract data from a form into the main form for processing? For instance, I have several image files in a form called images(images.frm), indexed from 0 to 99, and I want to import these into a variable array in my main form, main (form1.frm). How do I code a control to get these images into an array in my main form from the images.frm? TIA JC wrote: > How do I extract data from a form into the main form for > processing? For instance, I have several image files in a > form called images(images.frm), indexed from 0 to 99, and > I want to import these into a variable...

Resizing
Hi, after years, I decided to make our application resizeable. First of all, is it planed to be a feature in cavo2.7 (Anchoring controlls in the IDE)? Now, I try to do my own way, building window-classes and controlls witch can be resized automatically after defining anchors. It works quiet fine, but in a way I need a final Show() or Refresh() of the shown window after beeing resized and all controlls rearranged, because the outfit looks a little bit destroyed and merged. Do someone knows that problem? Does there exist a kind of "SuspendNotification()" for rearrange...

How to resize gui form ??
How to resize gui form ?? thanks In article <fpa66p$7c3$1@fred.mathworks.com>, jaifar Hassan <jaifar2006@gmail.com> wrote: >How to resize gui form ?? Change the Position property of the figure. However, if you want to reposition the various elements or use a bigger font size or something like that when the figure is resized, then you will need to either size everything in relative units (usually an utter pain) or else write a ResizeFcn callback for the figure. -- "The human mind is so strangely capricious, that, when freed from the pressure of real misery, i...

Trouble with resize form
Hi All, I have an MDI form with a menybar on it. I created the menubar with a Picturebox, a Treeview and a Listview. Now I need code that when I resize the form the Picturebox, Treeview and Listview will follow automatically. I have something made but it doesn't work properly. The Treeview is at the top and the Listview at the bottom of the form. Furthermore I have a statusbar down at the form which can be switched on and off! Any thoughts? Private Sub MDIForm_Resize() On Error Resume Next tvTreeView.Move 2, 20, tvTreeView.Width, picTreeview.Height - 50 - lvListView.Height lvLis...

Resizing a JPEG in VB6
Does anyone know how to resize a JPEG in VB6? Can it be done in native code, or is a library purchase required? Thanks in advance! Dave daveg1222@yahoo.com wrote: > Does anyone know how to resize a JPEG in VB6? Can it be > done in native code, or is a library purchase required? Check out the following link: http://www.vbaccelerator.com/home/VB/Code/vbMedia/Saving_Pictures_to_JPG/Using_Intel_JPG_Library/article.asp Mike daveg1222@yahoo.com wrote: > Does anyone know how to resize a JPEG in VB6? Can it be done in native > code, or is a library purchase required? I've ...

Web resources about - VB6 Form resize diable user from manually resizing it? - comp.lang.visual.basic

Manually coded language in South Africa - Wikipedia, the free encyclopedia
In South Africa, manually coded language is used in education, as a bridge between South African Sign Language (SASL) and the eleven official ...

Facebook Ads Manager Users Can Manually Select Dates When Viewing Potential Campaign Audiences
Users of Facebook’s Ads Manager can now manually select the dates when viewing their potential campaign audiences, rather than being restricted ...

Manually Build a Login Flow
The easiest and quickest way to implement Facebook Login for web is with the Facebook SDK for JavaScript, and we recommend you follow our separate ...

Manually - Manual Focus Camera on the App Store on iTunes
Get Manually - Manual Focus Camera on the App Store. See screenshots and ratings, and read customer reviews.

Showing Apple employee #8 some of my artifacts. He remembers manually copying the Star Wars cassettes ...
jurvetson posted a photo: He has a rig that fed eight recoding tape drives from one master, and he would manually copy eight tapes at a time ...

Manually Update Google Nexus 7 to Android 4.2 Jelly Bean - YouTube
This video will show you how to manually update your stock Google Nexus 7 from android 4.1.1 to Android 4.1.2 JB. THIS METHOD WORKS TO UPDATE ...

Missing Malaysia Airlines plane: onboard flight computer manually overwritten
WASHINGTON - The first turn to the west that diverted the missing Malaysia Airlines plane from its planned flight path from Kuala Lumpur to Beijing ...

Astronauts to manually dock Shenzhou-9 with Tiangong-1
Astronauts to manually dock Shenzhou-9 with Tiangong-1 People's Daily Online Beijing, June 24 ( People's Daily Online)—Three Chinese astronauts ...

Danish Dynamos: Students Make 3D Printed, Manually Powered Lights
3D printing is exciting, and many are excited and look forward to not only learning about the technology but also trying their hand at producing ...

How to update to Android Lollipop manually using OTA downloads
Last week Google announced that Lollipop will come to most Nexus devices in the coming weeks. If you like to get the latest from Google, you ...

Resources last updated: 3/10/2016 6:44:03 AM