Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Yes!!! Custom controls on the fly in VB!!!
|
Yes!!! Custom controls on the fly in VB!!!
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
| Date
| Fri 30 Aug 2002 06:25 AM (UTC) Amended on Fri 30 Aug 2002 06:27 AM (UTC) by Shadowfyr
|
| Message
| I figured it out:
Private Sub Form_Load()
Dim Test As CheckBox
Set Test = Form1.Controls.Add("VB.CheckBox", "cb1")
Test.Visible = True
Form1.Refresh
End Sub
Now, if I can figure out a way to do it with ActiveX controls I may be able to make a COM program that mushclient can call, which can display the same controls as a web page. But even if not... then I can still supply means to display pictures, text and other stuff in a seperate window using VB controls (and not have them pre-built into the program).
Dang docs for VB6.0 are a nightmare to navigate or I would have figured this out sooner. lol | | Top |
|
| Posted by
| Mademoiselle
Australia (35 posts) Bio
|
| Date
| Reply #1 on Fri 30 Aug 2002 09:39 AM (UTC) |
| Message
| | I don't know what you're driving at with the "which can display the same controls as a web page" bit, but if you're talking about what I think you're talking about, there is a web browser control sitting right there in a standard vb install. | | Top |
|
| Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
| Date
| Reply #2 on Fri 30 Aug 2002 07:50 PM (UTC) |
| Message
| Sigh... Turns out my solution isn't much of one.. Apparently TextBoxes and RichTextBoxes default to 'multiline = False' and you can't change that at run-time. So, you can create a control without having an existing instance, but you can't modify some aspects of the one you generate. This imho makes no bloody sense. :p Dang MicroSloth...
And yes, Mademoiselle I am aware of that. However the only means that is supplied through web access to display controls is, I believe, using a document class, so instead of creating an instance of the control and then dropping it on a form, you have to use an HTML document to display them. There is supposed to be documentation on how to make your own custom container, but I have yet to find anything less vague than (gee... it exists somewhere, but good luck finding information on how to use it).
I am looking for something closer to the edit controls supplied in the IDE for VB, but where all a mushclient script needs to do is pass the CLSID or name of the object and have my ActiveX program drop it onto its form, resize and display it. I don't think the web controls really allow this, and if they do, they are too heavilly integrated with the HTML document class and IE to be usable. Other options include an edit class like the IDE uses, but it assumes you are designing a control, not trying to actually use it for something.
A case in point with the web controls though is HTMLHelp. The stupid hh.exe program uses those web controls, so about 1% of the pages in the VB6.0 docs cause a connection dialog to pop up, even though HTMLHelp is not 'supposed to?' function as an actually web browser. :p One or two pages in the help of other programs also cause this and loading anything with an HTM or HTML extension (instead of CHM) also forces such a connection. This is a very annoying problem if you are sharing a phone line with something else or you don't want your help documents to link to an online resource.
All in all trying to find a reasonable solution to this situation is getting quite seriously frustrating. | | Top |
|
| Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
| Date
| Reply #3 on Fri 30 Aug 2002 08:04 PM (UTC) |
| Message
| | Hmm. Just occured to me... Since VBScript uses late binding, I wonder if there is a way to create the control in musclients scripting, then 'pass' the reference to that object to a second program... If that worked it could solve a number of problems, but I haven't a clue where to even begin trying such a thing. :p | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
15,563 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top