|
-
Dec 12th, 2006, 09:13 PM
#1
Thread Starter
Addicted Member
[RESOLVED] PictureBoxs loaded at runtime not showing up
Code runs without erros, but the images aren't displaying. The first control in the array is visable.
Am I missing something or doing anything wrong????
VB Code:
For i = 1 To UBound(DisplayTree())
Load Form1.Img1(i)
With Form1.Img1(i)
.Picture = LoadPicture(App.Path & "\bmps\" & DisplayTree(i).Icon & ".bmp")
.Top = DisplayTree(i).OffSetA * 500
.Left = DisplayTree(i).OffSetB * 3000
.Width = 2655
.Height = 975
End With
Next i
-
Dec 12th, 2006, 09:39 PM
#2
Re: PictureBoxs loaded at runtime not showing up
What is DisplayTree(i).Icon ??? What value does it have when code is executed?
Also highlighted numbers
.Top = DisplayTree(i).OffSetA * 500
.Left = DisplayTree(i).OffSetB * 3000
look like too large to me...
-
Dec 12th, 2006, 10:14 PM
#3
Re: PictureBoxs loaded at runtime not showing up
You need to add .Visible = True
-
Dec 12th, 2006, 10:46 PM
#4
Thread Starter
Addicted Member
Re: PictureBoxs loaded at runtime not showing up
The problem code is in the module: drawingclass .
And the numbers in bold are actually too small at the moment.
DisplayTree is the following user type
VB Code:
Type MasterObject
Builder_name As String 'name of the builder that builds the object,
'add to description
Local_Tech As String 'What can be deployed from this station - con.s or ships
'add to discription
Abilities_Text As String 'Abilities, plain and simple. like smallrip, repair
'add to description
Loadout As String 'add to description
Description As String 'enough said
Def As String 'turns required numbers on
Pre As String 'defines what Def(s) are needed
base_tech As String 'Normal starting tech Def bits
no_dev_tech As String 'Abnormal starting tech Def bits for use with death match and other modes
Id As String 'cheack to see if there are doubles, if there are it could cause problems
Next_Id As String 'what the object upgreads to, carful if there are doubles of Id
Group_Id As Integer 'group all objects on tabs according to this
Icon As String 'use this image, is actually the entry modle in the .cvs files with an i in front
nName As String 'enough said
station As String 'starting station
filetype As String 'which file the intry was read from
OffSetA As String 'see OffSetB; Left in top to down mode and Top
'for left to right
OffSetB As String 'the number of steaps on the logest route from each
'tech to base to determine the Y
'position (tier might be a better word) of a
'given tech. This number will be used to determin
'Top (y position, in top to bottom mode) or
'Left (x position, in left to right mode) by
'number times offset (which can be set by the
'user for custability)
'NOTE!!!!: Currently the shortest route to a given tech, Longest route too for me to figure out and it may workout in the end this way
End Type
Heres the whole project, but the .bmps are 6 mb
-
Dec 12th, 2006, 10:50 PM
#5
Re: PictureBoxs loaded at runtime not showing up
By default a control that is Loaded at runtime is not visible so you have to set .Visible to True.
-
Dec 12th, 2006, 10:55 PM
#6
Thread Starter
Addicted Member
Re: PictureBoxs loaded at runtime not showing up
 Originally Posted by MartinLiss
You need to add .Visible = True
That worked.
I guess controls don't inherit all the properties of the previous control.
-
Dec 12th, 2006, 11:24 PM
#7
Re: PictureBoxs loaded at runtime not showing up
Yes, you are right. properties like Visible, Top, Left will not be inherited...
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
-
Dec 13th, 2006, 10:21 AM
#8
Re: PictureBoxs loaded at runtime not showing up
 Originally Posted by ganeshmoorthy
Yes, you are right. properties like Visible, Top, Left will not be inherited...
No, actually Top and Left are inherited and unless you change them like Tontow did the Loaded control will be placed directly on top of the original one.
-
Dec 14th, 2006, 12:22 AM
#9
Re: PictureBoxs loaded at runtime not showing up
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
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
|