[RESOLVED] what i'am doing wrong ????
hi guys,
Here is my problem i have 2 projects the first is called message the second is showmessage
basically the idea is when i type the message in the first project (textbox1.text) and click Ok
then when i open the second project "showmessage" it will show the same message !
I tried this
Added 1 textbox in the first project
dim file1 as string = textbox1.text
fileopen(1, file1, application.staruppath & "\showmessage.exe", openmode.binarry, openaccess.readwrite, openmode.shared)
file1 = space(lof(1))
fileget(1,file1)
fileclose(1)
in the showmessage project
dim file1 as string
fileopen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
file1 = Space(LOF(1))
FileGet(1, file1)
FileClose(1)
msgbox(file1, msgboxstyle.critical, "Title")
sorry if i made some mistakes, cause i writed it...
what i'am doing wrong ?
Re: what i'am doing wrong ????
Do you want App1 runs App2? if so
Try this
Code:
System.Diagnostics.Process.Start("path\to\showmessage.exe")
Re: what i'am doing wrong ????
Hi welcome to the forums. Please can you use a descriptive thread title. This will allow a faster response. Also please post all code inside of highlight or code tags. How complicated do you want this? We can either use a simple setting or maybe even use the SendMessage API.
Re: what i'am doing wrong ????
@4x2, No, I want the text in the app 1 to show like a messagebox in the app2.
example :
Msgbox(Textbox1.text)
sho basically it shows the message that you write in the textbox1.text !
What i want :
App 1 : write something in Textbox1.text and save it as an exe file.
App 2 : When you open app 2 it shows The message that you've writed in the Textbox1 of The App1.
@ident, I can't change the title :(
Re: what i'am doing wrong ????
Why do you want to save the message in exe?
In App1 save the message in a text file, in App2 read that file and show its contents in a message box, something like this
in App1
Code:
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
' you can move the following line to another event, e.g. button click event
IO.File.WriteAllText(My.Application.Info.DirectoryPath & "\message.txt", TextBox1.Text)
End Sub
in App2
Code:
Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown
Dim strMsg As String = My.Application.Info.DirectoryPath & "\message.txt"
MessageBox.Show(strMsg, My.Application.Info.Title, MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
I assume both app exe are in the same folder, if not, replace My.Application.Info.DirectoryPath & "\message.txt" with desired path.
Re: what i'am doing wrong ????
Quote:
Originally Posted by
4x2y
Why do you want to save the message in exe?
Considering he was asking for help making a crypter at the end of last week nothing good.
http://www.vbforums.com/showthread.php?722019-Runpe
Re: what i'am doing wrong ????
Re: what i'am doing wrong ????
that didn't really work, it gives me the path in the msgbox!
Re: what i'am doing wrong ????
Quote:
Originally Posted by
2pac
that didn't really work, it gives me the path in the msgbox!
Please give more details, what isn't work?
Re: what i'am doing wrong ????
to communicate between 2 apps, you'd use the sendmessage api
Re: what i'am doing wrong ????
So i was right, was concerned it was OTT.
Re: what i'am doing wrong ????
Quote:
Originally Posted by
4x2y
Please give more details, what isn't work?
It Gives Me The Message.txt Directory In The messagebox (C:\Users\Name\VB.net\Project\Message.txt), Not The Text That I did Write :'(
Re: what i'am doing wrong ????
2pac can you explain exactly what you are wanting to do? You seem to of posted previously about making Malware. This forum will not help you in any way unless you explain exactly what you are trying to do.
Re: what i'am doing wrong ????
Quote:
Originally Posted by
2pac
It Gives Me The Message.txt Directory In The messagebox (C:\Users\Name\VB.net\Project\Message.txt), Not The Text That I did Write :'(
Ops sorry i missed to open the file :blush:
try this new one
Code:
Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown
Dim strMsg As String = IO.File.ReadAllText(My.Application.Info.DirectoryPath & "\message.txt")
MessageBox.Show(strMsg, My.Application.Info.Title, MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Re: [RESOLVED] what i'am doing wrong ????
thanks guys, especially 4x2y :D