Ok i done the code and layout etc etc. now i jsut want it to work as a program. the file is saved as .resx but how do i make it into an .exe ?? +rep to the one who helps me
Ok i done the code and layout etc etc. now i jsut want it to work as a program. the file is saved as .resx but how do i make it into an .exe ?? +rep to the one who helps me
----------------------------------------------------------------
Just click build or hit F7
If you need me you have my skype, if you don't have my skype then you don't need me.
lol so simple o.o well thx anyways xD well u got much rep and u dont really need but i giv u anyways ^^
EEHDIT: Cant giv rep within 24 hours .....
EDIT 2 : cant get it to work :S if anyone can help me. getting errors i use the guide http://www.mmowned.com/forums/vb/215580-guide-file-downloader.html
errors are :
Code:Error 1 'Imports' statements must precede any declarations. C:\Documents and Settings\Dan\Skrivbord\Downloader.vb 2 5 WindowsApplication1 Error 2 Type 'WebClient' is not defined. C:\Documents and Settings\Dan\Skrivbord\Downloader.vb 5 27 WindowsApplication1
heres my code:
i know something isnt right with the fields where i enter stuff but dunno what :PCode:Public Class Form1 Imports System.Net Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged Dim client As New WebClient client.DownloadFile(TextBox1.Text, "C:\" & TextBox2.Text & TextBox3.Text) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Close() End Sub End Class
Last edited by Mitron; 04-18-2009 at 05:48 PM.
----------------------------------------------------------------
Ok. I not too sure what you want. But your first question about how to turn it into exe.
Heres how i compile my VB Files into .exe files or Installation wizards.
Open your VB Project
Then if you the Projects main file it should come up with a load of options like Application, Compile, Debug, Referances, Resources A few more and Publish. I goto publish select where i want the files to be published to e.g c:\myfirstproject\
And hit Publish. Wa la it should publish it into a .exe file then you can go to the .exe file open it and it will install the program onto your computer. This works for other computers aswell.
You can also get it up by finding the Build button.
Your code. Whats it for? The guide you use - the link is broken. Also i think your code is way too small. Also it looks like you have not added 1 to your webclient name unless you have changed it. The default name would be webclient1
Last edited by Lantea; 04-18-2009 at 06:04 PM.
Sigh, you don't import external classes and modules in a class.
Imports System.Net
Public Class Form1
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim client As New WebClient
client.DownloadFile(TextBox1.Text, "C:\" & TextBox2.Text & TextBox3.Text)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
End Class
Then just click build... it compiles the source into an exe.
thanks alot. one problem i cant download it the file when i try to download.
----------------------------------------------------------------
Make sure the file exists, the names are correct. The file isnt corrupt. Are you adding the file format on after the name ? Like file.exe not just file
hmm well that was for testing. i am creating a launcher now. will maybe ask for help with it but dunno
i knew it would be wrong.... well whats wrong here
Its from this post: http://www.mmowned.com/forums/vb/123160-guide-visual-basic-2008-how-make-custom-launcher-2.html
EDIT: page broken but dunno why :S but if u copy paste into adress bar it works
btw Clain if u see dont flame about Class thing cuz i didnt get what u mentCode:Public Class Launcher Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim installpath As String = String.Empty installpath = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINESOFTWAREblizzard entertainmentworld of warcraft", "installpath", Nothing) Dim fs As New FileStream(installpath & "realmlist.wtf", FileMode.Create, FileAccess.Write) Dim s As New StreamWriter(fs) s.WriteLine("set realmlist eu.logon.worldofwarcraft.com") s.WriteLine("set patchlist eu.version.worldofwarcraft.com") s.Close() If MsgBox("Realmlist was set succesfully") Then Else MsgBox("error in setting realmlist") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim installpath As String = String.Empty installpath = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINESOFTWAREblizzard entertainmentworld of warcraft", "installpath", Nothing) Dim fs As New FileStream(installpath & "realmlist.wtf", FileMode.Create, FileAccess.Write) Dim s As New StreamWriter(fs) s.WriteLine("set realmlist Us.Logon.Worldofwarcraft.Com") s.WriteLine("set patchlist Us.Version.Worldofwarcraft.Com(") s.Close() If MsgBox("Realmlist was set succesfully") Then Else MsgBox("error in setting realmlist") End If End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click Form1.Close() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim ss As String = startgame("HKEY_LOCAL_MACHINESOFTWAREblizzard entertainmentworld of warcraft", "installpath", "WoW.exe") If ss <> String.Empty Then My.Settings.wow = ss My.Settings.Save() End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim installpath As String = String.Empty installpath = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINESOFTWAREblizzard entertainmentworld of warcraft", "installpath", Nothing) Dim fs As New FileStream(installpath & "realmlist.wtf", FileMode.Create, FileAccess.Write) Dim s As New StreamWriter(fs) s.WriteLine("set realmlist " + TextBox1.Text) s.Close() If MsgBox("Realmlist was set succesfully") Then Else MsgBox("error in setting realmlist") ' End If End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Dim installpath As String = String.Empty installpath = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINESOFTWAREblizzard entertainmentworld of warcraft", "installpath", Nothing) If Directory.Exists(installpath & "/cache") Then Directory.Delete(installpath & "/cache", True) MsgBox("Cache deleted successfully") Else MsgBox("There is no cache") End If End Sub End Class
Last edited by Mitron; 04-18-2009 at 07:45 PM.
----------------------------------------------------------------
ok i made a web browser now but 1 prob. it seems to bug very much for friends :S and btw how do i make it as an normal installer ?? like when u install firefox etc etc.
----------------------------------------------------------------
u press the button: make public or something then u will get a installing file
Lines of Coding: |||||||||| Goal 1000
Current: 677 Achived Goals: 500 Lines
dont need to press make public thing jsut click build and u will find it in your VB folder
something like C:\Documents and Settings\Dan\Mina dokument\Visual Studio 2008\Projects
then go into you project and click the folders with the name for example Browser and go to bin folder and last Release folder. there you will find 1 .exe file. thats your created program
----------------------------------------------------------------
Ok, please, what is the set realmlist for this private server? I'm going to leave if I don't find it out.
hmmm what do you mean ?? :P
----------------------------------------------------------------
kelson, MMOwned is not a private server.
mitron, you only need an installer if you need to create registry keys when you install the program, or if there's more than one file to be installed in the location. Otherwise, the .exe alone is fine. As to code,
should beCode:s.WriteLine("set patchlist Us.Version.Worldofwarcraft.Com(")
Code:s.WriteLine("set patchlist Us.Version.Worldofwarcraft.Com")
thanks +rep
----------------------------------------------------------------