VS 2010 - Form - MoveWindow API Alternative - Resize & Move A Form Using VB Commands

Mar 22, 2012

What is the best way to resize & move a form using just VB commands? I have a form that I need to set the Height and Top props, problem is that takes two calls and there is a noticable flicker. I tried using SuspendLayout/ResumeLayout, DoubleBuffered, swaping the top and height calls around, etc, but nothing seems to help. The test forms only have one small listview and one or two buttons. [Code]

View 2 Replies


ADVERTISEMENT

Resize Form End Move Pictures?

Dec 17, 2011

i have a form with a picture as background. On this picture I want to buttons or pictures (click areas where lamps are). I have made a transparant picturebox and when clicked he shows a small picture of a lamp indicating the light is on.The form should be full screen.The problem is: When the form is used on different monitors with different resolutio settings, or when the form is resized, the pictures are on another (wrong) part of the picture. that the pictureboxes stay on the correct position related t the background?

I do not use another big picturebox in the background while the transparacy will not work.

View 2 Replies

Resize Control - Buttons Move With The Resized Form

Feb 12, 2009

How do you get it so when you resize the form, the buttons move with the re sized form and they don't just disappear?

View 5 Replies

Using MoveWindow To Resize A Hwnd Doesn't Work On Different Computers?

Mar 29, 2012

So I have been using MoveWindow to resize a hwnd:


[code]...

The problem is that this doesn't work on different computers. If I want to mouseclick at coordinate 55,55 on my own computer, it will actually click there. However, if I mouseclick at coordinate 55,55 on my girlfriend's computer, it will click at a different position. It will be near 55,55, but it won't be the same as on my computer.What can I use to resize a window that will work on both my PC and hers?

View 1 Replies

VS 2010 - How To Resize Controls On Form

May 29, 2012

Is it possible to resize my controls on my form when I run it? The problem I have is that I have created a windows application which has a maximize state on all forms but on some machines my controls go missing (mostly on widescreen laptops). Ideally some way of resizing my controls would probably be best? So is that possible?

View 10 Replies

VS 2010 Form Flickers When Resize It?

Apr 1, 2011

If btnExpand.Checked = True Then
Do While Me.Width < 860
Me.Width = Me.Width + 10

[Code]....

the code does what it's supposed to do and the end result is as expected. However.. when I use this code.. my form starts to flicker during the expanding process. I have a custom background set. And you can really see it stretching out as it's supposed to, but the entire form flashes white , black , white , black and I can see horizontal lines between the form aswell. perhaps a command like, System.Screenupdating = false ?

View 5 Replies

VS 2010 Make Everything In Resize When Form Does

Feb 15, 2012

Im so in to webbrowsers in vb2010 and i need help with a problem. The problem is when i resize my form my buttons wont size so my buttons just dissapear. i need help to make when i resize the form my buttons will resize to.

View 2 Replies

VS 2010 - Form Resize And Resizing Controls

Mar 20, 2011

Where is the best place to resize a control on a form when a form is resized?....I'm currently using the Form1_SizeChanged event and seems to work ok. Also is there any need to check in the forms resize event if the form is in a minimized state before resizing controls?.,.. in VB6 if you try to resize a control when the form is minimized you get an error, but I don't see that happening in BV10 Form1_SizeChanged event, does VB10 automatically ignore resizing controls when a form is minimized or something?

View 2 Replies

VS 2010 - How To Resize Form To Specific Height

Oct 20, 2011

What I want to do is setup a form to act like a control panel. When it loads I do not want it to be more than 94px in height but when the maximize button is pressed I would like it to expand the width of the screen. I was thinking I could do this with an "onload" event in the main form but not sure how to do it.

View 4 Replies

Mdi Child Form Order - Move The New Form Behind The Main Form While It Loads

Aug 5, 2010

i have my main child form open. then i show the new form:

[Code]...

but when the form opens it flickers a lot. so i want move the new form behind the main form while it loads so the user does not see the flicker. once it is done loading i will set the form to topmost. how do i move the new form behind the main form?

View 12 Replies

VS 2010 : Resize Form Inside SplitContainer.Panel?

Mar 4, 2012

I have a project with 2 Forms. Form1 with 2 SplitContainers and the code below to show the Form2 inside SplitContainer2.Panel2. Form2 with no borders and orange color.

Public Class Form1
Declare Auto Function SetParent Lib "user32" (ByVal hWndChild As IntPtr, ByVal nWndPArent As IntPtr) As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[code]....

I want to resize Form2 when change Form1 size by mouse.I use frm.Size = SplitContainer2.Panel2.Size but look in pictures what happen:This is Form1 without Form2 inside Panel2 This is the application in first run. Form2 showed in Panel2 with orange color.The size is OK (frm.Size = SplitContainer2.Panel2.Size)Now i have change the size of Form1 with mouse click (or move form corner).Look the Form2 in Panel2. Didn't change size. Stay in first run size.How to change the size of Form2 when i change the size of Form1?

View 3 Replies

VS 2010 Make A Form Resize On Smaller Screens?

Nov 15, 2011

I made a program on a computer with a big screen.I set it to open in 'maxamized state' , and I took away the top, so you can't close/resize/minimize it. How can I get the form to automatically resize to the screen size??

2) Is it possible to make a form ( in visual basic express edition 2011) not close when user shuts down computer and/or logs-off ...maybe run in back grond..?

3) Is there a code ( in visual basic express edition 2011) that can make the program start automatically when a user logs-in ?

4) Is there a code that can make something happen (e.g. play music, etc.) from e.g. 7:00 A.M. - 10:00 A.M.

View 1 Replies

VS 2010 Grab Picturebox To Move The Form?

Dec 26, 2009

A new journey, A new problem. As I downloaded VS2010 Today, there's a new UI, New Code, new problems.

Now I looked for a code that seemed to work for the VS2008, I found the one .Paul made, but it sure didn't work for me. Is there anyone who managed this on the new 2010? Please tell me.

If there were any confusion what I really wanted, I'll explain.

Mousedown on Picturebox = Move around the form free.

View 5 Replies

Make Controls On Form Resize When Form Resizes?

Nov 21, 2009

How would i make so when the user resizes the form the controls on the form resizes to what ever(ex: form become full screen textbox is full screen.

View 2 Replies

Minimize A Form And Restore To Normal The Form Is Being Resize?

Jun 10, 2009

when i try to minimize a form and restore to normal the form is being resize.It's resize getting extending a form when time to minimizing a form and restore it.my form is set to formborderstyle is fixedsingle and i'm using namespace. why is hapening like that...i don't know why

View 10 Replies

Make Contents Of A Form Resize With Form?

Aug 6, 2009

How can I Make the contents of a form resize with the form?

View 2 Replies

Progress Bar In Status Bar To Move When Load Any Child Form Inside The MDIParent Form

Sep 16, 2009

i am asking about using the progress bar into the status bar to move when i load any child form inside the MDIParent form.

View 1 Replies

Change Startup Position And Move A Docked Form With Parent Form?

Mar 23, 2011

well i successfully docked a perpixel alpha form with the main form(form1). but the perpixel alpha form always appears at the top left corner of the screen and when i move the main form the form(perpixel alpha form) inside it dosen't move it stays at the top left corner. ALWAYS. to dock the perpixel alpha form i used

Me.toplevel = false
Me.parent = form1

View 6 Replies

Allow User To Move A Top Form Within The Boundary Of A Bottom Panel Or Form?

Jun 30, 2009

I have one form lays on the top of a form or a panel. I would like be able to drag the top form within the boundary of the bottom form or panel. How can I do that?

View 4 Replies

Move A Form Without The Form Control Box Or Form Name?

Apr 24, 2009

i want to be able to click anywhere there isn't a control on the form and be able to move the form to anywhere on the desktop...

the control box is off and the form text is blank, so there is nowhere on top of the form to click and move the form..

View 10 Replies

Add Commands To A VB Form Buttons?

Apr 3, 2009

how to add Internet Explorer commands to a toolbar in visual basic form just like one in following thread :[url]

View 2 Replies

C# - Inheriting A Base Form But Paste/Cut Commands Not Captured?

Jun 9, 2010

I created a base form that has a specific size and an icon as a base for all forms created in my project (to be consistent in looks). The problem is, for some reason if I add a Text box to the Child form, I can no longer execute shortcuts like Copy (CTRL+C) etc into the Textbox.

What should I do to handle this OTHER THAN writing code to capture those on the KeyUp control?

This is also the case for RichTextBox control as well.

View 1 Replies

Buttons To Resize Form?

Apr 15, 2009

Buttons to resize form?

View 15 Replies

How To Programmatically Resize A Form

May 8, 2009

i would like to resize a form, programatically.. i know how to do it manually with a bunch of code depending on the resizing.. here's a sample:

[Code]...

View 2 Replies

Resize A Form To Print?

Jan 8, 2010

Alright, I need some way to generate a printable report from a text file. I'm thinking that the easiest way to do this is to create a form which will layout the information and then reading from the text file into the controls of the form. Then taking a screen shot of the form itself, and storing it into a bitmap and printing it.[code]...

View 15 Replies

Resize A Windows Form?

Jan 25, 2011

I have been trying to discover how to make the contents of a form expand or retract in response to moving it�s borders by grabbing them with the mouse, or by use of the 'Maximise' or 'Restore Down' controls.

View 1 Replies

Resize All The Controls On The Form?

Mar 2, 2012

I have a program that has a TabControl on it. There is code to resize all the controls on the form when the window is resized, regardless of what tab is selected in the TabControl. My issue is that the form will only resize the controls on the selected tab. So if the window is maximized, for example, it will resize the controls on the selected tab, but if the user changes tabs, the new tab will still have the original, non-maximized sizes on it. This works the same with un-maximizing the form, the controls on other tabs will remain the size they are supposed to be when the form is maximized. Here's some example pseudo-code to give you an idea. Assume button1 is on tab1 and button2 is on tab 2.

sub form_resize()
button1.width = x
button2.width = x2
button1.height = y
button2.height = y2
end sub

So the code is supposed to resize all controls regardless of the tab. But if tab 1 is selected it will visually resize button1 but it wont resize button2. To counter this, I simply made the form resize by 1 pixel and then move back to the original size when the user changes tabs. BUT this wont work for maximizing/un-maximizing the form. I tried telling it to detect window state on tab select so if the form is maximized, it will un-maximize it, perform the resize, and re-maximize the form but this doesnt seem to work.

automate this somehow so that regardless of selected tab or window state, all controls will be resized to the proper, current form size?

View 3 Replies

Resize Border Less Form

Oct 7, 2010

I am able to resize the from using the code below but it resizes towards right side , from bottom right corner i want to modify the code so that user can re size the form from bottom left corner. also most of the solution given on this site are based on WndProc / WM_NCLBUTTONDOWN and i am not using it because my form have lots of controls so it flicker's very badly.

[Code]...

View 1 Replies

Resize Form And Controls?

Oct 1, 2010

find a way of resizing my form + controls. I did manage to resize the form and all controls (only standard controls in visual studio) i could get the dotNetBar material to resize?

View 1 Replies

Resize Form By A Panel?

Jun 10, 2011

Resize Form by a Panel?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved