Login Register






Tutorial Resize the tools with your form filter_list
Author
Message
Resize the tools with your form #1
i'll make this very quick because i don't have much time

this is a simple way for some people who is having this problem :

they make a simple form

[Image: 103tvdd.jpg]

but whey they resize it , its like this

[Image: 2ut18ap.jpg]

here is a simple code to make it like this

[Image: yyvrr.jpg]

Code:
Dim ProportionsArray() As CtrlProportions Private Sub Form1_HandleCreated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.HandleCreated Informload() End Sub Private Structure CtrlProportions Dim HeightProportions As Single Dim WidthProportions As Single Dim TopProportions As Single Dim LeftProportions As Single End Structure Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Resizeform() End Sub Sub Informload() On Error Resume Next Application.DoEvents() ReDim ProportionsArray(0 To Controls.Count - 1) For I As Integer = 0 To Controls.Count - 1 With ProportionsArray(I) .HeightProportions = Controls(I).Height / Height .WidthProportions = Controls(I).Width / Width .TopProportions = Controls(I).Top / Height .LeftProportions = Controls(I).Left / Width End With Next End Sub Public Sub Resizeform() On Error Resume Next For I As Integer = 0 To Controls.Count - 1 Controls(I).Left = ProportionsArray(I).LeftProportions * Me.Width Controls(I).Top = ProportionsArray(I).TopProportions * Me.Height Controls(I).Width = ProportionsArray(I).WidthProportions * Me.Width Controls(I).Height = ProportionsArray(I).HeightProportions * Me.Height Next End Sub

Reply

RE: Resize the tools with your form #2
Images appear to be broken, try and fix them when you have time to.

I know trying to resize a form in any .NET language via a button or something else isn't the easiest. Thanks for the code, I guess.

Reply

RE: Resize the tools with your form #3
(10-20-2015, 03:42 PM)XFL Wrote: Images appear to be broken, try and fix them when you have time to.

I know trying to resize a form in any .NET language via a button or something else isn't the easiest. Thanks for the code, I guess.

images seems to be working from here

[Image: 122l1sg.jpg]

Reply

RE: Resize the tools with your form #4
(10-20-2015, 03:49 PM)ManiT0X Wrote: images seems to be working from here

Nope, they're broken for me too.

Reply

RE: Resize the tools with your form #5
Theyre broken on desktop but not my mobile device.. Weird.

Reply

RE: Resize the tools with your form #6
(10-20-2015, 04:52 PM)XFL Wrote: Theyre broken on desktop but not my mobile device.. Weird.

i change them from postimage to tinypic , its working with both of them on my laptop , desktop , android

Reply

RE: Resize the tools with your form #7
(10-20-2015, 05:12 PM)ManiT0X Wrote: i change them from postimage to tinypic , its working with both of them on my laptop , desktop , android

Working now, thanks. Sorry for the confusion.

Reply

RE: Resize the tools with your form #8
How is this any better than Dock or Anchor?

Reply

RE: Resize the tools with your form #9
(10-20-2015, 05:19 PM)dotcppfile Wrote: How is this any better than Dock or Anchor?

Dock sometimes makes things too obscene and can cause overlapping with static objects. However, I guess anchor in junction with dock could honestly fix that issue.

Reply

RE: Resize the tools with your form #10
I just disable resizing on all my forms anyway. This shit makes it look ugly.
[Image: F4Z9Dqw.png]

Reply