|
-
Aug 4th, 2000, 01:10 PM
#1
Thread Starter
Lively Member
I know how to associate my program with a file-format in the registry but I don't know how to open the file in VB6. I think I need to use left(string, lenght as long) in the Sub Main but I have no idea how I should do it. Can somebody help me please???!!!
ThAnX
-
Aug 4th, 2000, 01:15 PM
#2
Fanatic Member
I'm not quite getting what you want to do.
Do you want to create a buffer, add text, and then trim it back down?
If that's what you want to do, here's how to do it:
Code:
Dim Buffer As String
Buffer = Space$(256) 'Add 256 spaces
'Modify Buffer the way you want to
Buffer = Trim$(Buffer) 'Remove spaces
Is this what you want?
-
Aug 4th, 2000, 01:35 PM
#3
Thread Starter
Lively Member
OK maybe I wasn't clear enough with my question, I'll try it again.
When you click for example a vb project-file in explorer vb will be loaded and the project file will be opened. Well, that's what I want to do, when someone clicks a file with my extension I want it to be opened with my program. I already know how to add the extension to the registry and send a command to my program but I don't know how to load the clicked file. The only thing that happens is my program that loads and the file I clicked is not opened.
I hope this is a little bit more clear.
-
Aug 4th, 2000, 03:04 PM
#4
transcendental analytic
Use the Command$ function, it will return all command parameters, (separated with space so you could use split function to split them up) therfore when you click command will return the filename(s)
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 4th, 2000, 03:26 PM
#5
Thread Starter
Lively Member
Thanx but I don't realy understand it (I'm just a beginner). Could you please send me a clear example code, please...
-
Aug 4th, 2000, 03:46 PM
#6
transcendental analytic
Here's an example, should enumerate all Filenames in the For Each loop.
Code:
Private Sub Form_Load()
Dim Filenames, Filename
Filenames = Split(Command, " ")
For Each Filename In Filenames
MsgBox Filename
Next Filename
End Sub
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|