|
-
Aug 5th, 2006, 10:13 AM
#1
Thread Starter
PowerPoster
[RESOLVED] Setting a "load"ed object within a frame
How do I? I have many frames on a form that I am using as windows like in Windows and I want to also load a title bar, drag bar and such within each frame as I load a new frame. So, if the name of the frame was fraWindow(10) and I then loaded lblTitle(10) and wanted to put it within the frame so that if the frame is moved the label moves with it, what do I do?
I currently have a simple working interface with draggable "windows" on it and I am now working on trying to get the windows dynamically loaded on startup rather than having to be set up at design time :-)
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
Aug 5th, 2006, 10:23 AM
#2
Re: Setting a "load"ed object within a frame
you need to set the container property of each control to indicate which frame it belongs to
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 5th, 2006, 10:26 AM
#3
Thread Starter
PowerPoster
Re: Setting a "load"ed object within a frame
 Originally Posted by westconn1
you need to set the container property of each control to indicate which frame it belongs to
I tried that...The line I use is
VB Code:
lblTitle(4).Container = fraWindow(4)
However, it loads into frame 0 with or without that line. Here's the full code for the form loading section I have written
VB Code:
Load fraWindow(4)
fraWindow(4).Top = 500
fraWindow(4).Left = 500
fraWindow(4).Visible = True
Load lblTitle(4)
lblTitle(4).Visible = True
lblTitle(4).Container = fraWindow(4)
lblTitle(4).BackColor = vbGreen
lblTitle(4).Width = 1000
lblTitle(4).Top = 200
lblTitle(4).Caption = "testing"
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
Aug 5th, 2006, 10:39 AM
#4
Thread Starter
PowerPoster
Re: Setting a "load"ed object within a frame
Additionally...I've noticed that even if I *don't* set a container using that line by commenting out the container line, it STILL links to frame 0...it must be an array thing
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
-
Aug 5th, 2006, 10:48 AM
#5
Re: Setting a "load"ed object within a frame
You need to use Set
Set lblTitle(4).Container = fraWindow(4)
-
Aug 5th, 2006, 10:50 AM
#6
Thread Starter
PowerPoster
Re: Setting a "load"ed object within a frame
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
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
|