Results 1 to 5 of 5

Thread: [Resolved]how to creat new picturebox IN a frame

  1. #1

    Thread Starter
    Addicted Member Incures's Avatar
    Join Date
    May 2006
    Location
    south afrika
    Posts
    205

    Resolved [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.
    Last edited by Incures; Aug 14th, 2007 at 02:00 AM.
    vb Code:
    1. If(this post = helped you) then
    2. You.rate = me
    3. End if


    **Fazi's idea =]

  2. #2
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    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
    Last edited by jcis; Aug 13th, 2007 at 07:43 PM.

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    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

  4. #4

    Thread Starter
    Addicted Member Incures's Avatar
    Join Date
    May 2006
    Location
    south afrika
    Posts
    205

    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
    vb Code:
    1. If(this post = helped you) then
    2. You.rate = me
    3. End if


    **Fazi's idea =]

  5. #5
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: how to creat new picturebox IN a frame

    Try to create a "Label" instead of a "Lable"
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width