I have been writing an application for our company that writes information to an inf file. However, when other programs use this file, it seems to crash. Now, the same application in VBA does not have this problem.
I am calling the textwriter Dim oWriter As TextWriter = My.Computer.FileSystem.OpenTextFileWriter(StrProjectInfPath, False); which seems to add in extra characters on the top line.
VS2010 (SP1) / .NET4 on Windows XP Pro Im having a slight issue with my password hashing function. The following function hashes the supplied password using SHA512 and returns a Base64 string.
I've been asked to re-write an application that was written sometime ago by another programmer. This application reads data from a database table, massages it, and then writes out the results to a text file that is later shipped off to another company. When I run my new application, it generates a file that, according to the byte count, is twice the size of the file output from the old application. However, to look at the two files with note-pad they look identical. I found that by using 'Ultra-edit' that the new records have a low-value byte hex '00' between each real character.
I have included my code so far below which doesn't work. I keep getting an error message with the New XmlTextWriter("C:myXmlFile", Nothing). Also it wont allow me to enter the element value from the array. Also when I stop running it and check the xml file it wont allow me to view - error XML document must have a top level element. Error processing resource 'file:///C:/myXmFile.xml'.
I created a simple BMI calculator through the guide.I have built it and published it on my laptop running Vista Home Premium with .net 3.5 SP1 installed.I can run the setup and subsequent exe file fine on my machine but when I try it on my girlfriends netbook (one of those fiddly little things) it wont install saying that some of the files are missing. It is running XP and also has .net 3.5 SP1 on it.There are only 2 extra files in addidtion to the setup.exe that vb 2008 creates and they are the application manifest and the program icon, both of which are located with the setup.exe but it still won't install. It is an offline installation but won't run.I copied the bin folder from the project to the setup folder and tried that, still no joy, yet if I try and run the actual program directly it works?
Basically I have a VB.net word processor application, With a; Rich Text Box Header Label(as system.windows.forms.label) Footer Label(as system.windows.forms.label) The printing is no problem, but the problem I am having is saving the header and footer label's text into the RTF file and also loading these into the header and footer labels.
why the xmlwirter writes an extra "?" at the begining of the xml. [code] And this is the output. Note the red "?" at the beginning of the xml. Upon close examination, it's a Chr(239) but in console application, it is shown as the "?" [code]
the first is validating numeric input in a textbox to make sure it's got two decimal places. I think this should be really simple, but I'm totally missing it.The second is adding an extra summary line to a listview. I have it working with all the data required, but I need to add an extra line at the end showing some totals. How do I do this?
Essentially I am trying to replicate the Windows 7 (In-Windows) activation key TextBox form. The Form where it will auto capitalize letters, remove or deny all non alphanumeric characters except dashes every 5 characters that will be auto-input.I assume this can be done with a fairly complicated replacement Regular Expression but I cannot seem to create one to fit the needs.
This is an Example of what I have right now, but it creates an infinite loop as it removes all characters including dashes, than adds a dash, which changes the text and removes the dash again.
Not sure if too many people know this, but the following line will cause an error:
GroupName.Substring(0, 3) = "jt_"
....if the length of GroupName is less than 3 characters. I always thought it would simply return whatever characters in GroupName, but no, it errors. I must be thinking of the old VB6 days.So, I now have to change the code to:
If (GroupName.Length > 2) Then If (GroupName.Substring(0, 3) = "jt_") Then
Note that the two comparisons need to be on separate lines. If they are on the same line, such as:
If (GroupName.Length > 2) and (GroupName.Substring(0, 3) = "jt_") Then then the code will still fail as the length command is executed at the same time as the substring command- which will cause the error when the GroupName length is less than 3.Just thought that those of us not aware of this should be!
I have two textboxes. I type in one of them and the text gets copied in real time into another textbox. There is one catch. I need to replace specific character with something else.
If I enter a quote " in textbox1, it has to be replaced with " in textbox2.
I started with something like the below code, but obviously this does not work (tried different stuff - this is for demonstration only). In the example below 'a' represents " , and 'b' represents "
Private Sub TextBox1_KeyUp(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.KeyUp TextBox2.Text = TextBox1.Text
With the shape of really large characters such as numbers and alphabetic characters + others, is there a way to get that shape as a REGION please?Imagine a really fat snake forming the letter S or two rectangles placed together to form a large letter L or a T like the shapes in TETRIS.
1) Does anyone know of anything in VB.Net that can translate such shapes into a System. Drawing.Region or know of a project elsewhere that achieves this please?
2) While I'm on the subject, how would you SCALE UP / DOWN a System.Drawing.Region please? How would you work out the Transform Matrix required please?
I'm making an application that will change position of two characters in Word.
[Code]...
Program works good, it is mixing characters good, but it doesn't write text to the file. It will write text in console, but not in file. Note: Program is working only with words that are divisible by 2, but it's not a problem. Also, it does not return any error message.
I'm making a custom control suited for handling passwords. I have created a control that inherits from a text box and I have implemented a lot of things so far. But what i want to do now is create a system so that when a user types It will display his last character typed for a X amount of time. Is there a way to turn only selected characters into password characters and still be able to get the password text from the Text property ?
I have an app to send SMS (developed using vb 2008) The characters allowed for the texts sms are them of "iso-8859-1" When the user writes in the textbox I do not want to allow him to write not allowed characters. Is there some instruction or function in VB 2008 to do it automatically?
I might create an "a bit "manual" function but before I prefer knowing if it exists something more automatic.
The last charaters can range from 1 to 100 This is the code that i am using to remove unwanted characters which is working how i want it to do but when i pass each file to OrigName to get the original name i am getting the above and i can not see where the '_1' are getting added. I don't want to mess too much with it incase it stops working the way i need it too. The lines in bold are the ones that write the results to a .tmp text, see below.
I am using the following code to get search results from The Movie Database.org using their api.
Dim xmltempdir As String = My.Computer.FileSystem.SpecialDirectories.MyDocuments.ToString & "cwbrowser emp" Dim stylesheetlocation As String = xmltempdir & "searchresults.xslt" Dim request As HttpWebRequest Dim response As HttpWebResponse = Nothing Dim reader As StreamReader Dim result As String = vbNullString [Code] .....
The line which is coloured red is the problem line. 'htmpath is shown as "C:UsersColinDocumentscwbrowser empsres.htm" which is correct. Why I get the Illegal Characters In Path error.
I'm trying to insert a - after ever 5 chars. I made this code. Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged If TextBox1.Text.Length = "5" Then TextBox1.Text += "-" End If [Code] ..... But the mouse returns always to the left after it enters a -.
Say you have the following string: Welcome to my program!
But you only want it to show a certain amount of characters then "..." so it would look like this: welcome to m...
I'm addressing this problem because I'm making a tabbed web browser and when I create tabs I have the document title as the text, but It looks weird without it cut off, so I wanted to know how I could replace the text after say, 15 characters with
I have a text box where I only want to be able to enter each character once, so no AA or 99, only one of each character. This is so I can paste into the field, but where any duplicates would be eliminated. I've tried using this code, but am not sure where I go wrong.
I have a string. I need to check what characters it contains because certain invalid characters are causing my sql query not to work. In the query I select where SupplierName is equal to the string. I need to replace the invalid characters at database and vb level. But I need to know first what the characters are.
I can copy about 15 files, and then it says "Illegal characters in path".However, I can't see any ilelgal characters.To top path is the destination, the bottom path is the source.
This is the code Dim split() As String = arr(intTeller).Split("") Dim name1 As String
While recently working on a program, I've run into two problems.Firstly, let me state my purpose of this program.The users enter a 'script' into the VB program, the program then saves the scripts as a '.java' file, then attempts to compile it using java