[Resolved]how to creat new picturebox IN a frame
i know how to creat a new picturebox but the problem is that when i run the program the picture box create on the back of the form
and i want it to be on some frame.
how can i do it?
and one more thing how do i check if the is any printer install to the computer? ther is any way?
thank you.
Re: how to creat new picturebox IN a frame
Code:
Set Picture1.Container = Frame1
About Printers, you can use Printers.Count to see how many Printers you can use
Code:
MsgBox Printers.Count
Re: how to creat new picturebox IN a frame
Code:
Option Explicit
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub Command1_Click()
SetParent Picture1.hWnd, Frame1.hWnd
Picture1.Move 0, 0
End Sub
Re: how to creat new picturebox IN a frame
thank you guys u did me a grate favor..
i tryed to find it so long and dident knew how to search for it =\
by the way how do i creat new lable?
i tryed same as new picturebox but its dident worked
here is my code >>
the error is "user define type not defined"
Code:
Private Sub Command1_Click()
Dim Lable1 As Lable
Set Lable1 = Me.Controls.Add("VB.Lable", "newLable")
With Lable1
.Left = 0
.Top = 0
.Width = 250
.Height = 250
.Visible = True
.BackColor = &H80000003
End With
End Sub
Re: how to creat new picturebox IN a frame
Try to create a "Label" instead of a "Lable"