|
-
Nov 18th, 2000, 01:24 PM
#1
Thread Starter
Lively Member
how can i open a file from an app?
I am stupid..but I AM 15 !
*a line from a song i wrote*
""""""""""""""""""""""""""""""""""""""""
so i came to say life bites away
whats done is done the past is gone
i cant believe the sh*t I know
i always wish it would just go
""""""""""""""""""""""""""""""""""""""""
"remember you Ps And Qs Boy !"
-
Nov 18th, 2000, 01:29 PM
#2
Hyperactive Member
A little more detail please. i.e. Open a file for output, input. Open a file that is associated with another app???
-
Nov 18th, 2000, 01:34 PM
#3
Thread Starter
Lively Member
like, say i wanted to open the file " andrew.reg" by clicking on a command button
I am stupid..but I AM 15 !
*a line from a song i wrote*
""""""""""""""""""""""""""""""""""""""""
so i came to say life bites away
whats done is done the past is gone
i cant believe the sh*t I know
i always wish it would just go
""""""""""""""""""""""""""""""""""""""""
"remember you Ps And Qs Boy !"
-
Nov 18th, 2000, 01:36 PM
#4
Member
Use the ShellExecute Function
---~^ Absalom ^~---
There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.
-
Nov 18th, 2000, 01:38 PM
#5
Member
The Code
is
put this in a module
Code:
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Const SW_SHOWNORMAL = 1
and put this in
your command buttons click function
Code:
Call ShellExecute(hwnd, "Open", "c:\andrew.reg", "", "", 1)
---~^ Absalom ^~---
There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.
-
Nov 18th, 2000, 01:39 PM
#6
Hyperactive Member
.reg
be carefull with that file. ShellExecute can open a file with it's associated proggy. In the case of .reg, you might just go and change some reg keys.
td.
"One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig
[email protected]
"but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.
-
Nov 18th, 2000, 01:42 PM
#7
Thread Starter
Lively Member
cool thanx guys, i got another one thoug, how can i embed a file " andrew.reg" into the program so that it can be ruin on other computers without having to put the specific file in the specific directory?
I am stupid..but I AM 15 !
*a line from a song i wrote*
""""""""""""""""""""""""""""""""""""""""
so i came to say life bites away
whats done is done the past is gone
i cant believe the sh*t I know
i always wish it would just go
""""""""""""""""""""""""""""""""""""""""
"remember you Ps And Qs Boy !"
-
Nov 18th, 2000, 01:45 PM
#8
Member
How did you embed the file into your proggy
I want to do that in one of my progz
if you find the way to do it that is
---~^ Absalom ^~---
There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.
-
Nov 18th, 2000, 01:45 PM
#9
Hyperactive Member
Does the file contain reg entries?
if so, why not just have the entries in your proggy, and alter the reg from code.
td.
"One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig
[email protected]
"but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.
-
Nov 18th, 2000, 01:49 PM
#10
Thread Starter
Lively Member
I am stupid..but I AM 15 !
*a line from a song i wrote*
""""""""""""""""""""""""""""""""""""""""
so i came to say life bites away
whats done is done the past is gone
i cant believe the sh*t I know
i always wish it would just go
""""""""""""""""""""""""""""""""""""""""
"remember you Ps And Qs Boy !"
-
Nov 18th, 2000, 01:56 PM
#11
Hyperactive Member
Depends on what you're trying to set/alter.
VB has some simplistic built in stuff (GetSetting,SaveSetting etc) but you are limited to what/where you can alter - hkey_current_user\software\vb and vba program settings\
If you want to be able to have full control then you have to use some api calls. Look at api calls like RegCreateKey, RegOpenKey etc. Have a search on the API Forum, there's tons of stuff.
td.
"One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig
[email protected]
"but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.
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
|