YouNameIt.DLL
If you have completed an application and wish to share the complete source/project files with everyone then please post it in here. Source-code files only, no tutorials.
9 posts
Page 1 of 1
...YourSocksRoxx asked for this how-to make a YouNameIt.DLL
1. Start new Project
1.1 Name the project as a YouNameIt.DLL
1.2 Change the Class name to classYouNameIt.VB
This is just an example code piece to save a file
2. Add this code to your classYouNameIt
3.1 Build your project
4. Start new project (Windows Forms)
4.1 Add reference -> YouNameIt.DLL (\Projects\YouNameIt\YouNameIt\Bin\Build\YouNameIt.DLL)
4.2 Add this code UNDER public class Form1
6. Add this code to the button
8. Report any problems :P I didnt try this code
1. Start new Project
1.1 Name the project as a YouNameIt.DLL
1.2 Change the Class name to classYouNameIt.VB
This is just an example code piece to save a file
2. Add this code to your classYouNameIt
Code: Select all
3.0 Save your project as YouNameItPrivate Shared Sub SaveFile(ByVal strPath as String, byval strContent as String)
Dim Writer as new system.io.streamwriter(strPath)
Writer.write(Content)
Writer.close
end sub
3.1 Build your project
4. Start new project (Windows Forms)
4.1 Add reference -> YouNameIt.DLL (\Projects\YouNameIt\YouNameIt\Bin\Build\YouNameIt.DLL)
4.2 Add this code UNDER public class Form1
Code: Select all
5. Add a button and double click it
' This is big help, so you dont have to do the YouNameIt.ClassYouNameIt everytime u wanna do somekind of sub inside it
Dim MY_VERY_OWN_DLL as new YouNameIT.classYouNameIt
6. Add this code to the button
Code: Select all
7. Debug and try outMY_VERY_OWN_DLL.SaveFile("PATH..For an example 'c:\blah.txt'", "Hello World (axel?)")
8. Report any problems :P I didnt try this code
im gonna try this code tommorow
is this the kind of "Import thing.thing " thing xd so when i do "Import YoursocksRox.project"
then i could call my own functions like Msg("hehe", Stylecol.lol" and such ? :P

then i could call my own functions like Msg("hehe", Stylecol.lol" and such ? :P
You would be better off making the dll function public if you plan on accessing it from a different class.
mandai wrote:You would be better off making the dll function public if you plan on accessing it from a different class.Doesnt matter.. works anyways
I changed a few things as madai said and BAM my first dll that worked :P Thanks for this
9 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023