944,149 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 922
  • VB.NET RSS
Jul 1st, 2007
0

PLZ let me know how to store a respond of a MSG BOX

Expand Post »
i'm using visual c++ 2005 and in windows forms app how do i store a respond of a MSG box...
the methods given in both MSDN new and the web mSDN doesn't seem to be working.if they worked in ur machine tell me the procedure i have to follow....plz help me
Similar Threads
Reputation Points: 11
Solved Threads: 0
Newbie Poster
nadith_cs is offline Offline
13 posts
since Feb 2007
Feb 21st, 2008
0

Re: PLZ let me know how to store a respond of a MSG BOX

Look at your vbresult function for messageboxes. It allows you to capture the button event procedure and know what button(s) the user has pressed and based on this you can you a logic statement, i.e. If Then Else statement
Reputation Points: 10
Solved Threads: 4
Junior Poster in Training
SolTec is offline Offline
65 posts
since Jan 2008
Feb 21st, 2008
0

Re: PLZ let me know how to store a respond of a MSG BOX

VC++ question in VB.NET forum you may move your thread to get more answers http://www.daniweb.com/forums/forum8.html Show method for MessageBox in C# returns DialogResult within you can know user selection (Yes, No, Abort, ....) I don't know if VC++ has the same scenario or not, I recommend to ask VC++ professionals.
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Feb 21st, 2008
0

Re: PLZ let me know how to store a respond of a MSG BOX

this forum for vb.net friend
Reputation Points: 1182
Solved Threads: 393
Posting Sensei
Jx_Man is offline Offline
3,145 posts
since Nov 2007
Feb 22nd, 2008
0

Re: PLZ let me know how to store a respond of a MSG BOX

Hey, wel i am not 100% how to do this, using Visual C++, but if you know any way to change to Visual Basic, I can help, well its prety simple,

Add a 'TextBox', and a 'Button'

Make sure the textbox is called 'Textbox1'
That should be its default name anyway.

Double click on the button, then add this code.

VB.NET Syntax (Toggle Plain Text)
  1. Public Class Form1
  2.  
  3. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4.  
  5. Dim SaveF As New System.IO.StreamWriter("PUT A PATH WHERE YOU WANT THE TXT FILE TO APEAR, HERE")
  6. SaveF.Write(TextBox1.Text)
  7. SaveF.Close()
  8. End Sub

So basicly, this is a simple way to send Text, from a textbox, to another location on your PC. It will automaticly create the text file. So here is a real example you could use.

VB.NET Syntax (Toggle Plain Text)
  1. Public Class Form1
  2.  
  3. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4.  
  5. Dim SaveF As New System.IO.StreamWriter("C:\ExampleFolder\Textfile.txt")
  6. SaveF.Write(TextBox1.Text)
  7. SaveF.Close()
  8. End Sub

So this is an example you could use. It's all about choosing the correct path where you want the file to go. I hope this helps, although it used Visual Baisc and not C++.

Feel free to experiment with this example and have fun

x
Reputation Points: 10
Solved Threads: 1
Light Poster
harryl5 is offline Offline
26 posts
since Feb 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: simple chat box..
Next Thread in VB.NET Forum Timeline: Selecting text event in RichTextBox





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC