|
-
May 20th, 2013, 01:07 PM
#1
Thread Starter
Member
[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 ?
-
May 20th, 2013, 01:36 PM
#2
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")
-
May 20th, 2013, 01:36 PM
#3
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.
-
May 20th, 2013, 01:46 PM
#4
Thread Starter
Member
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
-
May 20th, 2013, 02:44 PM
#5
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.
-
May 20th, 2013, 02:49 PM
#6
Re: what i'am doing wrong ????
 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
This pattern in common to all great programmers I know: they're not experts in something as much as experts in becoming experts in something.
The best programming advice I ever got was to spend my entire career becoming educable. And I suggest you do the same.
-
May 20th, 2013, 03:10 PM
#7
Re: what i'am doing wrong ????
-
May 20th, 2013, 03:52 PM
#8
Thread Starter
Member
Re: what i'am doing wrong ????
that didn't really work, it gives me the path in the msgbox!
-
May 20th, 2013, 04:18 PM
#9
Re: what i'am doing wrong ????
 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?
-
May 20th, 2013, 04:20 PM
#10
Re: what i'am doing wrong ????
to communicate between 2 apps, you'd use the sendmessage api
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
May 20th, 2013, 04:22 PM
#11
Re: what i'am doing wrong ????
So i was right, was concerned it was OTT.
-
May 20th, 2013, 04:28 PM
#12
Thread Starter
Member
Re: what i'am doing wrong ????
 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 :'(
-
May 20th, 2013, 04:31 PM
#13
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.
-
May 20th, 2013, 04:33 PM
#14
Re: what i'am doing wrong ????
 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
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
-
May 21st, 2013, 07:35 AM
#15
Thread Starter
Member
Re: [RESOLVED] what i'am doing wrong ????
thanks guys, especially 4x2y
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
|