Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack (1) Thread Tools Search this Thread Display Modes
Old 01-02-2007, 10:53 PM   1 links from elsewhere to this Post. Click to view. #1 (permalink)
In The Zone
 
deepak.krishnan's Avatar
 
Join Date: Jan 2005
Location: Palakkad/Bangalore
Posts: 423
Exclamation A small problem while using Common dialog in VB 6


Hello friends
This is the code given in MDI form:
Code:
Private Sub mnuopen_Click()
cd.Filter = "AllFiles|*.txt"
FileName = cd.FileName
cd.ShowOpen
frmmain.Caption = cd.FileName
End Sub
The problem is that when I select a file in the open dialog box and try to open it does not display the file in a textbox given in a child form of the MDI application
__________________
.dk
deepak.krishnan is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 03-02-2007, 07:45 PM   #2 (permalink)
Mad and Furious
 
redhat's Avatar
 
Join Date: May 2006
Location: Visual Basic 6.0
Posts: 453
Cool Re: A small problem while using Common dialog in VB 6

There is no line of code that asks d program 2 display the contents in a text box!!!
__________________
My new Tech Blog : http://technewspaper.blogspot.com/
redhat is offline  
Old 03-02-2007, 08:48 PM   #3 (permalink)
Alpha Geek
 
Join Date: Jan 2007
Location: In your hearts
Posts: 828
Default Re: A small problem while using Common dialog in VB 6

The first problem my friend UFO007 is that u r using Text Box instead u should use Rich Text Box. Go to Components from project menu then find Microsoft Rich Text Box SP4 and check it. Change its name to rtb. To open file type the following statement for button "mnuopen".
Private Sub mnuopen_Click()
cd.DefaultExt = "*.txt"
cd.Filter = "All Files|*.txt"
cd.ShowOpen
rtb.FileName = cd.FileName
frmmain.Caption = cd.FileName
End Sub
Copy and Paste the following code then open any file. Remember here rtb is used for RichTextBox, cd is used for common dialog and you can open only txt,rtf or doc file or html file to view its code (these all are tested by me in my own Notepad). If this problem is not solved then post here and I can give u my NotePad+ which is created by me.
abhijangda is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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


LinkBacks (?)
LinkBack to this Thread: http://www.thinkdigit.com/forum/qna-read-only/48188-small-problem-while-using-common-dialog-vbulletin-6-a.html
Posted By For Type Date
Thread [VB.NET] Open File, Save File, Common Dialog | HTML.it forum | BoardReader This thread Refback 08-01-2011 07:13 PM

 
Latest Threads
- by gforz
- by clmlbx
- by Sujeet

Advertisement




All times are GMT +5.5. The time now is 03:56 PM.


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

Search Engine Optimization by vBSEO 3.3.2