PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
[RESOLVED] Can someone look at this please???-VBForums
Results 1 to 36 of 36

Thread: [RESOLVED] Can someone look at this please???

  1. #1

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Resolved [RESOLVED] Can someone look at this please???

    I am trying to write some code that uses a selection box, I had it working on another project, that I had been working on. But that is now gone, off my hard disk drive. Then this code does work, properly and very well in deed. I am then trying to put together the code that I have to do what I what to do. But I am not quite sure, of what is going wrong. As you can see in the project files, that I have been able to post on this thread...

    Also how do I get this control to be sized up or down, using the mouse in design time only???
    Last edited by ThEiMp; Mar 25th, 2010 at 01:11 PM.
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  2. #2
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,998

    Re: Can someone look at this please???

    Sorry didn't get your question?

    BTW

    vb Code:
    1. '~~> Rest of the code
    2. '
    3. Exit Sub '<~~ You don't need this as you will automatically exit sub
    4. End Sub
    5. '
    6. '~~> Rest of the code
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    OMEN by HP - 15-ce073tx with Win10+Office 2013. || Mac Book Pro (10.6.8) with Office 2011

  3. #3
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    I have a hard feeling that @TheiMp is just wants to make the document to fit the application where the document is shown, but let the picturebox, and the scrollbars follow the resize. Thats why the UserDocument_Resize() event is exists.

    Code:
    Private Sub UserDocument_Initialize()
      UserDocument.ScrollBars = 0
    
      'uncomment the following line if you experience that the controls wont get resized at startup.
      'Call UserDocument_Resize
    End Sub
    
    Private Sub UserDocument_Resize()
    Dim sVal As Single
      With UserDocument
        VScroll1.Left = .ViewportWidth - VScroll1.Width
        sVal = .ViewportHeight - HScroll1.Height: VScroll1.Height = IIf(sVal > 1, sVal, 1)
        
        HScroll1.Top = .ViewportHeight - HScroll1.Height
        sVal = .ViewportWidth - VScroll1.Width: HScroll1.Width = IIf(sVal > 1, sVal, 1)
        
        sVal = .ViewportWidth - VScroll1.Width: Picture1.Width = IIf(sVal > 1, sVal, 1)
        sVal = .ViewportHeight - HScroll1.Height: Picture1.Height = IIf(sVal > 1, sVal, 1)
        
        Shape1.Left = VScroll1.Left: Shape1.Top = HScroll1.Top
      End With
    End Sub
    This will do the job for you.
    Is that you are after?
    Last edited by Jim Davis; Oct 24th, 2009 at 06:33 PM.

  4. #4

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    Yes Jim, that was what I was after!!
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  5. #5
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    If you dont mind, i would like to ask you to next time just focus on the issue, and try to keep the question as much simple as you just can.

    The question of this problem would be simple like that.
    Title: Controls on UserDocument
    Body: How can i resize controls on a UserDocument, to fit the parent application?
    Or something similar. That would be better, and everybody could understand it.

    I'm glad you found my code useful. Just dont forget to mark the thread as resolved.

  6. #6

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    One more thing: How am I able to use the mouse to resize the control, in design time???
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  7. #7
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    Since the controls on your document are hiding the surface of the userdocument, you have to click on the Properties tool window, and select the UserDocumen1 from the combolist, then you can resize the document.

    The controls will be aligned at runtime.

  8. #8

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    I have found what you are talking about. But I haven't found the Resize, property in the properties window of the VB IDE.
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  9. #9
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    But how do you want to use one property in the property list, to resize a form in design mode by using the mouse?
    Sorry but i'm a bit confused how you meand that.

    You have to use the Width and Height properties to do that. However i'm not sure it makes any difference, since userdocument will be resized to fit to the host application. But i could be wrong at here, i've never used UserDocuments.

  10. #10

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    This is my second time this time round, doing this. I did this for HP, back in 1999!!

    But what is the handler sub routine for resizing in design time??? Is it Public Sub Form_Resize()???
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  11. #11
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    What do you mean by "design time" then. Design time is when you design your controls in the vb ide. Run-time is when you execute the application. There aren't any methods of the userdocument will be executed to do anything at Design Time.

    There aren't Form_Resize on userdocument either . You may want to look for the UserDocument_Resize() that is the userdocument equalet of this event. It will be fired when the size of the userdocument has been changed.

  12. #12

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    I am making this control for people, who wish to make a strategy game using this control. Also I am doing this just for fun, as well. I am trying to make it like a normal frame, and scroll bar, using a picturebox for the control' body. Also it has a selection box, that will soon be able to select pictureboxes, in the picturebox container.
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  13. #13
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    So why don't you just use usercontrol then. There ain't much difference, but usercontrol's wont get resized to fit the application when you execute them.

  14. #14

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    I don't want to make them fill the screen at run-time. That part, is for the user to use the mouse to make it any size they wish. But my ActiveX control, won't resize, in design-time. This means that I can position it, but I cannot make it bigger or smaller on the Form, when I am making properties for it.
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  15. #15
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    But my ActiveX control, won't resize, in design-time.
    huh? usercontrols _can_ be resized any time, therefore the activex's can be also. You may want to take a closer look in your usercontrol's event, to find out why it doesn't get resized. Probably you are setting the Width and Height properties in the control's Resize event, causing the control immediately resize itself (back to the original size).

  16. #16

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    I am getting to what I want. I am going to post the control on this thread, when I am finished and then place it in the VB6 CodeBank sub forum, as well!!
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  17. #17
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    Have you just found and fixed the problem regarding the resizing issue?

  18. #18

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    Not quite!!
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  19. #19
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    Well lets see then. Can you please show a cut-down version of this usercontrol (or attach the actual file as an attachment to your post), that will demonstrate the issue you are experiencing?

  20. #20

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    Here are the files!!
    Last edited by ThEiMp; Mar 25th, 2010 at 01:11 PM.
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  21. #21
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    Unfortunately these OCX'es are missing from my computer. But it might doesn't matters. Where is your ActiveX control will run? Within an application, or do you planning to run it online, embeded into a HTML document?

    Code:
    Public Sub UserControl_Resize()
    picBGK1.Height = picBGK1.Height + "10"
    picBGK1.Width = picBGK1.Width + "10"
    
    Exit Sub
    End Sub
    This is completely bogus. First of all, it is pointless to assign string data to numeric variables. Just assign them as numbers. Second, you dont have to Exit Sub from a subroutine that will be ended at the next line. This later is already did noticed by @koolsid at the second post in this thread.

    I'll go further. If you just want to resize the controls with your UserControl, you have to use the UserControl's Width and Height properties but not the PictureBox's properties to assign it to itself.

    Code:
    Public Sub UserControl_Resize()
      picBGK1.Height = UserControl.Height - 10
      picBGK1.Width = UserControl.Width - 10
    
      'Exit Sub
    End Sub
    This should be look like this. Now, if you compile this usercontrol as an ActiveX control, you can embed it in your application, there you can resize it at Design-Time or RunTime, the Picturebox will gets resized with the control, because the UserControl_Resize() method will do it immediately.

  22. #22

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    It now looks like this:

    vb Code:
    1. Public Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2. picBGK1.Height = UserControl.Height = CurrentX
    3. picBGK1.Width = UserControl.Width = CurrentY
    4.  
    5. End Sub
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  23. #23
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    Is it works then?

  24. #24

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    no, it isn't working right!!
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  25. #25
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    Ok. Have you followed my instructions in the above post? Is that worked for you?

  26. #26

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: Can someone look at this please???

    Actually now when clicking on the object it vanishes off the Form totally, during run-time!!
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  27. #27
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    It doesn't answer my question.

    The vanishing you are experience is because you are trying to assign three variables to each other. But it have a different syntax.
    Code:
    picBGK1.Width = UserControl.Width = CurrentY
    
      ' The following is can be translated to this
    
      If UserControl.Width = CurrentY Then
        picBGK1.Width = True   ' True = -1 in numeric representation
      Else
        picBGK1.Width = False  ' False = 0 in numeric representation
      End if
    Just try the above that i recommended. Don't forget to compile the usercontrol as an ActiveX control, then you can place it to a Form to test its behaivor. But you can also test it by simply create a new project (standard exe) then click on the Add Project menu item in the file menu, there you can add the ActiveX control. It will result that you will get a VBG (visual basic group) instead of VBP (visual basic project). The compiler will compile both projects then lets them to play together.

  28. #28
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Can someone look at this please???

    I've just put together this thing for you.

    Open the project group with TesterGroup.vbg. Now you will get two projects opened in the same time.

    - The Form1 (that is the actual tester form) in the Tester project, and
    - UserControl1 in the ucProject1 project.

    Click on the Form1, and you will see that if you resize the usercontrol, the controls will follow the size of it.

    You can then go and compile this group project, that will resulting in an OCX, and an Executable.
    Attached Files Attached Files

  29. #29

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: [RESOLVED] Can someone look at this please???

    I need the scrollbars to look like these, that have been placed in this post. Can you please help me. I am having problems trying to change your files, that you had posted on the Internet for me to look at.
    Last edited by ThEiMp; Mar 25th, 2010 at 01:11 PM.
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  30. #30
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: [RESOLVED] Can someone look at this please???

    What problems do you have?

  31. #31

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: [RESOLVED] Can someone look at this please???

    Trying to build my scrollbars into your project, that you had made. They make all of the other controls, currupted in deed.
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  32. #32

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: [RESOLVED] Can someone look at this please???

    Here is the project, that I have modified for my work.
    Last edited by ThEiMp; Mar 25th, 2010 at 01:11 PM.
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  33. #33
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: [RESOLVED] Can someone look at this please???

    Of course they are aligned somewhat randomly because you are confused the controls.

    Code:
        sVal = .ScaleHeight - Picture2.Height: Picture2.Height = IIf(sVal > 1, sVal, 1)
    This will set the Picture2's height property by substracting the actual height of Picture2 from the scaleheight property of the usercontrol. This is completely wrong, didn't you noticed?

    And again,
    sVal = .ScaleWidth - Picture2.Width: Picture2.Width = IIf(sVal > 1, sVal, 1)

    then, you just aligned the drawing surface (the picture1) to the picture3.
    sVal = .ScaleWidth - Picture3.Width: Picture1.Width = IIf(sVal > 1, sVal, 1)
    sVal = .ScaleHeight - Picture3.Height: Picture1.Height = IIf(sVal > 1, sVal, 1)

    Nah, this is completely wrong.
    Lets start over again.

    Picture2 -> Vertical Scrollbar
    Picture3 -> Horizontal Scrollbar

    The Picture2, (that is would be the Vertical Scrollbar this time) should be aligned to the Picture3's top position. But, because we dont know the actual top position yet, we have to use the Picture3's Height property by substracting it from the UserControl's Height property. Is it clear?

    Code:
        sVal = .ScaleHeight - Picture3.Height: Picture2.Height = IIf(sVal > 1, sVal, 1)

    Next. Here you just set the Picture2 (the Vscroll bar)'s width property. But why?! You have to set the Picture3's (Hscrollbar) height property to fit the usercontrol's width, isn't it?
    Code:
        sVal = .ScaleWidth - Picture2.Width: Picture3.Width = IIf(sVal > 1, sVal, 1)

    Next. The first line is ok, because you are going to resize the Picture1's width to the actual Horisontal scrollbar. But then, you just simply set the Picture1's height to let be equal with the Horisontal scrollbar's height property. Didn't you noticed it?!

    You have to align it to the vertical scrollbar, that is Picture2, to make them equally tall.
    Code:
        sVal = .ScaleWidth - Picture3.Width: Picture1.Width = IIf(sVal > 1, sVal, 1)
        sVal = .ScaleHeight - Picture2.Height: Picture1.Height = IIf(sVal > 1, sVal, 1)
    Now its done. But what is the thing regarding these Commandbuttons? You have to align them one by one to the scrollbars. But the thing is you have to resize these scrollbars also, to not to go beneath the command buttons. So you have to extend the calculations by including these stuff. It ain't that hard to do, so don't worry. Just pick a paper and pen, and start drawing these object. You will find out how to do it.

    Good luck!

    ps: I don't see the reason to do it for you, it seems like you have a hard time to understand the simple logistic behind these basic things. I'll let you to do it alone, but if you're stuck, feel free to ask.
    Last edited by Jim Davis; Oct 25th, 2009 at 05:05 AM.

  34. #34

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: [RESOLVED] Can someone look at this please???

    Also the usercontrol, that is found on Form1, is coming together quite nicely, in deed. But those pictureboxes 2 & 3, aren't in the right position.
    Last edited by ThEiMp; Mar 25th, 2010 at 01:11 PM.
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  35. #35

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: [RESOLVED] Can someone look at this please???

    I nearly have it!!

    How am I able to work with the size of Picture2.Height and Picture3.Width???
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  36. #36

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,522

    Re: [RESOLVED] Can someone look at this please???

    I am posting my work so far, so you could check it for me...
    Last edited by ThEiMp; Mar 25th, 2010 at 01:11 PM.
    I have a huge free products range, of computer software in which you can download using any kind of 32-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Ambra Pasta | Fish Feast Company | Wallet Wizard | Ambrose Liquior | Ambar Tavern |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width