Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


CruciasNZ

879 posts

Ultimate Geek

Trusted

#59937 15-Apr-2010 11:32
Send private message

Hey all,

I have made a basic application using Visual Studio 2005 in VB.Net

I need to know how to make the form move with scrollbars.

I currently have a Vbar and Hbar docking in the right place when i load the form, however as i haven't coded yet, sliding the bar does nothing.

Can someone more experienced give me a hand here?

Code is here, its saved in Rich Text Format, its not sensative so posting is no risk

http://www.treatmentx.org/Hosted_Data/Crucias.AP.Calc.rtf 

Thanks all!

Chris

Crucias AP App vB1 




Professional Forum Lurker


Create new topic
CruciasNZ

879 posts

Ultimate Geek

Trusted

  #318720 15-Apr-2010 11:50
Send private message

PS - Also happy to program the form just to be resizable and therefore scale its contents (thats probably more useful)




Professional Forum Lurker




rassnor
27 posts

Geek


  #318730 15-Apr-2010 12:03
Send private message

I think all you need to do is set the AutoScroll property of the form control to true, then resize the form to the desired viewing area and scroll bars are created automatically.

dpw

dpw
843 posts

Ultimate Geek

ID Verified
Trusted

  #318733 15-Apr-2010 12:19
Send private message

Ok...let me get this write...have you just written yourself a spreadsheet?

Anyway, regardless of that, what exactly are you trying to achieve? What governs the scrolling, where are you scrolling to?

It seems you have just added scrollbar controls to the form - is that right? You may just want to make your form automatically show scrollbars when the content overflows the form. It's been a while since I've done .NET 2.0 in VS2005 - the property name escapes me at the moment.

Hope that makes sense?




Android user, software developer, a semi-typical (not a gamer) geek, and a Bernese Mountain Dog nut!

http://savitarbernese.com | https://nz.linkedin.com/in/danywu




CruciasNZ

879 posts

Ultimate Geek

Trusted

  #318740 15-Apr-2010 12:27
Send private message

Its not a spreadsheet, its a calculator for a game.

i can resize the form, but it wont shrink the controls inside it. Nor will it scale them up.

I want to resize the whole form, so the boxes etc inside scale with it. I don't know how to do this :( 




Professional Forum Lurker


dpw

dpw
843 posts

Ultimate Geek

ID Verified
Trusted

  #318741 15-Apr-2010 12:31
Send private message

Sorry...forgot to put a smiley...was just kidding about the spreadsheet thing :o)

Anyway, you have to "pin" various corners of the controls to the container to make it resize with the container. It's all in the Property panel for each control.




Android user, software developer, a semi-typical (not a gamer) geek, and a Bernese Mountain Dog nut!

http://savitarbernese.com | https://nz.linkedin.com/in/danywu


dpw

dpw
843 posts

Ultimate Geek

ID Verified
Trusted

  #318742 15-Apr-2010 12:33
Send private message

Sorry...not "Pin"...I think the word is "Anchor"

Use a combination of anchoring and docking to place and automatically size the controls. If you want various controls to respond differently to the form resizing then you can always group them in various containers, eg. Panel, GroupBox, etc.




Android user, software developer, a semi-typical (not a gamer) geek, and a Bernese Mountain Dog nut!

http://savitarbernese.com | https://nz.linkedin.com/in/danywu


CruciasNZ

879 posts

Ultimate Geek

Trusted

  #318778 15-Apr-2010 13:15
Send private message

i managed to get the scrolling working, unfortunately the process for scaling seems to out of it for me




Professional Forum Lurker


 
 
 

Cloud spending continues to surge globally, but most organisations haven’t made the changes necessary to maximise the value and cost-efficiency benefits of their cloud investments. Download the whitepaper From Overspend to Advantage now.

dpw

dpw
843 posts

Ultimate Geek

ID Verified
Trusted

  #318793 15-Apr-2010 13:51
Send private message

It's not too convoluted a concept - if you google "winform anchor and dock" there are plenty of examples and tutorials out there.




Android user, software developer, a semi-typical (not a gamer) geek, and a Bernese Mountain Dog nut!

http://savitarbernese.com | https://nz.linkedin.com/in/danywu


benfes
6 posts

Wannabe Geek


  #320193 19-Apr-2010 12:17
Send private message

I'm not efficient in VB however I am in C# and the process is the same. In visual Studios, in the properties sidebar there will be a propertie called "anchor" click on the ellipses (or arrow) next to it. It will show you some boxes. These boxes represent the sides of the form.
you want to anchor the controls to the top and left boxes to hold them in that place. If you anchor them to the right and bottom boxes they will expand and contract as the form does.
There are other ways of doing this, you could write a method that gets the forms size and adjusts the controls accordingly as the form is resized. However the anchor method is probably the best bet without any direct coding.

Hope this helps.

Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.