What this code does is let me choose a file, like an article saved in a .rtf file and take the text from that and put it into a .html file. The problem I'm having is in the middle, in the part that writes "the BULK of the content to the new file". It stops writing the writing the content from the .rtf file to the new file after it has written so many characters.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Dim openStream As New FileStream(txt_BrowseDP.Text & ListBox_Browse.SelectedItem, FileMode.Open, FileAccess.Read)
Dim makeStream As New FileStream(txt_BrowseDP.Text & ListBox_Browse.SelectedItem & ".html", FileMode.CreateNew, FileAccess.Write)
Dim theReader As New StreamReader(openStream)
Dim theWriter As New StreamWriter(makeStream)
Dim BulkContent As String
'Write the FIRST part of content to new file
theWriter.WriteLine("<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN""")
theWriter.WriteLine("<meta http-equiv=""content-type"" content=""text/html; charset=UTF-8"" />")
theWriter.WriteLine("<style type=""text/css"" media=""screen"" title=""Default"">@import url(../main.css);</style>")
Catch ex As Exception
'Write the BULK of the content to the new file
theWriter.WriteLine("<p><strong>" & theReader.ReadLine() & "</strong></p>")
While theReader.Peek() > -1
If theReader.ReadLine() <> "" Then
theWriter.WriteLine("<p>" & theReader.ReadLine() & "</p>")
Catch ex As Exception
'Write the LAST part of the content to the new file and then close
theWriter.WriteLine("<p><a href=""#container2"" accesskey=""c""></a></p>")
in my Form i Have Sum query like this :
SELECT SUM((Sahar.RegHours * 1 + Sahar.Hour120 * 1.2 + Sahar.Hour125 * 1.25 + Sahar.Hour140 * 1.4 + Sahar.Hour150 * 1.5 + Sahar.Hour175 * 1.75 + Sahar.Hour200 * 2.0 + Sahar.Hour225 * 2.25) * Sahar.MoneyForHour + Sahar.TasNsiot + Sahar.Globaly + Sahar.HefrshySahar + Sahar.Manak - Sahar.HiovMils - Sahar.HiovBigod - Sahar.HiovHanala) AS total, Customers.CustName, Sahar.SalDateStart, Sahar.SalDateEnd, COUNT(*) AS Expr1, Customers.CustAddres, Customers.CustNum, Customers.CustCity FROM Sahar INNER JOIN Customers ON Sahar.CustNum = Customers.CustNum WHERE (Sahar.SalDateEnd >= @Edate) AND (Sahar.SalDateEnd <= @Edate1) GROUP BY Customers.CustName, Sahar.SalDateStart, Sahar.SalDateEnd, Customers.CustAddres, Customers.CustNum, Customers.CustCity
the sum value is changing for every row
i have also a datagrid and the resualt there are good
the problem is when i sending this data to printing in crystal
i dont know how to send the SUM val to the report
is someone here can help me whit that ?
I have just finished my first .Net application and am now trying to create a setup project using the VS .net feature.
In the setup I should create some new Registry entries on the target machine which have the installation directory in its value.
My question now is: How can I determine, on which directory the application has been installed? And how can I write then this value into the registry key?
I tried it with the variable "ARPINSTALLLOCATION", but this variable was empty.
I wasn't quite sure which forum this should go under, so I put it here.
I, like many others I'm sure, use NDoc to create documentation for my code. This is one great product, but it has one slight drawback. It doesn't document v.2.0 code. The team is working on it.
In the meanwhile I use this little workaround to make NDoc document my V.2.0 projects:
Create a file named NDocGui.exe.config and place it in the NDoc folder (e.g. C:\Program Files\NDoc 1.3\bin\net\1.1).
In this config file you just type:
The XML didn't show up because the browser treated it like HTML, and since it wasn't the browser's renderer just ignored it. You have to remember to either click the "Ignore HTML tags" check box, or manually put in the < and > escape sequences manually.
I am developing painting software for pocket pc using .NETCF. I like to set background for that painting application. I declared one global bitmap variable like this
Bitmap bm = new Bitmap
All images are painted in this bitmap (bm) as shown below.
Graphics.FromImage (bm).DrawLine (new Pen (pnlColor.BackColor), lastPos.X, lastPos.Y, e.X, e.Y);
Now I like to set background for this painted image. I used the following code.
Graphics.FromImage (bm).DrawImage (bmpBackground, 0, 0);
The above code just draws the background image over my painted image. So my painted image is hidden and it shows only the background image. But I like to set the background for my painted image. How to tackle this situation. Thanks in advance.
Thanks for your reply.In my application,user will draw something and after the completion of the drawing,he used to set the background.So in my case the above solution wont work.Any way thanks for your reply.
I have been having a long debate with the developers in my company about porting our MFC software to C++.Net. The main concern is performance really. The software's primary goal is to track the flight of a ball in three dimensions using vision processing techniques. The software is, however, notoriously unreliable, with pointer errors and other software problems causing crashes quite frequently. Many of you may find this laughable but we are still using the VC6 compiler in Visual Studio 6. Aside from that, having had brief interludes with the .Net framework *and* MFC, I feel the .Net framework is far easier to use than MFC and seems to be a lot more stable too. From what I've seen and heard, .Net seems to be the answer in terms of development and productivity.
The other developers argue that the main issue is real-time performance. They feel that trying to get as low-level as we are would be difficult in .Net (but it's not like we're coding in assembly or even C for that matter; just standard C++). I believe they simply have a misguided understanding of how it all works. They seem to believe that the CLR is functionally the same as the Java Virtual Machine and that the intermediate language requires an extra layer of processing. My understanding is that the main purpose of the MSIL is for cross-platform compatibility and that it is possible to compile to the native machine language thus resulting in performance comparable to a Win32 compiled version.
Firsty, is this the correct analysis, and secondly can anyone give me URL where I could find information on benchtests comparing MFC v .Net compiled C++ programs?
Well, real-time applications are often cited as those for which managed environments are not suitable - due to the non-deterministic garbage collection. However, I don't have experience of real-time myself.
Having said that, Eiffel, which is also a GC-system has been used successfully in real-time environments - though Eiffel is a more sophisticated language than C# and .NET in this regard.
One thing you might get your company to look into is to port the app. to VC++ 2005 (C++/CLI). This will give you a managed environment, using the highest-performing language within a .NET context. Plus I believe it's the only managed language that will support deterministic GC, so that should handle the real-time aspects.
Another alternative is to stick with unmanaged code but port it to VC++ 7.1 or VC++ 2005 (Unmanaged) and make use of Boost smart pointers, etc., to take care of all your memory management issues.
We are using C# and VS.NET 2003. It is a mdi application. When
multiple child forms are opened then on the top right and left hand corner recursive
are shown representing each form. There should be only one icon at a time.
Can any body have solution to this problem. Thanks in advance
I have a List<t> of objects of type Extension. I want to search through the list looking for an Extension e where e.name = "<something>"
How do I do this in the .NET framework? I am confused on the proper syntax.
In my VS.NET project I added reference to this type library and VS.NET generated an interop file. When I call interface method GetStructure2 I get OutOfMemoryException. In VB6 this work correct. I think this is caused by .NET COM marshaling but I don't know how to solve this problem. Does anybody have an idea?
I have been working on a project where the aplication excutable
contains several resource files (text files.)
Now, it is required that the application will be installed at a client
location on 1 machine where the client will generate additional
resource txt files for the application. These files will need to be
packaged with the entire app and then the application will need be
deployed to several other machines.
We have been trying to figure out the best ways to do this.
Is there a way to add the newly generated resource files to a
pre-existing compiled exe? Is it possible?
After an installation the shortcut points appearently not to my application (.exe) but starts the .msi again.
In the user desktop folder of VS the shortcut points to the primary output of the project.
see also this thead
I rewrote the whole setup-project: Now it works... It seems an internal error.
Then there is probably a minor bug: If I install a project as all users in the Software-install folder the icon is a yellow folder icon. If I install a project as single user the in the setup project selected icon appears.
Last Visit: 31-Dec-99 18:00 Last Update: 24-Sep-23 15:17