Making a program. Need some help
| Visual Basic Discuss, Making a program. Need some help at Programmers Lounge forum; kaswar: the declares would be more something like this:
Code:
Private Declare Sub ListFileDir Lib "FilePack.dll" (Path As String, FileList ... |
| Notices | Welcome to the Gamerz Needs forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |  | | 
07-09-2008, 08:44 PM
|  | Diamond Hole | | | Last Online: Today 09:10 PM Join Date: Jan 2007 Location: California
Posts: 751
Thanks: 143
Thanked 99 Times in 50 Posts
Nominated 6 Times in 3 Posts TOTW/F/M Award(s): 0
Latest Blog: blahh!!!
Rep Power: 6 Points: 1,515.20 Bank: 94,878.88 Total Points: 96,394.08 | |
kaswar: the declares would be more something like this: Code: Private Declare Sub ListFileDir Lib "FilePack.dll" (Path As String, FileList As Any)
Private Declare Sub CopyPasteFile Lib "FilePack.dll" (ToCopy As String, ToPaste As String)
Private Declare Sub MoveFile Lib "FilePack.dll" (MainFile As String, WhereToGo As String)
Private Declare Function DeleteFolder Lib "FilePack.dll" (DirName As String) As Boolean
in vb, procedures are called Subs. and there are no PChar's, only strings.
dirky00018: try the FindFileFirst and FindFileNext api's. or check here for an example.
| 
07-09-2008, 11:20 PM
|  | Violet Hole | | | Last Online: 11-27-2008 07:43 PM Join Date: Mar 2007
Posts: 353
Thanks: 42
Thanked 18 Times in 12 Posts
Nominated 0 Times in 0 Posts TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 5 Points: 777.80 Bank: 3,786.86 Total Points: 4,564.66 | | Quote:
Originally Posted by kaswar Thats Where my Help comes in. I program in Delphi But If you use my
DLL i just made you can
1.Show all files in a Drive
2. copy files
3. move files
4. delete files
6. delete folder
You have to Declare them but I don't know how, I"LL HAVE TO DIG UP SOME OLD POST
it's easy and It works well.
The functions are
ListFileDir(Path: string; FileList: TStrings); stdcall;
CopyPasteFile(ToCopy: PChar; ToPaste: Pchar); stdcall;
MoveFile(mainfile: Pchar; WhereToGo: Pchar); stdcall;
DeleteFolder(DirName : string): Boolean; stdcall;
And Also for Renaming a File
Just Do Rename(); | i should be placing this in the same folder as my project right? the filepack?.
damn!! i have no idea what im doing now!! xD if theres someone out there who knows this please make me simple code on this one.. LoL
i got this so far(it displays all drives available in the computer): Code: Private Sub cmb_drives_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim dirs() As String = _
System.IO.Directory.GetLogicalDrives()
Dim i As Long
For i = dirs.GetLowerBound(0) To dirs.GetUpperBound(0)
cmb_drives.Items.Add(dirs(i))
Next i
End Sub
its in a ComboBox BTW
Last edited by dirky00018; 07-09-2008 at 11:25 PM..
| 
07-22-2008, 08:43 AM
|  | Registered Users + | | | Last Online: 11-22-2008 02:09 PM Join Date: Nov 2006 Location: Location:
Posts: 2,059
Thanks: 230
Thanked 221 Times in 145 Posts
Nominated 0 Times in 0 Posts TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 11 Points: 1,022.50 Bank: 109,302.85 Total Points: 110,325.35 | | Quote:
Originally Posted by dirky00018 i should be placing this in the same folder as my project right? the filepack?.
damn!! i have no idea what im doing now!! xD if theres someone out there who knows this please make me simple code on this one.. LoL | Damn I feel Sorry for you xD, Migrane from a Programming Project! Man you are committed =p
ok anyway first, Declare the function the way Wasssup wrote it. Add it to your Main project. Add the DLL to your project folder
and when you need things such as you want to move a folder just call it like a normal function!
like MoveFile("C:\PORN.TXT","D:\My Secret Stuff\PORN.TXT")
or
MoveFile(Textbox1.text,Textbox2.text)
These are the examples, Freestyle it =D
__________________ ~I'm out
Last edited by kaswar; 07-22-2008 at 08:48 AM..
| 
07-26-2008, 10:32 AM
|  | Violet Hole | | | Last Online: 11-27-2008 07:43 PM Join Date: Mar 2007
Posts: 353
Thanks: 42
Thanked 18 Times in 12 Posts
Nominated 0 Times in 0 Posts TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 5 Points: 777.80 Bank: 3,786.86 Total Points: 4,564.66 | |
btw.. im done making the program.  its alot easier through VB6!! thanks for your help guys. | 
07-26-2008, 02:33 PM
| | The Legend | | | Last Online: 08-12-2008 04:52 PM Join Date: Jul 2008 Location: Stalkers...
Posts: 94
Thanks: 20
Thanked 61 Times in 19 Posts
Nominated 0 Times in 0 Posts TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 0 Points: 946.80 Bank: 0.00 Total Points: 946.80 | |
Wanna know why people make programs in DLL, because DLL's are much harder for gunbound to detect, it is like someone invisible walking threw a street. -----------------This post was merged together. In future use the edit button.-----------------
Wanna know why people make programs in DLL, because DLL's are much harder for gunbound to detect, it is like someone invisible walking threw a street.
Last edited by GzNPrize; 07-26-2008 at 03:02 PM..
Reason: Automerged Doublepost
|  | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | |