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

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2007
Posts: 13
Reputation: nadith_cs is an unknown quantity at this point 
Solved Threads: 0
nadith_cs nadith_cs is offline Offline
Newbie Poster

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

 
0
  #1
Jul 1st, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 65
Reputation: SolTec is an unknown quantity at this point 
Solved Threads: 4
SolTec SolTec is offline Offline
Junior Poster in Training

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

 
0
  #2
Feb 21st, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

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

 
0
  #3
Feb 21st, 2008
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.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

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

 
0
  #4
Feb 21st, 2008
this forum for vb.net friend
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 26
Reputation: harryl5 is an unknown quantity at this point 
Solved Threads: 1
harryl5 harryl5 is offline Offline
Light Poster

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

 
0
  #5
Feb 22nd, 2008
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.

  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.

  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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC