Forum     

Go Back   Digit Technology Discussion Forum > Software > Software Q&A
Register FAQ Calendar Mark Forums Read

Software Q&A Having trouble with software? Find solutions here


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 09-06-2007, 12:24 PM   #1 (permalink)
Right Off the Assembly Line
 
Shayon's Avatar
 
Join Date: Jun 2007
Location: Mumbai, India
Posts: 17
Exclamation Some Visual Basic 6 doubts..


Well.I have a button 'CmdSearch' in a form named 'FrmQuery'. My requirement is that whenever I click on the 'CmdSearch' Button, a new form named 'FrmDisplay' should load and the string "Hello World!" should be written as the caption of the label 'LblTrial', that needs to be dynamically created using code, on 'FrmDisplay'.

Can anybody help me out with the kinda code I'd need to write?
Shayon is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 09-06-2007, 05:19 PM   #2 (permalink)
In The Zone
 
deepak.krishnan's Avatar
 
Join Date: Jan 2005
Location: Palakkad/Bangalore
Posts: 423
Default Re: Some Visual Basic 6 doubts..

First of all keep a label box named lbltrial in frmquery and just delete the caption of the label. Then give this code in the click property of the command button.
Code:
Private Sub cmdsearch_Click()
Dim frmdisplay As New frmquery
frmdisplay.Show
frmdisplay.lbltrial.Caption = "Hello World!"
End Sub
Also if you want to change the caption of the new form that is created during the program run, just give the following code:
Code:
frmdisplay.Caption = "New Caption"
I think this should help you out...
__________________
.dk
deepak.krishnan is offline  
Old 10-06-2007, 12:22 AM   #3 (permalink)
Right Off the Assembly Line
 
Shayon's Avatar
 
Join Date: Jun 2007
Location: Mumbai, India
Posts: 17
Default Re: Some Visual Basic 6 doubts..

Quote:
Originally Posted by deepak.krishnan
First of all keep a label box named lbltrial in frmquery and just delete the caption of the label. Then give this code in the click property of the command button.
Code:
Private Sub cmdsearch_Click()
Dim frmdisplay As New frmquery
frmdisplay.Show
frmdisplay.lbltrial.Caption = "Hello World!"
End Sub
Also if you want to change the caption of the new form that is created during the program run, just give the following code:
Code:
frmdisplay.Caption = "New Caption"
I think this should help you out...
Dude, Wot I specifically wish to do is create the labels at runtime. The label is not supposed to be created before the program is being run!!
Shayon is offline  
Old 10-06-2007, 12:59 AM   #4 (permalink)
Rubik's Uncle!!
 
Charan's Avatar
 
Join Date: Sep 2004
Location: ಬೆಂಗಳೂರು (Bengaluru)
Posts: 3,791
Default Re: Some Visual Basic 6 doubts..

Check if this one helps. Link
__________________
i5 2400 | DH67BL | G.Skill Ripjaw 4 GB | FSP SAGA II 500W | CM 430 Black Elite | MSI R6850 Cyclone PE/OC | XBox 360 Controller | 21.5" Samsung Sync Master 2233 | 4 Mbps @75GB FUP :)
Battlefield 3 Multiplayer Discussion | Battlefield 3 Low Latency Servers List
Charan is offline  
Old 10-06-2007, 09:21 AM   #5 (permalink)
Right Off the Assembly Line
 
Shayon's Avatar
 
Join Date: Jun 2007
Location: Mumbai, India
Posts: 17
Thumbs up Re: Some Visual Basic 6 doubts..

Quote:
Originally Posted by charangk
Check if this one helps. Link
Dude, that's an awesome link! I think I'll be able to figure the rest myself. Am not on my comp right now, so can't try it out. But I think the link can enable me to do things the way I want. Thanks a lot, again!!
Shayon is offline  
Old 10-06-2007, 01:52 PM   #6 (permalink)
Rubik's Uncle!!
 
Charan's Avatar
 
Join Date: Sep 2004
Location: ಬೆಂಗಳೂರು (Bengaluru)
Posts: 3,791
Default Re: Some Visual Basic 6 doubts..

^^ Thanks ,

Happy Coding..
__________________
i5 2400 | DH67BL | G.Skill Ripjaw 4 GB | FSP SAGA II 500W | CM 430 Black Elite | MSI R6850 Cyclone PE/OC | XBox 360 Controller | 21.5" Samsung Sync Master 2233 | 4 Mbps @75GB FUP :)
Battlefield 3 Multiplayer Discussion | Battlefield 3 Low Latency Servers List
Charan is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic help! romeo_8693 QnA (read only) 18 17-02-2007 07:55 PM
Visual Basic 6 doubts deepak.krishnan Software Q&A 4 30-07-2006 03:40 PM
Visual Basic Programming doubts-Help me urgently deepak.krishnan Programming 3 26-10-2005 07:04 PM
Visual Basic 6.0 godsownman QnA (read only) 5 18-04-2005 06:27 AM
All Basic Linux Questions /Faq/Doubts whatever klinux Open Source 7 15-02-2005 11:42 PM

 
Latest Threads
- by chris
- by icebags
- by Tenida
- by Who

Advertisement




All times are GMT +5.5. The time now is 11:49 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2