|
-
Aug 13th, 2007, 11:50 PM
#1
Thread Starter
Addicted Member
object missing =\ code inside ...scan it forever =[
Im sirrting aginst that code for 60min and its 8:00 am and i dident sleep =\
i cant find what wrong!?@
its says object missing ....and highlight that
"Set Label.Container = Picturebox1"
Code:
Private Sub Form_Load()
Dim Picutrebox As PictureBox
'make the form pixels for easier drawing... doesn't have to be though
Me.ScaleMode = vbPixels
'draw picturebox
Set PictureBox = Me.Controls.Add("VB.Picturebox", "Picturebox1")
With PictureBox
.Left = 1080 + 255 * 1
.Top = 5040
.Width = 500 * 2
.Height = 500 * 2
.Visible = True
.BackColor = &H8000000F
End With
Dim Label As Label
Set Label = Me.Controls.Add("VB.Label", "CMLabel1")
Set Label.Container = Picturebox1
With Label
.Left = 0
.Top = 0
.Width = 500
.Height = 500
.Enabled = False
.Visible = True
.Caption = "345 X 345"
End With
End Sub
and ... is it possible to check if ther is internet connection on the computer?
which includes routers
Last edited by Incures; Aug 14th, 2007 at 12:36 AM.
vb Code:
If(this post = helped you) then
You.rate = me
End if
 
**Fazi's idea =]
-
Aug 14th, 2007, 05:11 AM
#2
Re: object missing =\ code inside ...scan it forever =[
Set Label.Container = Picturebox1
should be
vb Code:
Set Label.Container = Me.Controls("picturebox1")
or as the variable picturebox is still in scope, you could use
vb Code:
Set Label.Container = Picturebox
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 14th, 2007, 06:04 AM
#3
Frenzied Member
Re: object missing =\ code inside ...scan it forever =[
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
|