PDA

View Full Version : Visual Basic 6 Questions


websurfer
10-11-2003, 04:44 PM
Ok, I want to make an app that will generate a CSS for Invisionfree.

How can I make a button that will save the contents of a label to a text file? Either that, or copy it to the clipboard.
And is it possible to make a label pop-up in a new window (full screen) with that button to save/copy it?

Anotehr question, I set up a list thing, now I want it when they click a list item, a frame will appear, such as they click body, and the frame called Body will appear and replace the frame that was there already. Say, Links frame was open, and I want the Body frame to take it's place when body is clicked in the list. Is this possible, where each frame has it's own buttons, inputs, variables, and commands?


Sorry for all the questions, I'm not really comfortable with VB yet :(

Bobcat
12-07-2003, 10:57 PM
Hmmm. Not exactly sure of what your asking, bt if you're asking about how to open a file and save something, it's like this:
Open "filename.bla" For Output As #1
'#1 can be #2, #3, etc.
Print #1, "data to print"
Close #1
ok, that's the end of that. But if you wanted to print something to a file from a label, let's say lblData was the label containing the data. We'd do the normal open procedure, and then:
Print #1, lblData.Caption
and then close the file.
But to set the clipboard, you do this.
'To cleare the clipboard, do this:
Clipboard.Clear
'To set text in to the clipboard, let's say we still had lblData as
'our label, and the data was in the .caption property. We'd do:
Clipboard.SetText lblData.Caption
There! I hope I was helpful to you, and if not, please tell me how I could be more helpful.
Good luck to all you fellow coders, and have a good day!