Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET General > Two easy questions....


Reply
 
Thread Tools Display Modes
  #1  
Old 06-07-2004, 02:53 PM
bear24rw's Avatar
bear24rw bear24rw is offline
Contributor
 
Join Date: May 2004
Location: NJ
Posts: 477
Question Two easy questions....


How do i change the picture in the picture box to a differnt one from a file (in code)?

How do i get how big the form is (x,y) so if a user makes it bigger the program will know?

thanks
Reply With Quote
  #2  
Old 06-07-2004, 02:56 PM
Negative0 Negative0 is offline
Freshman
 
Join Date: Aug 2003
Posts: 30
Default

Quote:
Originally Posted by bear24rw
How do i change the picture in the picture box to a differnt one from a file (in code)?

How do i get how big the form is (x,y) so if a user makes it bigger the program will know?

thanks
Code:
PictureBox1.Image = Image.FromFile("C:\Output124.tif") MsgBox("H:" & Me.Height & vbCrLf & "W:" & Me.Width)

The Form Resize event is called whenever the form is resized, so when that event is fired, you know the form size is being changed.
__________________
Negative0
Vote you Hippy
Reply With Quote
  #3  
Old 06-07-2004, 03:01 PM
bear24rw's Avatar
bear24rw bear24rw is offline
Contributor
 
Join Date: May 2004
Location: NJ
Posts: 477
Default

thanks
Reply With Quote
  #4  
Old 06-08-2004, 01:06 PM
bear24rw's Avatar
bear24rw bear24rw is offline
Contributor
 
Join Date: May 2004
Location: NJ
Posts: 477
Default

How would i go about to find the width and hight of the screen (not the form)?
Reply With Quote
  #5  
Old 06-08-2004, 01:50 PM
Negative0 Negative0 is offline
Freshman
 
Join Date: Aug 2003
Posts: 30
Default

Quote:
Originally Posted by bear24rw
How would i go about to find the width and hight of the screen (not the form)?
Code:
MsgBox(Screen.PrimaryScreen.WorkingArea.Height()) MsgBox(Screen.PrimaryScreen.WorkingArea.Width())
__________________
Negative0
Vote you Hippy
Reply With Quote
  #6  
Old 06-08-2004, 01:53 PM
bear24rw's Avatar
bear24rw bear24rw is offline
Contributor
 
Join Date: May 2004
Location: NJ
Posts: 477
Default

thanks
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->