|
-
Jun 6th, 2000, 04:41 PM
#1
Thread Starter
Hyperactive Member
Hello VB users,
I am trying to create a form size greater then screen size.
For example to create a area of a big factory.
To move to a part what is not on the screen you have to use a scroll bar.
Is this possible? If yes, how do I do this?
Nice regards,
Michelle.
-
Jun 6th, 2000, 04:57 PM
#2
Well, you can't or shouldn't make the form it self bigger then the screen. The content of the form may be bigger though.
Add a PictureBox to the form and set it to the size you want the form to have. Add the controls you need to the PictureBox container and then add scrollbars to the form.
Calculate the scrollbars max value by substracting the PictureBox width/height with the forms width/height (this calculation should be done in the Form_Resize event).
Now just move the PictureBox when the scrollbars changes value.
Good luck!
-
Jun 6th, 2000, 05:02 PM
#3
Frenzied Member
what you could do is place a picturebox on a form and position it using scroll bars
take a look at my earlier posting
http://forums.vb-world.net/showthrea...threadid=11227
-
Jun 6th, 2000, 05:04 PM
#4
Fanatic Member
Not in the sense that the form can be bigger than the screen. You need to use picture boxes.
- Lets say your form is the size of the screen.
- Place a horizontal and vertical scroll bar on the edges of the form.
-Place A picture box the remaingin size of the form on the form.
-Place a second picture box inside the 1st one
-Place all of your controls in the 2nd picture box.
-The 2nd picture box can be bigger than the 1st picture box.
-place the following code in the scroll bars. You can change it make it smoother.
Code:
Private Sub HScroll1_Change()
Picture2.Left = -HScroll1
End Sub
Private Sub HScroll1_Scroll()
HScroll1_Change
End Sub
Private Sub VScroll1_Change()
Picture2.Top = -VScroll1
End Sub
Private Sub VScroll1_Scroll()
VScroll1_Change
End Sub
Good Luck.
Regards.
Iain, thats with an i by the way!
-
Jun 6th, 2000, 06:05 PM
#5
Thread Starter
Hyperactive Member
Thanks for the answers, but I need also object functionallity. On a picture you can't place a TextBox!
Nice greetings,
Michelle.
-
Jun 6th, 2000, 06:06 PM
#6
Fanatic Member
Iain, thats with an i by the way!
-
Jun 6th, 2000, 07:58 PM
#7
transcendental analytic
Note that any control can not be larger than screen. What you are suggesting is to simulate it with scollbars and moving controls.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 6th, 2000, 09:19 PM
#8
Originally posted by michelle
On a picture you can't place a TextBox!
How told you that? You can add any control to a picturebox.
-
Jun 7th, 2000, 05:29 AM
#9
Or you case change the resolution of the screen, make the form the size of the screen then change it back.
There are a lot of problems that can arise with this method. (it's just a thought)
-
Jun 7th, 2000, 05:33 AM
#10
You can make a form bigger than the screen!!!!!!!!!!!!!!!!!
Yeap have seen an asset system with forms bigger than the screen. Not a nice system to use though.
-
Jun 7th, 2000, 06:17 AM
#11
transcendental analytic
No meg, that wont work, it will cut of the parts out of size.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|