User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 456,234 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,754 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 1046 | Replies: 6
Reply
Join Date: Nov 2007
Posts: 1
Reputation: AjayKN is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
AjayKN AjayKN is offline Offline
Newbie Poster

Question What is Form in VB6

  #1  
Nov 13th, 2007
Dear Friends
i want to know in VB6 what is forms is that classes or objects, since we can have

dim a as new form1
a.show()

or

form1.show()

and also please extend same for other controls
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Posts: 24
Reputation: dilip_singh3 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dilip_singh3 dilip_singh3 is offline Offline
Newbie Poster

Re: What is Form in VB6

  #2  
Nov 13th, 2007
form is an object. To study more about it, plz refer VB book of Wrox & Orelly Publication.
Reply With Quote  
Join Date: May 2007
Location: India
Posts: 501
Reputation: choudhuryshouvi is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 48
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro

Re: What is Form in VB6

  #3  
Nov 13th, 2007
In vb6 the form is treated like an object. But if you use the .net platform of vb then this becomes a standalone class. when we refer dim a as new form1, means we actually create a new object of the class form1 and simultaneously allocating memory to it. if wish to know more just visit http://msdn2.microsoft.com and search form windows forms in visual basic. you will find enourmous totorials,resources and articles there.

Always remember that the best alternative is to learn anything from the organization who has developed it.
Last edited by choudhuryshouvi : Nov 13th, 2007 at 12:39 pm.
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Reply With Quote  
Join Date: Nov 2007
Posts: 1
Reputation: satishkumarsaho is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
satishkumarsaho satishkumarsaho is offline Offline
Newbie Poster

Solution Re: What is Form in VB6

  #4  
Nov 13th, 2007
Hi!!!!
You want to know what is a form right????
A form is basically a container control,
container control means an object which can hold
one or more controls like buttons
check boxeses etc...
some thing you may need..............

private sub form_load()
'statements
end sub

the above sub procedure is automatically called when form is loaded.
form is loaded means it now exists in memory
it has no relation with its visibility

<formname>.show 'displays the form(even the form is not loaded)
<formname>.hide 'hides the form(even the form is not loaded)

unload <formname> unloads the form from memory.............

I think you don't feel it boring..........
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,444
Reputation: debasisdas is on a distinguished road 
Rep Power: 4
Solved Threads: 87
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: What is Form in VB6

  #5  
Nov 14th, 2007
Don't compare vb 6.0 with its successors .
Share your Knowledge.
Reply With Quote  
Join Date: Nov 2007
Posts: 8
Reputation: BC_Programming is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
BC_Programming BC_Programming is offline Offline
Newbie Poster

Re: What is Form in VB6

  #6  
Dec 19th, 2007
VB6 was apparently the last of the Visual Basic Line. Now we're supposed to go to some token language where all the stuff that they did put in that are anything like VB6 is "deprecated". Like I imagine we aren't supposed to use the Sqr() function, we're supposed to use the System.Math.NumberMath.NumericOperations.SquareRoot() Function, which just so happens to take a special class type as it's argument, SquareRootArgument...

But, hey, it's faster.

(PS: I KNOW those aren't accurate depictions of the framework classes)
Reply With Quote  
Join Date: Nov 2007
Posts: 115
Reputation: hkdani is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 13
hkdani's Avatar
hkdani hkdani is offline Offline
Junior Poster

Re: What is Form in VB6

  #7  
Dec 21st, 2007
i want to know in VB6 what is forms is that classes or objects

Yes, a very good question. In short, a form is an object. According to Microsoft an object is encapsulated. That means it contains its own code and its own data. You don't have to program how to save its data. It's done for you. You set a property for a length, it saves the data for the length. Just fill in the properties box. In VB6 an object has properties, methods, and events.

Another interesting point is that you can use VB6 class modules to make your own objects. That is, with a class you can create your own class module with its own properties, methods, and events. And it can be instantiated or declared just like a regular form. In other words, your class module behaves like an object; because, in essence it fits the definition of an encapsulation: it contains its own code and data.

Option Explicit
Private MyScanner as cmScanner
Private MyCustomForm as CustomForm


Private Sub Form_Load()
' Instantiate the class just as you would a form
set MyScanner = New cmScanner
Set MyCustomForm = New CustomForm

End Sub
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 5:09 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC