docking error
docking error
docking error
docking error
docking error
docking error docking error docking error docking error docking error docking error docking error docking error
docking error docking error
docking error
Go Back  Xtreme Visual Basic Talk > > > docking error


Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2005, 05:00 AM
lamy's Avatar
lamy lamy is offline
Junior Contributor
 
Join Date: Jan 2003
Location: under your bed
Posts: 347
Default flipping error while docking


i have a usercontrol with a picture box which i rotate depending on the docking style, theres no error at build time but when i try to dock it (design time) i get this error "Invalid Property Value", and the detail is "Object reference not set to an instance of an object."

this is what i have in my usercontrol
Code:
Private _flip As RotateFlipType = RotateFlipType.Rotate270FlipNone Private Sub PanelHolder_DockChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.DockChanged If MyBase.Dock = DockStyle.Top Or MyBase.Dock = DockStyle.Bottom Or MyBase.Dock = DockStyle.Fill Then If _flip = RotateFlipType.Rotate90FlipNone Then _flip = RotateFlipType.Rotate270FlipNone rotateImage() End If Else If _flip = RotateFlipType.Rotate270FlipNone Then _flip = RotateFlipType.Rotate90FlipNone rotateImage() End If End If End Sub Private Sub rotateImage() If _flip = RotateFlipType.Rotate270FlipNone Then _flip = RotateFlipType.Rotate90FlipNone Else _flip = RotateFlipType.Rotate270FlipNone End If Dim gfx As Image With gfx .RotateFlip(_flip) PictureBox1.Image = gfx .Dispose() End With End Sub
__________________
slow down when you need to hurry, stop when you need to move on,
look back when you need to forget, or you might slip and leave sanity

Last edited by lamy; 10-19-2005 at 10:05 PM. Reason: change the title to more appropriate one
Reply With Quote
  #2  
Old 10-19-2005, 05:15 AM
Sonreir's Avatar
Sonreir Sonreir is offline
Contributor
 
Join Date: Jul 2004
Location: Hampshire, England
Posts: 540
Default

Seems like you're trying to access something that hasn't yet been instanciated within your control.
Reply With Quote
  #3  
Old 10-19-2005, 10:03 PM
lamy's Avatar
lamy lamy is offline
Junior Contributor
 
Join Date: Jan 2003
Location: under your bed
Posts: 347
Default *** resolved

tnx Sonreir, silly me, forgot to assign an image to gfx
Code:
Dim gfx As Image = PictureBox1.Image
__________________
slow down when you need to hurry, stop when you need to move on,
look back when you need to forget, or you might slip and leave sanity

Last edited by lamy; 10-19-2005 at 10:46 PM. Reason: *** resolved
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
docking error
docking error
docking error docking error
docking error
docking error
docking error docking error docking error docking error docking error docking error docking error
docking error
docking error
 
docking error
docking error
 
-->