473,770 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

save file dialog?

how can i create a code to make my program create an rtf file? heres what i
have so far, any help would be appreciated:
Private Sub MenuItem2_Click (ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles mnuSave.Click
Me.SaveFileDial og1.ShowDialog( )
Me.SaveFileDial og1.CheckFileEx ists = True
Me.SaveFileDial og1.CheckPathEx ists = True
Me.SaveFileDial og1.AddExtensio n = True
Me.SaveFileDial og1.Dereference Links = True
Me.SaveFileDial og1.DefaultExt = ".rtf"
End Sub
Nov 21 '05
21 7192
Sorry. Forgot the link:

http://www.vb-helper.com/index_graphics.html

Look under graphics for screen printing/capturing

"iwdu15" wrote:
whats the open file code if i wanted to open this file? and will it show it
exactly how i left it if there are pictures, labels, and text boxes or should
i use a different file format?

Nov 21 '05 #11
i copied and pasted a code form the site but it gave me errors all over the
place, and the open thing didnt work, when i opend the file nuthing happened
Nov 21 '05 #12
it also doesnt save anytghing besides an empty file, am i asking too much out
of VB or can i save a my project as a file type with pictures, labels,
buttons etc and oepn it up and edit it later?
Nov 21 '05 #14
i 4got to tell u i dont kno if it matters im using Visual studio.Net 2003
Nov 21 '05 #15
"iwdu15" <iw****@discuss ions.microsoft. com> schrieb:
how can i create a code to make my program create an rtf file? heres what
i
have so far, any help would be appreciated:
Private Sub MenuItem2_Click (ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles mnuSave.Click
Me.SaveFileDial og1.ShowDialog( )


'SaveFileDialog ' only shows the file selection dialog, but it doesn't
actually create files or save data to files. You will have to do that
yourself:

\\\
If OpenFileDialog1 .ShowDialog() = DialogResult.OK Then
Me.RichTextBox1 .SaveFile(OpenF ileDialog1.File Name)
End If
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #16
well then how do u save data to a file so i can open it exactly ghow it was
and start editing it again? im using visual studio.net 2003 btw
Nov 21 '05 #17
I said above that it saves an EMPTY file

I have done a 20-hour day & I am not being funny, but I am not just here to
help you out.

I thought you only wanted the filter line of code. I do not have the time to
write you a full application & add comments to it. I am dead on my feet.
Please don't take it the wrong way if I sound a little off.

Please type:

http://www.google.com & in the search box type:

"RTF", "VB.NET" (including quotes) & press Enter

"Crouchie19 98" wrote:
Have a look at this article I found for you:

http://www.vbdotnetheaven.com/Code/Sept2003/2163.asp

Code sample:

http://www.vbdotnetheaven.com/Code/S...ViewerCode.zip

Nov 21 '05 #18
"iwdu15" <iw****@discuss ions.microsoft. com> schrieb:
well then how do u save data to a file so i can open it exactly ghow it
was
and start editing it again? im using visual studio.net 2003 btw


Place a richtextbox control on your form and use this code to load a file:

\\\
Me.RichTextBox1 .LoadFile("C:\f oo.rtf")
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #19
ok forgive me for being stupid but this is just my first year programming
anything this complicated so whjat type of rich text control, and how do i
save a file with the data from my applicaton and what format should i have it
save as?
Nov 21 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4182
by: cathywigzell | last post by:
I have a web page which allows a user to download a file directly to their computer, using IE. I present a file name in a table and the user can then right click on the file name to get a popup menu with the option 'Save Target As...'. Selecting that option results in the Save As dialog. However, if the filename has a reconginsed extension, e.g. .doc, then the Save As dialog adds another extension, so the file name in the Save As dialog...
2
2369
by: Alvo von Cossel I | last post by:
hi, i have a textbox in a form. when you press a Save button, a savefiledialog appears. creating ther file works but everytime you click save, the dialog appears. how do i make the dialog appear once and then only save the file? thanx -- Alvo von Cossel I of Germany
4
5110
by: John | last post by:
Hi, I generate a report in a comma delimited file and give it a name like MyReport.csv . I then set a Hyperlink control to point tp the file HyperLink1.text = "Download" Hyperlink1.NavigateUrl = "MyReport.csv" When the user clicks the HyperLink I would always like to
4
5563
by: Richard | last post by:
Hi I'm new to ASP/Web programming so any help would be appreciated... Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. When the user clicks to start the download I would like to display the "Save As" dialog, allow the user to name a place to save the file, and then show the download progress bar while the file downloads Question: How do I make a windows "Save...
0
2979
by: Dune | last post by:
Hi there, I have an aspx page that allows users to enter several parameters using drop downs and text boxes. The users then press a button that produces an extract based on the parameters they entered. When this button is pressed and extract is prduced and IE's standard Open/Save dialog should popup so they can navigate to the directory to save the extract in, or if they want, they can choose to open and view the extract without saving it. ...
4
3690
by: Dorte | last post by:
Hi, I am using the code below to stream a CSV file with the response object. Dim FileName As String = "Test.csv" With Web.HttpContext.Current.Response Web.HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" & FileName) .Charset = ""
1
1454
by: M Pearson | last post by:
Hello there all, am very new to asp.net programming and am struggling with this problem. What I trying to achieve. On a button click I want the standard web save as dialog to display. The user specifies where to save. I then generate the file which is a series of reports zipped up, which then gets saved to the users pc. The following is some sample code:
4
6262
by: Jonny | last post by:
Hello Group How do I open a Save File Dialog from an ASPX page behind a browse button? Any help would be fantastic!! I am using ASP.NET 1.1 using VB.NET as the coding language TIA
3
6440
by: =?Utf-8?B?YXNkZg==?= | last post by:
Hello. I am making a web application with c# and am using this code: Response.ContentType = "application/x-excel"; Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("あいうえお") + ".csv"); Encoding encoding = Encoding.GetEncoding("Shift-JIS"); Response.BinaryWrite(encoding.GetBytes(csvStr)); Response.End(); It works fine..the data gets saved nicely to an excel file. The user pushes the...
2
10995
by: vbaDev | last post by:
Hi. I am using Access 2000 and in my code I'm exporting a table into an Excel file (creating it), then the code needs to export another query into the same file (a new worksheet). So I needed both a "Save As" dialog and the ability to grab the filepath so that the second export appends to it. Anyway, I found Microsofts method and it works, except that I can't figure out how to populate the File Name box in the Dialog with a default name (say,...
0
9618
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.