Forms :: Auto-scaling Of Controls In A Form (.Net 2008)
Mar 30, 2010
In my home form I have a splitcontainer and few buttons. When the buttons are clicked respective forms are opened in the splitcontainer. The splitcontainer is anchored- top, left, right, bottom so that when the home form is resized the splitcontainer resizes itself automatically. The controls within the other forms are also anchored properly to resize themselves accordingly. But the problem is when i open a form in the splitcontainer, even if I resize the home form, the controls in the form within the splitcontainer aren't resizing. The reason is when the home form is resized the splitcontainer is resizing itself accordingly but the form inside the splitcontainer isn't (as forms don't have anchor or dock properties so I couldn't set them). As a result though the controls in the sub form are anchored to resize themselves yet they aren't.
View 1 Replies
ADVERTISEMENT
Mar 30, 2010
In my home form I have a splitcontainer and few buttons. When the buttons are clicked respective forms are opened in the splitcontainer. The splitcontainer is anchored- top, left, right, bottom so that when the home form is resized the splitcontainer resizes itself automatically. The controls within the other forms are also anchored properly to resize themselves accordingly. But the problem is when i open a form in the splitcontainer, even if I resize the home form, the controls in the form within the splitcontainer aren't resizing. The reason is when the home form is resized the splitcontainer is resizing itself accordingly but the form inside the splitcontainer isn't (as forms don't have anchor or dock properties so I couldn't set them). As a result though the controls in the sub form are anchored to resize themselves yet they aren't. How to solve it.In short I want the form in the splitcontainer and all the controls in it to resize automatically when the home form/splitcontainer is resized.
View 2 Replies
Dec 2, 2011
I am trying to write program in vb 2010 that is independent of screen resolution. I am designing the program in 1920*1080 and when I change the resolution to e.g. 800*600 everything blows up and the program won't fit the screen. I have tried three different approaches:
loop through all controls and scale their position and dimensions
Friend Sub ResizeControl(ByRef ctl As Control)
'---------------------------- GET SCALES -------------------------
Dim DesignScreenWidth As Integer = 1920
Dim DesignScreenHeight As Integer = 1080
[Code] .....
None of these methods has worked for me. One thing I figured out was that my main form is larger than 800*600 pixels so when I run the designer in 800*600 resolution VS cut down the with to 812px so my calculations of with and thus scaling ratio becomes wrong. This error goes applies for all three methods.
View 1 Replies
Feb 12, 2010
i use a picture control in mdi form .. but when i load child froms then mdi form picture are also show in front of child form...
View 7 Replies
Feb 11, 2010
I converted a VB6 application to VB.Net and in doing so, I seem to have lost the ability to auto-align the controls on the form. I thought I could change that in the "Tools > Options > Windows Forms Designer > General" area but that doesn't seem to work. Anyone have any ideas? I really don't need to use a grid for aligning since the auto-align functionality can be used but I just don't know how to get it back.
View 4 Replies
Aug 5, 2009
How to auto resize form, image and controls on different resolution using visual basic dotnet code.
View 1 Replies
May 9, 2010
1. What determines that some controls cannot be added to the form? (I tried several, not all of them)
2. Where does the image for Column 1 About form come from?
View 7 Replies
Jul 30, 2011
I am trying to write general function to set the attributes of the command button and want to access this function from any forms.But I am getting error in this function.[code]
View 1 Replies
Aug 14, 2011
I want to automatically generate VB.NET forms using tables from a SQL Server database (one form / database table). It is perhaps possible with writing custom custom code for it, but if there is already some feature that does the job that would be great (database has 40+ tables, manually doing this is a tedious task).
View 1 Replies
Sep 30, 2011
I have to ask a stupid question:How to pass values from my form into the controls of other form?I made textbox and button in my form1 and Label into the form2 When I click the button, I want to pass the values of the my textbox in the form1 into the labels of my form2
I am a student and totally new to vb.net
View 3 Replies
Aug 4, 2010
i want to when in run time i resize the form manually all the controls in the form to resize automatically so how can i do that?
View 1 Replies
Sep 26, 2010
I have a form containing two panels. In both panels there are two labels and textboxes. I set the 'Center In Form' property of the labels and textboxes to 'Horizontally' and 'Vertically' in design time respectively. But as the form is resizable, when the size of the form is increased or decreased at runtime the controls are no longer center aligned in the panels. How can I handle this problem (provided the main form needs to remain sizable)?
View 2 Replies
Sep 27, 2009
All I need to do is scale a panel to my co-ordinates X = 0-100 and Y = 0-100 and then plot a point (PSet?) at 50,50.
View 3 Replies
May 30, 2009
How to increase a forms opacity without increasing the opacity of the controls in the form?
View 1 Replies
Mar 31, 2011
I have a axwindowsmediaplayer object in my form which plays a video on load, but unfortunately the video seems too small and there is a massive black border around the video, is there anyway I can stretch the video to fill the whole player window?
View 1 Replies
Mar 5, 2010
I am new with VB.NET 2008 and I would like to know how to make a project so the forms will show correctly on various sizes of monitors. Do you have to put code in every form for this?
View 1 Replies
Jul 12, 2010
i have created a windows form that has some labels, lines , buttons and i have enabled autoscroll property to true. i am having trouble with relocating and resizing of the controls with resizing of form and change in screen resolution.i have used a code liike dim tmpctrl as control
for each tmpctrl in me.controls
tmpctrl.setbounds((tmpctrls.location.x/X)*me.width, (tmpctrls.location.y/Y)*me.height, (tmpctrls.size.width/X)*me.width,(tmpctrls.size.height/Y*me.height))
next
now as my form is a scrollable form.and the total window portion with respect to which i want to resize n relocate. m having trouble in choosing X , Y in the above code.
View 5 Replies
Jun 22, 2010
I am desinging a form with mutiple controls on a tab page control and was moving controls between tab pages by cutting and pasting them. The forms designer obviously got confused at some stage and I now have controls that are declared in the designer.vb but do not appear anywhere on the form.
I can't even rename the controls that are there which have been given generic names to the names I want because they apparently already exist. I realise I could edit the designer.vb and remove the references to these controls but that seems fraught with danger?
View 3 Replies
Apr 17, 2011
Finishing off my control, but I now found a nasty problem. When the user holds the 'Ctrl' key and scrolls the mouse scrollwheel, the control is scaled. I do not want that, since it would make the Font size fail.
I previously made it reset the scale on Control up, but that is just not a very elegant way:
Me.ZoomFactor = 1 I do not want the text scaled at any time, not even while the user is scrolling and it resets afterwards. I got to overriding the 'ProcessCmdKey' but no idea how to catch a scroll or zoom event.
Any way of disabling the RichTextBox scaling (or zooming) so it does not even occur? I have a control that inherits from the RichTextBox.
View 2 Replies
Jan 5, 2012
I have been searching for a solution to this but I can't find one. I have played with the anchor and dock properties but they are not doing what I want, so here goes... I would like to place and size all of my controls on my form and then when the form is re-sized during run time (different resolutions, full screen/windowed, etc), have everything just scale up or down accordingly. Anchoring the controls to all four sides of my form re-sizes the control properly but it doesn't move it's location in sync with the other control's size next to it, they begin to overlap each other. Am I going to have to code my own scaling code for each control in my program?
View 5 Replies
Jan 15, 2010
i want to implements users control. i have the same informations in a group box in a lot of forms. i would like to insert the same group box in all my forms.how would i do?
View 2 Replies
Jul 8, 2009
I need to work with custom controls, I want to be able to set the properties of my controls so when I put them on my windows forms they will show up in the properties window thing.
View 3 Replies
May 14, 2012
i am working Vb.NET 2008 Windows Appl. I was created some Forms which are having some controls. If i run the Appl in my sys its working fine. But if run .exe file into other system like Windows 7 with 125% text size, then the forms and Controls are expanding i want to scroll it out. Is it any solution for fit these Controls and Forms or comapre the screen size and resize the forms and controls automatically..
View 1 Replies
May 13, 2010
i'm done downloading and just install VB Express 2008 into my computer My computer running with window Xp. I like to make my own window application that can use to auto fill registration form. how to make it happen.
View 2 Replies
Feb 3, 2009
I have a VB 2008 Forms application which does Powerpoint automation -- I am opening owerpoint in a minimized window from within my app and am trying to periodically put update messages in a textbox on my main form while the automation is running (it takes a few minutes to complete), but my form window does not want to show these messages until the powerpoint operations are finished. It seems as if I need to force a window refresh or something on my windows form, but I'm unclear how to do that. Below is some code that I'm using that illustrates what I'm trying to do. When I run it, "Step One / Step Two / Step Three" do not show up on my textbox until after the Powerpoint automations are over.
View 3 Replies
Sep 17, 2010
I have a query about dynamically added controls to a form. I have a series of buttons which are created and added at run time. I have a two drop down lists and two buttons which are created at design time. Button 1 creates a series of buttons called "Test 1.x" based upon the selection of the two drop down lists. This works fine and am happy with the logic.However.... Button two should remove all the dynamically created buttons from the form.This does not happen. What does happen is that 50% of the buttons are removed starting with the first one. WHen checking the loop it only enters the loop half the amount of times that there are buttons. Very strange. When the loop is run repeatability it will remove all controls. Why will my logic not remove all the dynamically created controls at once? What is wrong with my logic?
I attach two code snippets and the .net file for your consideration.Button method which creates the dynamically created buttons from the two drop down lists and adds to form
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Count As Integer
Dim MaxHours As Integer
[code]....
View 3 Replies
Apr 2, 2009
I am creating an application and I am running 1280, 1024 Res and I want my application to be able to support any computer res. How can I do this if it is at all possible?
View 2 Replies
Dec 20, 2010
I have a form with MenuStrip, ToolStrip & StatusStrip. Placed a panel with a 5000 x 7000px image and scroll bars are on form and scroll the image fine. Problem is that all controls appear to have changed size to size of image and also scroll with it horizontally. When scrolling vertically, the image covers up the menu and tool strips. How I can keep the controls on top so they don't attach to the image in the panel?
View 2 Replies
Oct 8, 2010
I have Winforms application that holds dozens of controls.Now I'm planning another functionality where I have to move some of the controls and put others instead of them.I have to let the users to choose during runtime whether they prefer ver A or Ver B (means the other controls).
I have doubts what's the best practice to replace the controls.Should I hide the controls and replace them by others in runtime? (then the form may look messy during design time)Should I place them in a panel/group box and then replace the panels? (could be problem since I have some controls that should be displayed on both situations)
View 1 Replies
Aug 28, 2009
I am making a program that will fill in some info on a form. The information that needs to be filled is:
[Code]...
The thing is i need the program to click on a button on a website then open a new tab with the page it just clicked on, fill in email and click submit, then fill in the info that is above before pausing. I would also like the info above to be randomized each time the new page loads so it is not the same. I have already looked on this site and cant find what I am looking for.
View 11 Replies