may i know how to extract "+ from a group of Substring? i tried the indexof method like i1 = s1.IndexOf(" "" ") but its giving me error probably because the compiler thought its unclosed clause.
I am trying to grab the "+ from the string : +CMGL: 1,"REC READ","+6596231118",,"09/08/13,00:17:11+32"Fire alert So this will actually grab the string starting from the "+ and including the handphone number until the next" , like this +6596231118 I have tried the substring method but it wont work because of the memory location over at the +cmgl.
This is a tricky situation. I want to extract a certain substring from the strings given below, using VB 6.0. I process each string (row) in a for loop one by one.
I have the following code which seems to work as intended.
From what i can tell is that Size is not the same as the amount of characters in a particular string, Is Size a size as in Bytes,Kilobytes etc?
Edit: Ive attached a PDF showing the output from this code. Which as you can see shows the wrong output and the sentence's go off of the side of the pdf.
So from what i can see is that tempPage.width (Which is 612) is some how wrong, because 612 characters goes off the side of the PDF Doc.
Public Sub writeParagraph(ByVal text As String, ByVal fontSize As Integer, ByVal align As Char) Dim newPara As New paragraphLine(text, fontSize, xAxis, newFont)
[Code]....
This was working as intended but then i realised "What if it was possible to generate 1 paragraph at a time and then check the yAxis of the page and if it has been met or exceeded then continue to write the paragraphs on a new page".
Im having a blank brain day lol , I cant seem to work out the correct calculation to extract each paragraph 1 at a time and add it to the arrayList.
I was able to extract href value of anchors in an html string. Now, what I want to achieve is extract the href value and replace this value with a new GUID. I need to return both the replaced html string and list of extracted href value and it's corresponding GUID.
My existing code is like: Dim sPattern As String = "<a[^>]*hrefs*=s*((""(?<URL>[^""]*)"")|('(?<URL>[^']*)')|(?<URL>[^s]* ))"
We are using Exchange 2003 as part of sbs 2003 premium.
We have a distribution group abc which receives emails abc@mydomian.com. How can I access emails coming to this distribution group and extract any PDF attachments that may be present using vb.net code?
I'm developing Asset Management System, it will compute for straight line depreciation, my problem is how to calculate running total on each group that I've extracted from my database.Here's a snippet for my extraction of data
Private Sub cboAType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboAType.SelectedIndexChanged ListView1.Items.Clear() If Not cboAType.Text = "-" Then
I'm trying to create a valid RegEx replacement pattern for correctly formatting specific .XML file names. Specifically, if a file name does not begin with a prefix, let's say, ACE_. If the XML file name and extension does not begin with ACE_, prepend the string ACE_ to the file name.For example, if my input source string is the following:
Widgets.xml
I would like to execute a single RegEx Replacement that would result in the string being:
ACE_Widgets.xml.
Conversely, if the string already begins with ACE_, I would like it to remain unchanged. Also,how can I include the pattern ".xml" to ensure that the string pattern for the file name and extension ends with ".xml" in the same matching pattern for the RegEx Replacement pattern? As for the match, I have some luck with the following:
^ACE_{1}[dD]+
Which indicates there is a match for the pattern if the input string is ACE_Widgets.xml and no match if the string is Widgets.xml The RegEx pattern would suffice, but if you need to know the language in which I'd like to use the replacement pattern is in .NET 4.0 in either C# or VB.NET.
The following posting is close to what Im looking for, but with the inclusion of the *ix directory path prefix, and the use of preg_replace() in PHP, I'm having a bit of a struggle getting it to work with what I need to do:
Regular Expression: How to replace a string that does NOT start with something?
How will I select a substring with 2 criteria? I have a Richtextbox where I select a number after a : with this code; For Each line As String In Richtextbox1.Lines Dim equalsPos As Integer = line.IndexOf(":") + 1 txtFound.AppendText(line.Substring(equalsPos, line.Length - equalsPos)) Next This is working ok, but the whole line.length is appended for number2. The line ex. Some text:my number some text-my number2. I want my number appended to txtFound, and my number2 appended to txtFound2. With my code only number2 can be appended correct.
I'm trying to match up a specific group name and see if it exists for the currently logged in user using Active Directory roles. If the Group Name exists for the Current User, I want that group name to be displayed in a drop down list. Example: If current user is in BIG Group, display BIG in drop down list.Problem: All I am getting is SIDs and I'm not able to get anything to match up to the group name and nothing will show up in the drop down list.I also get the following Error:Error: Object variable or WIth block variable not set.How do I fix this?? here is the code I am using:
Private Sub GetMarketingCompanies() ' code to populate marketing company drop down list based on the current logged in users active directory group that
I am writing an application and I do not know how to reference a group of controls inside a group box. I will include the code I have written so far and a picture with a detailed explanation as to what I am trying to do. Feel free to comment on any discrepancies that you may notice in my code.
Code:
Public Class Form1 ' The following class-level constants are used ' to calculate the price of the model Const decCOUPE As Decimal = 18000
I am trying to remove VB6 type code and use VB.Net code, in particular, remove "Left" and use "Substring". This code does not do what the old style code does. It seams to ignore the first two chars and forces the msgbox prompt no matter what I type in the textbox (at "Leave").
Private Sub TextBox5_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox5.Leave If TextBox5.Text = "" Then 'Do nothing
I want to divide the content in my application to groups each group has its own rectangle border with the group name located at the top border, i've seen it before and i'm not sure what is the correct name of this control, anyone knows what I'm talking about ? EDIT: Ok, I found the Groupbox Control but how do i use it? should i just drag other controls inside it or i should add controls directly into it?
I have this code I've used multiple times to add and remove users from AD groups, but when I try to use it to remove an AD group from another AD group it fails with "The server is unwilling" [code]...
I'm getting an ArgumentOutOfRange error when using substring function in .NET. I'm new to .NET so probably doing something wrong. I have a txtField, which is a text field component in GUI. I'm using Microsoft Visual Basic 2010 Express
I have a piece of code that I am using a for next statement and stepping through a string a little bit at a time. The problem is I get an error towards the end of my loop because my substring goes beyond the bounds of my string.
Dim Right As Integer = StartNumber.Value Dim left As Integer = LengthNumber.Value Dim i As Integer = 0
Which one would you prefer to extract a sub-string from the given string and why?I am thinking that since Left and Right are VB functions and not .NET functions, they may cause problems in the future in terms of compatibility.
This question was resolved in C#, and I don't know how to do it in VB net. I want to search through a directory of files and see if my string is contained within any of the filenames. Then I just need a bolean answer if it exists or not. I know how to use the file.exists...this is not what I need. The link below is to the C# response. How to check if filename contains substring in C#
My problem is at SubString will do the job for me, but next string could look like this: 101OldGranny91222 So I can't determind the number - for the split - of char in the string, because it changes depending on there name etc.
I have a text label, split half-and-half with a "/".label1.text = "I like dogs/I like cats"This will not be the same text (and not the same textlength)every times. I need to delete everything before the "/" with only a button. (for example, delete "I like dogs")
I have this problem that I'm going in circles on. The error message is "no accessible IndexOf can be called with these arguments."
My professor said that "to search for the string Los Angeles and substring will return it from the textbox, but it needs to know what position to start returning a word at, and that is where the IndexOf comes in." Does that mean substring and IndexOf are used together? That's what I did and may be the problem. Here's the code:
Private Sub btnOrder_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnOrder.Click 'Declare variables
Can a substring have mutiple arguments? I am pulling a substring from a drop down list into my database for records, the string is between 6 and 8 numbers, is it possible to pass more than one argument to make this work?