Question:
Visual basic help?
mac_attack09
2008-05-17 18:51:02 UTC
how do i code a save form for a note pad program i made?. i started with a drop down box with some save location options and a text box to input the the file name, and a button to submit or save. what is the code i would have to put and witch object would i have to but it on? i'm new to visual basic and am in the process of learning

thanx!!
Six answers:
bb
2008-05-17 19:01:06 UTC
I'm pretty sure there is one that comes with the visual basic program... But, it doesn't completely work. So, here is how you're gonna have to do: Create a method for deciding the URL of the file the user is gonna use (Including name). Then, when they press save you have to use something i have forgotten the name of. (You need to include something, it's something like filesystemobject) Then you can create a file of that name, and write to it the data inside the program.
AngryPatriot
2008-05-17 19:12:34 UTC
Look for a VB dialog control (its been years since I coded VB). It already has a filesys object that will pop up a standard windows dialog box that asks where you want to save and what format.



All you need is your text box and a save button that called the dialog control I mentioned. It does all the rest.
robertsimon888
2008-05-18 09:58:35 UTC
try using this:

Add the CommonDialog item from the toolbox. If CommonDialog is not there you may need to go to the components entry on the upper menu (find it) and add some of the components/libraries. As for which ones take a guess.



then try this code.

CommonDialog1.FileName

CommonDialog1.ShowSave

- where FileName is the string variable that will hold the file name you type in.
anonymous
2008-05-17 19:03:45 UTC
You open a file for output, write the text (that the user entered) to the file and close the file.
anonymous
2016-11-12 13:51:40 UTC
in case you're making use of vista and it extremely is in a compressed folder all you're able to desire to do it double click it and it will open, if it grow to be zipped with winRAR then you definately ought to apply winRAR to open it. attempt double clicking the folder, if its winrar then winrar will open if its some thing else then which will open. you're able to desire to extract the information onto laptop or information or whereever you want o placed the information.
Me
2008-05-17 18:53:41 UTC
research


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...