Results 1 to 15 of 15

Thread: [RESOLVED] what i'am doing wrong ????

  1. #1

    Thread Starter
    Member
    Join Date
    May 2013
    Posts
    63

    Resolved [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 ?

  2. #2
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    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")



  3. #3
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,401

    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.

  4. #4

    Thread Starter
    Member
    Join Date
    May 2013
    Posts
    63

    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

  5. #5
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    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.



  6. #6
    Frenzied Member MattP's Avatar
    Join Date
    Dec 2008
    Location
    WY
    Posts
    1,227

    Re: what i'am doing wrong ????

    Quote Originally Posted by 4x2y View Post
    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.

  7. #7
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,401

    Re: what i'am doing wrong ????

    Haxor spotted

  8. #8

    Thread Starter
    Member
    Join Date
    May 2013
    Posts
    63

    Re: what i'am doing wrong ????

    that didn't really work, it gives me the path in the msgbox!

  9. #9
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    Re: what i'am doing wrong ????

    Quote Originally Posted by 2pac View Post
    that didn't really work, it gives me the path in the msgbox!
    Please give more details, what isn't work?



  10. #10
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,415

    Re: what i'am doing wrong ????

    to communicate between 2 apps, you'd use the sendmessage api

  11. #11
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,401

    Re: what i'am doing wrong ????

    So i was right, was concerned it was OTT.

  12. #12

    Thread Starter
    Member
    Join Date
    May 2013
    Posts
    63

    Re: what i'am doing wrong ????

    Quote Originally Posted by 4x2y View Post
    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 :'(

  13. #13
    Bad man! ident's Avatar
    Join Date
    Mar 2009
    Location
    Cambridge
    Posts
    5,401

    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.

  14. #14
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    Re: what i'am doing wrong ????

    Quote Originally Posted by 2pac View Post
    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



  15. #15

    Thread Starter
    Member
    Join Date
    May 2013
    Posts
    63

    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
  •  



Click Here to Expand Forum to Full Width