VS 2010 Resizing A Shape - How To Implement MinimumSize
May 23, 2010
I am creating a simple shape editor, much like the Visual Studio form designer. You can create shapes, select them and move/resize them using drag handles just like in Visual Studio or most other applications (Visio, etc).
I have run into some problems trying to implement a MinimumSize property for the shapes.First of all, this is how I'm resizing the shapes. Each shape has a Resize method, accepting two integers (dx and dy) that represent how much the shape must resize by, and one 'HitStatus', which determines in which direction the resize must take place (for example, from the TopLeft, or Bottom, or BottomRight, etc..)
What it does basically is use a large Select Case statement for the hit status. In each case, it changes the Bounds property of the shape (which determines the location and size), so that it is resized:
[Code]...
View 3 Replies
ADVERTISEMENT
May 6, 2011
Resizing a Rectangle shape when the program is running.
View 14 Replies
Mar 23, 2011
I am using Rack-mounted Equipment (US units).VSS as stencil. I need to Connect a server on Rack.
View 1 Replies
Jun 7, 2012
how to fill an closed shap in visual basic 2010
i try it but when i press on the button fill all the page was colored
View 2 Replies
May 2, 2010
I am using vb 2010 and I have a question about anchor. I have two panels side by side, I anchored them both: top, left, right. But when I resize it the left panel goes behind the right panel. Isn't there a way so that when I resize, both panels grow parallel?
View 14 Replies
Apr 30, 2012
I am trying to open up an image file that gets created by my program edit it and then resave it to the same location.
View 3 Replies
Aug 16, 2011
The VBA Code is
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 105.75, 54.75, 114, 65.25).Select
ActiveSheet.Shapes.AddShape(msoShapeOval, 441, 57, 117.75, 90.75).Select
For VB.Net, I tried looking the prefix for "msoShapeRectangle" or "msoShapeOval" in
Microsoft.Office.Core.MsoShapeType. But couldn't find it.
View 2 Replies
Nov 1, 2009
im trying to make an ovalshape change colour when i click a button?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "hello" Then
OvalShape1.FillColor = Color.Red
[code]....
View 1 Replies
Apr 9, 2012
I am trying to make a shape move in a rectangular route clockwise. Right now I am only able to make the shape go right, down, left but not back up again. Whenever I try to make the shape return to its original position, the shape moves back up at the wrong place.
Public Class Form1
Public movingright1 As Integer
Public movingdown1 As Integer
[Code]......
View 1 Replies
Apr 27, 2012
I've set every setting I could find on the DataGridView to a specific font size however when the form it resides on loads I step through the code and put my cursor over the DataGridView1.Font.Size and it always shows 8.25 (I've set everything to 18).
What I'm trying to do is resize the DGV on load of the form to a percentage based on the size of the form relative to the size of the screen. Everything else on all of my other forms are resizing correctly but the DGV is not.
Here is the designer generated code for property reference:
vb.net
'DataGridView1
'
Me.DataGridView1.AllowUserToAddRows = False
[Code].....
View 5 Replies
Mar 2, 2011
Is it possible to disable resizing of the SplitContainer's panels?
View 2 Replies
Apr 16, 2012
Having a bit of a nightmare with my application. I have developed my application in 1366 x 768. When moving onto other resolutions, the form looks totally wrong. Is there a way to have the application force itself to open up in a box that will fit the screen?(I'm more than happy to pay someone today or tomorrow who could look at making sure that my form gracefully up / down scales). This really is pretty urgent in that respect. If you have the ability to gracefully scale a form up / down and can do so for me either today or tomorrow, let me know of your price. (Possibly a bit naughty to pop this into the forums but I am willing to pay to get this sorted asap).
View 4 Replies
Mar 23, 2011
I have a Form (Form1) that contains a Panel inside the form. Inside that panel I want to load another form (Form2). This all works fine, however when I resize Form1 I want Form2 to resize aswell. The panel resizes fine but Form2 will not resize. Here is the code for Form1
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code].....
Is there some sort of setting I am missing to be able to achieve this or is it not possible?
View 6 Replies
Jan 14, 2011
I have a datagrid and load data from a database in and can't find thesolution for a couple of propblems..
1) The columns from the DB is loaded in to the datagrid but the width of each column is very small and needs resizing to view all data everytime it loads. Can I programmically make the colums show wider annd fill the datagrid?
2) I load the columns using SELECT col1,col2,col3 from table; then load that in to the datagrid. col1 is a primary key so has to be loaded as I perform an update of edited data at the end. Can I somehow hide col1 so it does not show in the datagrid?
View 5 Replies
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
May 6, 2012
I have developed a windows application on a size of 1366,768. When i have opened the application on another pc, the location of the controls are not the same anymore. Part of the application can't be displayed as well. How can I handle that in vb?
View 1 Replies
Sep 10, 2011
While the application is running, I want the buttons, text boxes, datagrid, everything thats on the form to resize when the screen is maximized and again resize when its minimized.
View 2 Replies
Jan 10, 2012
I've got a data-bound data grid view and one of the fields is an image. How do I scale down the image to a reasonable thumbnail size (say, 100px wide) and adjust the height and width of that cell so that it fits the image?
View 2 Replies
Jul 17, 2010
First of all my trying to implement a adblocker to my project. I know there is a working version for Firefox,IE, W.e but I want one that I can implement to vb.net.What should I be looking to implement ad block or is there a snippet I can take a look at.
View 5 Replies
May 11, 2011
I took sample code to implement the IReportServerCredentials to send the login information to retrieve a report remotely but for some reason the implementation is error prone.
[Code]...
View 1 Replies
Nov 23, 2011
1-When I click on the ''Square'' radio button I want the shape to appear in the image box, then need I only need 1 text box to appear where the 4 side boxes are, this will be where I enter the value of the sides to calculate the perimeter and I also want the area and perimeter boxes to appear at the bottom since I don''t need the volume text box.
[Code]...
View 10 Replies
May 27, 2010
I have a project(solution) which aims to lance a Form from a lancer module. On my Form Design the buttons are nice and round. When I go to Run the solution and the the Form is set as startup project, all is OK but when lancer module is set as startup project all buttons change to hard rectangular shapes and rounded corners dissapear (see attachments).
View 3 Replies
Dec 28, 2010
I want to be able to take a flat image and do this with it in my program
[code]...
how do I change the points?
how do I load only PART of an image from abitmap into bbitmap?
View 10 Replies
Mar 17, 2010
is there any way that you could change the shape of a button?
View 3 Replies
Sep 3, 2009
I need to change the shape of my tabs... untitled.JPG
View 2 Replies
Nov 17, 2011
how to change the shape of the end of the line
I would like to Cap type . Square, as here
View 9 Replies
Jul 14, 2010
Is there anyway to change the shape of the picture box into a round,cross or star shape
View 16 Replies
Jan 28, 2011
how do you correctly dispose a shape in vb.net ie when you draw a rectangle using the pen function how do I depose it so that it will disappear from the form, for some reason once its drawn if I draw a new shape it keeps the previous one and just overlays the new one and I use shape.dispose, and pen.dispose?
View 5 Replies
Jun 21, 2010
I want to create a window in a different shape. Not rectangular or eclipse but lets say a window look like a panda.!!!
View 1 Replies
Sep 15, 2009
I have done the coding to create a diamong shape using the for next loop but the output comes out differently:
Module Diamond
Sub Main()
Dim row, space, asterisk As Integer
Dim height=5 As Integer
Dim height2=4 As Integer
[Code] .....
View 1 Replies