-
Nov 6th, 2010, 11:03 PM
#1
Thread Starter
Member
-
Nov 7th, 2010, 12:14 AM
#2
Re: Show Text Name to textbox
vb Code:
f = freefile open "abc.txt" for input as f ' use full path textbox1.text = input(lof(f), #f) close f
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Nov 7th, 2010, 01:13 AM
#3
Thread Starter
Member
Re: Show Text Name to textbox
thanks but....
i want to make like this :
not the contents :
help...
please...
-
Nov 7th, 2010, 02:29 AM
#4
Re: Show Text Name to textbox
Text1.Text = "abc.txt" ?!
But it depends how do you choose a particular file that you want displayed. Do you show a Common Dialog so you can browse to the file? Or do you add a FileListBox/DirListBox controls to the form to do it? Or use Dir() function to list files in a particular folder... and so on. You have to explain what exactly you want to achieve before anyone can give you more info.
-
Nov 7th, 2010, 02:34 AM
#5
Thread Starter
Member
Re: Show Text Name to textbox
ya......
i want to show abc.txt to textbox ...
so......., if i load the inside of abc.txt to textbox1
then the textbox2 show the file name directly
-
Nov 7th, 2010, 06:41 AM
#6
Re: Show Text Name to textbox
Originally Posted by RizChan
ya......
i want to show abc.txt to textbox ...
so......., if i load the inside of abc.txt to textbox1
then the textbox2 show the file name directly
Or, the opposite ?
You enter the filename in textbox1 and then textbox2 will display its contents...
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Nov 7th, 2010, 10:33 AM
#7
Re: Show Text Name to textbox
Again, all you mentioned is quite easy to achieve, but depends on how the "abc.txt" file is selected. How do you decide which file name and contents you want to display of all the files on your computer?
-
Nov 7th, 2010, 12:21 PM
#8
Re: Show Text Name to textbox
You mean like this?
Text1.Text = Dir("Test1\*.txt")
-
Nov 8th, 2010, 01:37 AM
#9
Thread Starter
Member
Re: Show Text Name to textbox
Originally Posted by baja_yu
Again, all you mentioned is quite easy to achieve, but depends on how the "abc.txt" file is selected. How do you decide which file name and contents you want to display of all the files on your computer?
Originally Posted by Ellis Dee
You mean like this?
Text1.Text = Dir("Test1\*.txt")
thanks....
but if i've 2 file ABC.txt and DEF.txt, it won't work. the code just can use to show ABC.txt not DEF.txt
-
Nov 8th, 2010, 01:42 AM
#10
Re: Show Text Name to textbox
Means, you want to list the contents of file and the filename, for all files in a folder, one by one ?
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Nov 8th, 2010, 01:59 AM
#11
PowerPoster
Re: Show Text Name to textbox
-- Can you please ellaberate on what you want us to show you???
Code:
Text1.Text = Picture1.Name & ".txt"
I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
|Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...
-
Nov 8th, 2010, 02:01 AM
#12
Thread Starter
Member
Re: Show Text Name to textbox
Originally Posted by akhileshbc
Means, you want to list the contents of file and the filename, for all files in a folder, one by one ?
yaa....
but...
example :
if i click on command5 then show file DEF.txt and the contents to textbox
and if i click on (Ex: Command6) then show file name (ABC.txt) to textbox2 and the contents to textbox1
-
Nov 8th, 2010, 02:03 AM
#13
PowerPoster
Re: Show Text Name to textbox
Code:
Command1_Click()
Open "Text1.txt" For Input As #1
Input #1, Text1.Text
Close #1
End Sub
I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
|Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...
-
Nov 8th, 2010, 03:15 AM
#14
Re: Show Text Name to textbox
Originally Posted by RizChan
yaa....
but...
example :
if i click on command5 then show file DEF.txt and the contents to textbox
and if i click on (Ex: Command6) then show file name (ABC.txt) to textbox2 and the contents to textbox1
Still it is not clear about how you'll get the filenames ! I mean, whether the filenames are hardcoded or found from a folder or from a filelistbox, etc..!
Originally Posted by RizChan
if i click on (Ex: Command6) then show file name (ABC.txt) to textbox2 and the contents to textbox1
The code for doing this is already posted by westconn1 in post#2
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Nov 8th, 2010, 10:46 PM
#15
Thread Starter
Member
Re: Show Text Name to textbox
Originally Posted by akhileshbc
Still it is not clear about how you'll get the filenames ! I mean, whether the filenames are hardcoded or found from a folder or from a filelistbox, etc..!
this is :
SHOW Code:
"" + App.Path + "\Test1\abc.txt"
-
Nov 8th, 2010, 10:52 PM
#16
Re: Show Text Name to textbox
Instead of + use & for string concatenation. You also don't need the first "" +... there's no point.
So, I don't see what's the problem?! Just do
Text1.Text = App.Path & "\Test1\abc.txt"
-
Nov 8th, 2010, 11:23 PM
#17
Thread Starter
Member
Re: Show Text Name to textbox
-
Nov 8th, 2010, 11:29 PM
#18
PowerPoster
Re: Show Text Name to textbox
-- I never knew that you could use the + for inconjunction of the & characters!!
I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
|Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...
-
Nov 9th, 2010, 12:03 AM
#19
Re: Show Text Name to textbox
Originally Posted by ThEiMp
-- I never knew that you could use the + for inconjunction of the & characters!!
That's a good thing. It means you've never made the error that most nubes did.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing??
-
Nov 9th, 2010, 12:07 AM
#20
PowerPoster
Re: Show Text Name to textbox
--Why thankyou, CDRIVE...
I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
|Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|