Welcome to Dream.In.Code
Become a VB Expert!

Join 137,233 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,742 people online right now. Registration is fast and FREE... Join Now!




Creating a form during runtime.

 
Reply to this topicStart new topic

Creating a form during runtime., Can you create a form, and controll it during run time?

Episonage
11 Feb, 2007 - 07:44 AM
Post #1

New D.I.C Head
Group Icon

Joined: 10 Feb, 2007
Posts: 22


Dream Kudos: 25
My Contributions
Well, I actually have 3 questions, so I hope you don't mind me puting more then one in this thread...
INPORTANT : All that I ask you reffers to vb6 code, not .NET
1. I saw somebody asking is it possible to make a new picturebox during runtime, and I understud the answer. Then I saw somebody say "anything you do in design, you can do in runtime". Ok, so here's my question : Can I make a form in runtime (maybe a bunch of forms) and controll it, put objects in it, and such? Is it the same thing like with the picturebox?

2. Let's say that I want to make a chat application. I use winsock, but I want to connect more then just one user to a server, but do it in such way that every sock is "registered" to one user. Is it also possible to make a controll array of winsocks? If it is, then how do I controll them all?

3. When I make a client and a server program, that connects via winsock, I have a problem. I send some data from server to client (or vice-versa), but the data is changed. Like it's encripted, or something. How do I fix that?

Thanks in advance biggrin.gif
User is offlineProfile CardPM
+Quote Post

gregoryH
RE: Creating A Form During Runtime.
20 Feb, 2007 - 12:59 AM
Post #2

D.I.C Regular
Group Icon

Joined: 4 Oct, 2006
Posts: 417


Dream Kudos: 50
My Contributions
QUOTE(Episonage @ 11 Feb, 2007 - 08:44 AM) *

Well, I actually have 3 questions, so I hope you don't mind me puting more then one in this thread...
INPORTANT : All that I ask you reffers to vb6 code, not .NET
1. I saw somebody asking is it possible to make a new picturebox during runtime, and I understud the answer. Then I saw somebody say "anything you do in design, you can do in runtime". Ok, so here's my question : Can I make a form in runtime (maybe a bunch of forms) and controll it, put objects in it, and such? Is it the same thing like with the picturebox?

2. Let's say that I want to make a chat application. I use winsock, but I want to connect more then just one user to a server, but do it in such way that every sock is "registered" to one user. Is it also possible to make a controll array of winsocks? If it is, then how do I controll them all?

3. When I make a client and a server program, that connects via winsock, I have a problem. I send some data from server to client (or vice-versa), but the data is changed. Like it's encripted, or something. How do I fix that?

Thanks in advance biggrin.gif

hi

1. in VB the form is just an object, as are any other components. You simply need a program block called a "factory" that can generate a range of VB objects on demand and properly link them to the form. Do a little research on OOP in VB in MSDN

2. You seem to have hit the nail on the head. You must either iterate the array of socks, or provide "callback" code to interupt your main thread.

3. The data may be getting altered under ASN.1. The intention is to manage different data (usually numeric) between each type of CPU type (eg Intel to Motorola) or there is a big-endian/little endian confusion. Are your data types identical at both ends?

regards

Greg
User is offlineProfile CardPM
+Quote Post

Episonage
RE: Creating A Form During Runtime.
21 Feb, 2007 - 01:36 AM
Post #3

New D.I.C Head
Group Icon

Joined: 10 Feb, 2007
Posts: 22


Dream Kudos: 25
My Contributions
QUOTE(gregoryH @ 20 Feb, 2007 - 01:59 AM) *

QUOTE(Episonage @ 11 Feb, 2007 - 08:44 AM) *

Well, I actually have 3 questions, so I hope you don't mind me puting more then one in this thread...
INPORTANT : All that I ask you reffers to vb6 code, not .NET
1. I saw somebody asking is it possible to make a new picturebox during runtime, and I understud the answer. Then I saw somebody say "anything you do in design, you can do in runtime". Ok, so here's my question : Can I make a form in runtime (maybe a bunch of forms) and controll it, put objects in it, and such? Is it the same thing like with the picturebox?

2. Let's say that I want to make a chat application. I use winsock, but I want to connect more then just one user to a server, but do it in such way that every sock is "registered" to one user. Is it also possible to make a controll array of winsocks? If it is, then how do I controll them all?

3. When I make a client and a server program, that connects via winsock, I have a problem. I send some data from server to client (or vice-versa), but the data is changed. Like it's encripted, or something. How do I fix that?

Thanks in advance biggrin.gif

hi

1. in VB the form is just an object, as are any other components. You simply need a program block called a "factory" that can generate a range of VB objects on demand and properly link them to the form. Do a little research on OOP in VB in MSDN

2. You seem to have hit the nail on the head. You must either iterate the array of socks, or provide "callback" code to interupt your main thread.

3. The data may be getting altered under ASN.1. The intention is to manage different data (usually numeric) between each type of CPU type (eg Intel to Motorola) or there is a big-endian/little endian confusion. Are your data types identical at both ends?

regards

Greg


Thanks for help biggrin.gif
The data types are indentical, but I still get some weird characters at the end of my string. When shown in a caption, they look like little recktangles...
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/4/08 03:46PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month