It has been a while since I have used regular expressions and I'm hoping what I'm trying to do is possible. I have a program that sends automated response regarding a particular file and I'd like to grab the text between two words I know will never change. In this example those words are "regarding" and "sent"
Dim subject As String = "...
I am designing a simple user interface using winforms. In the designer I have a panel on the form and would like to add a datagridview control into the panel at runtime and set the dock property of the datagridview to 'Fill' so that it fills the panel.
I am struggling to do this and following code is not working out for me:
Dim MyDataG...
I have a group of images in my My.Resources. I want to select select images to display dynamically at run time. How do I do this?
'Static (Compile time) Assignment
UltraPictureBox1.Image = my.Resources.zoo_picture_1
'Dynamic (Runtime) Assignment
UltraPictureBox1.Image = ???
...
I have a windows user control that reads events from the application log of a remote server. I can read in the information alright, and it appears to happen very quickly, however the thread hangs up for about 30 seconds afterwards and keeps my application from displaying the log.
I am afraid that this is probably caused by my lack of e...
I need to use RegEx.Replace to replace only certain named groups in my input string.
So I might have a pattern like:
"^(?<NoReplace>.+)(?<FirstPeriod>(\d{2})|CM|RM|PM|CN|RN){1}(?<LastPeriod>(\d{2})|CM|RM|PM|CN|RN){1}((#(?<NumberFormat>[#,\.\+\-%0]+))*)$"
Tokens such as CM, RM are being replaced using Regex.Replace with a MatchEvaluat...
i guess my .NET application needs to be signed or something. how do i get rid of that prompt unknown publisher when someone tries to install my app?
...
I'm writing a web crawler for a specific site. The application is a VB.Net Windows Forms application that is not using multiple threads - each web request is consecutive. However, after ten successful page retrievals every successive request times out.
I have reviewed the similar questions already posted here on SO, and have implemented...
I have a class called Profile that has some simple properties and then it can have a collection of ProfileItem that again has some simple properties and then it can have a collection of ProfileItem (RECURSION).
Now I am trying to generated a very simple save function using XML Literals that come with VB.NET (3.5).
The code I am using i...
I am trying to write a generic function that generates an Xelement based on a list of objects, and a property of the object
Currently I have this code copied and pasted in several spots
InputElementsArray = New XElement(New XElement("ArrayInputs", _
New XElement("InputName", "TestFailedRefDesList"), _
...
Hi
Im pretty new to regex and im having trouble using VB and regex.
Im trying to remove a <span ....> comment and replace it with <b>
so far ive got this:
Regex.Replace(text, "<span[^>]*>", "<b>", RegexOptions.IgnoreCase)
This correctly matches the span comment but when it replaces it with the string it strips the <> and just leav...
iam having problems with Cms can anybody help me in managing categories ,and edit products.
when i click edit product from manage product then add price description etc and click update it cashes and the error said that categaory id is not declared how i declare it, where i declared it
...
Hey Ya'll,
I can connect to VPN and I can access Sql Server using RDP. Now, I want to access the Sql Server programmatically.
I connected to the VPN and then have the following connection string set up:
**constr = 'Data Source=servername;Initial Catalog=dbname;User ID=username;Password=passwd;'
error: login failed for username
PS:
...
I am using webDAV and .Net 2.0 to gather information on an email account on a server running Exchange Server 2003. I have access to the uri which looks like this:
http://my.mailserver.com/exchange/user/Inbox/someImportantEmail.EML
I attempted to copy the file like so:
Dim uri As New Uri(uriNode.InnerText)
If uri.IsFile() Then
...
I have a windows form that gets data from a scale via the serial port. Since I need the operator to be able to cancel the process I do the get data process on a second thread.
The data collection process gets multiple readings from the scale one at a time. The form has a label that needs to be updated with information specific to each ...
I have a problem with a control leaking GDI handles.
This is the cut-down version of the control:
Public Class FancyLabel
Inherits Label
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
e.Graphics.TextRenderingHint = Drawing.Text.TextRenderingHint.ClearTypeGridFit
MyBase.OnPaint(e)
...
I have an arraylist of objects, I would like to know the index within the arraylist of the object that contains a certain value, is there a built-in way to do the search?
I know I could simply iterate through the arraylist to find the correct value e.g. :
ReportToFind="6"
For i = 0 To ReportObjList.Count - 1
If ReportObjList.Item(...
I've been trying to make a simple usercontrol to display an image, and eventually make it act as a button in my WPF application.
I had one of these usercontrols written into the form's XAML, and the image always displayed. However, when adding them programmatically to a stackpanel, the control was there but the image never displayed.
H...
Hello. I have the following code:
try {
fi.MoveTo(getHistoryFileName());
} finally {
Debug.Write("Move complete");
}
I thought that using this would make sure that I'd never have exceptions thrown, but I am getting IOExceptions sometimes. What is the reason?
...
I'm attempting to supplement the help features for my code by providing other developers with code snippets. These produce skeletons of code which demonstrate how to use/call my classes or methods.
I've created a .snippet file and have placed it in the "%Visual Studio Folder%\Code Snippets\Visual Basic\My Snippets" folder. I've used the...
At runtime, I am adding a DataGridView to a windows form. The final column is a DataGridViewImageColumn:
Dim InfoIconColumn As New DataGridViewImageColumn
MyDataGridView.Columns.Insert(MyDataGridView.Columns.Count, InfoIconColumn)
Adding the following code will get my Information Icon (bitmap) to display in each of the column cells bu...