Remove Urls Containing Some Unwanted Domain?
Sep 29, 2011
I have a list of URLs in a listbox and I want to remove the Urls containing some unwanted domain for example google.com also I want to know if is possible remove all URLs no containing a domain for example yahoo.com
I have the same problem in a ritchTextBox.
View 11 Replies
ADVERTISEMENT
Jun 22, 2011
I have a list of 100,000 urls in list(Of string) which can contain urls in the form. [URL] i have tried using a combination of regex and the Uri class, but that didn't help, so i dumped the code. How do i filter these duplicates and keep just one of these url
View 8 Replies
Jun 22, 2011
I have a list of 100,000 urls in list(Of string) which can contain urls in the form.[URL]..i have tried using a combination of regex and the Uri class, but that didn't help, so i dumped the code. i also tried using this code, but it will only remove duplicatse of exact form, since its not domain specific.
list = new ArrayList<T>(new HashSet<T>(list))
How filter these duplicates and keep just one of these url if it contains the same name e.g yahoo.
all URL are of different domains, but can usually have duplicates like the example i gave above
also, am using .net 2.0, so i can't use linq
View 4 Replies
Jul 29, 2009
My application uses several checkedlistbox controls, datagridviews, and textboxes.I'm using the checked list box to provide a more intuitive interface for the users -- they know what they selected by the check mark.I have a binding source for all the individual textboxes (they are in one table) and a binding source for the datagridviews.I use the insertonsubmit and deleteonsubmit for changes made in the listboxes.I can then use the getchangeset to determine if any changes were made to the record.My problem is that sometimes a user only wants to "test" inputs to a record but may not want to have those changes actually made to the database -- or an error was made and they want to "undo" the inputs.How do I remove the unwanted changes and allow the user to continue working with the original data?
View 7 Replies
Sep 4, 2010
Is there a way to join and remove a compuer to and from a domain in vb.net instead of using netdom?
View 4 Replies
Sep 22, 2010
I have a function that works perfectly when I attempt to add a user from the same domain into a group of the same domain.
Function AddUserToGroup(ByVal strUserDN As String, ByVal strGroupDN As String, ByVal strGRPDC As String, ByVal strUserDC As String) As Boolean
Dim oUser As DirectoryEntry
[Code]....
The error is actually being thrown on the Invoke line, but as I said earlier, if the user is in the same domain, this works perfectly.
View 1 Replies
Dec 4, 2010
I have a WPF application that targets .NET 4.0. When the application starts the %ProgramData%Company NameApplicationVersion directory is created. It is an empty directory. I am not using My.Settings. Why is this directory created and how can I prevent it from being created?
View 2 Replies
Feb 17, 2011
I am trying to show the square root of the number entered in the textbox. when the user presses Q (Uppercase), the square Root should be shown (in the textbox). I did manage to get the sqaure root, but the problem is that when I press Q the Letter Q is also typed in. For example, if I enter 25 in the textbox and press Q then I get Q5 as the result. Is there any work around to this problem ? Below is the code that I have used.
Private Sub Textbox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(81) Then '81 for Letter Q
Dim root As Double = Math.Sqrt(Val(TextBox1.Text))
[code]....
View 3 Replies
Oct 22, 2011
If I use a button, I can't get rid of the white border apearing around it as soon as I press it. It stays there even after until I press something else. In the button properties I declared the Flatstyle as Standard because I like that look the most.
View 9 Replies
Feb 5, 2010
I have a datatable that has a float data type. I give it a value of say 88.88. I then create a datagridview on a form but the cell value is diplsayed as 89.00. I cannot work out why!
View 4 Replies
May 24, 2010
This is one of those "seems obvious" as how to do, but came across interesting side effect in implementing. I'm trying to keep two text boxes syncronized when information is updated. In this example, I will be using txtStartDate and txtEndDate. If the txtStartDate is changed, then the txtEndDate should should be updated. Likewise, if the txtEndDate changes, I want the txtSartDate to be updated. The side effect I'm comming across is that when I set them up under the TextChanged event for both, the events seem to retrigger against each other indefinately (endless loop?). Am I using the wrong event? Is this a task for a delegate?
View 3 Replies
Jul 14, 2009
I have an MDI WinForms app in which the MDI parent form has a ToolStrip, MenuStrip and StatusStrip. Whenever the mouse is moved over one of these controls the cursor changes to a 'wait' cursor (a arrow with an hourglass). This seems to be default behaviour in that there is no code to make this happen. The UseWaitCursor property of both the ToolStrip and MenuStrip is false; StatusStrip does not have this property. This occurs in both debug and release builds and confuses the users who think that the app is 'doing' something when really it isn't! Does anyone know what is causing this to happen, and more importantly how to make it stop?
View 4 Replies
Jan 12, 2012
I've been constructing a small footprint grid control for Winforms.
After adding a vertical scrollbar I noticed that up and down keyboard strokes on the control move the scrollbar. I added no handler to support this functionallity. Indeed I do not want it. Anyone know where this event resides and what is the proper way to override it?
View 2 Replies
May 4, 2010
I'm working on a program that will generate and graph random parabolas with integer vertices. I've got a 360n x360 pictureBox set up and used a for-next loop to draw in a grid consisting of 15 x 15 squares. when I plot the generated parabola I get some unwanted lines/curves. I think this is due to the fact that the (0, 0) point of the picturebox is in the upper left corner and the (0, 0) of my grid is in the center of the picturebox. Is there a way to "move" or "set" the pen position to the first point I wish to plot for my parabola without leaving a mark or trail? Or is there something else I can do? I've tried drawing an invisible line before my g.DrawCurve(plotPen point) but when the DrawCurve is executed I still get an extra line.
Private Sub cmdParabola_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdParabola.Click
Dim x, xPlot, y, yPlot As Single
[Code].....
View 4 Replies
Feb 10, 2011
I'm using VB 2005 and MS Access 2000. I have a process that does some "stuff" with the data, re-queries the database, re-populates the form then displays a messagebox indicating that the process has completed. My issue is that after clicking OK in the messagebox, that whatever textbox the cursor was in prior to starting the process, now has all the text in it highlighted. If I don't show the messagebox then this doesn't happen. And if I don't call the process that repopulates the form controls, this doesn't happen. There's no code in the app that selects the contents of the textbox so is there a property somewhere that controls this?
View 1 Replies
Feb 8, 2012
I have an unbound data grid view. Every cell that has text will display ToolTipText for that value. I'd like certain cells to have no ToolTip and others to have a ToolTip that provides instruction on what the "X" button is for rather than just having "X" display. If anything, for this particular cell, I'd probably rather have no ToolTip. I've tried setting the ToolTip.Text ="" for the cell immediately after creating the row. On other cells, if I change the underlying text value, I try altering the displayed tip text, but only get the text value for that cell.
How can I remove/modify unwanted ToolTips in my DataGridView?
View 10 Replies
Aug 13, 2009
developed my app on a Vista laptop and deployed it on an XP desktop. When deployed the Form and even some controls are resized so text and portions of controls are not visible.Next I moved the project files and VB to the XP desktop and published the application on that machine. Same result, in fact the sizes were changed within the properties of the forms and controls within the project files
View 14 Replies
Oct 7, 2010
I have developed a VB .net application which uses SQL CE as its database engine. It works great so far. I recently added a section to remove unwanted reports which are stored in the database. The app correctly pulls ReportIDs from the table, which the user can select. The program will then delete the records based on the ReportID from the database. I know this records because, for testing purposes, message boxes inform the user of how many records where collected.
Dim SQLDeleteData As String = "DELETE FROM ReportData WHERE (TableID = @ID)"
Dim Con As New SqlCeConnection(DataBaseCon)
Dim DeleteData As New SqlCeCommand(SQLDeleteData, Con)
Dim ReportDelete As Integer = -1
DeleteData.Parameters.Add("@ID", SqlDbType.Int).Value = CInt(ListView1.SelectedItems(0).Text)
noOfDeleted = DeleteData.ExecuteNonQuery
MsgBox("Records Data Deleted " & noOfDeleted)
When the form refreshes to show the user the possible ReportID's, the list no longer contains the recently deleted ReportID. Now this is where I am getting confused. When I go through the server explorer and look at the database there, in the appropriate tables the data still exists. Through the server explorer new query builder, I can still create a select statement to allow me to view the data I just deleted. Does the server explorer create some type of local cache that replicates the database in someway? Are there really two copies of the database somewhere?
View 2 Replies
Nov 20, 2010
I have a Visual Basic 10 program that one forms call another form.. On the called form I have a checkbox object and a 'Click' event associated with it.
My problem is that when the first form 'calls' the second form the second forms Checkbox's click event is called. it only happens when the form.show is used for the first time.
View 3 Replies
Oct 14, 2009
I started computing at college about a month ago and have been learning to program in Visual Basic 2008 Express. I decided one weekend that I would try and make a pretty simple game that I may be able to use for my coursework at some point (I know Visual Basic isn't everyone's first choice for games programming but I thought I could try), I have learn a great deal from doing this but have encountered a rather odd bug in the program.
[Code]...
View 9 Replies
Jan 15, 2012
i have a table named Tuition with fields:
[Code]...
View 11 Replies
Oct 8, 2011
Everything works OK with my VB program except, all of a sudden now, whenever I attempt to brush across a text string with the cursor intending to hilite the string I get an error message saying "Microsoft Visual Basic 2010 Express has encountered a problem and needs to close."Where-upon VB shuts down and restarts.
View 1 Replies
Jul 20, 2009
My program paste lots of stuff to a text box. Is it possible to replace every character that is not a number or a point to nothing? It may get lots of weird character there so is here way to replace them to �� and keeping numbers?
I know how to TextBox1.Text = TextBox1.Text.Replace("%", "") But its too many simbols to list, Can it be done easier?
View 2 Replies
Jan 17, 2011
I am trying to download chinese data from database to excel. But data is coming with different charecters in Excel like this Here is the my code for download excel. I don't understand what's wrong in my code.
[Code]...
View 1 Replies
Apr 28, 2011
I have a program that will round any numbers I give it regardless of the data type I set (I've tried double and decimal) before it saves into the DB. I'm using MS access for the DB and I've set the data types in access to Numeric Double, Numeric Decimal, and Currency and all with decimal places set to 4 -- all to no avail.
What I do know:
1) The textboxes on the form accept the number value as I enter it and after I hit save the value displayed is the same as the number that I entered. However, once I query the database again for that entry the value has been rounded up/down to the nearest integer (whole number). For example: I enter 1000.50 and hit save. I search for that same entry and the value is saved as 1000. If I enter 1000.51 and hit save then search for the entry it shows the value saved as 1001.
2) I can store the desired value directly into the DB by manually entering it. When I search for that entry from within the program it displays the correct amount. HOWEVER, if I try to change the amount and then hit save I get a concurrency violation.
I think that it may be a setting somewhere in the program that doesn't allow for decimal places but I've search everywhere and I cant find anything.
View 7 Replies
Jul 30, 2009
I am using a collection to store data from a text file which I am letting the user load and I am using the .split to split and sort the data into alphabetical order and remove repeating words.However, I am having a problem removing unwanted characters from the final array. For Example, "This is the text file that I want sorted. It is random text not yet sorted"
View 6 Replies
Apr 26, 2012
I am building a tool that takes an XML document and replaces XML nodes with a different XML node using .ReplaceChild. This all works great. The nodes get changed to the proper nodes. Where I seem to be having an issue is that the new node is inserted with an xmlns="" attribute, which I am not specifying for it to do, nor do I want as an attribute. How can I stop the ReplaceChild from inserting this as an attribute, or am I going to have to remove the attribute after the node is replaced?
Dim imgSrcNode As XmlElement = xmlDoc.CreateElement("img")
Dim imgSrcAttr As XmlAttribute = xmlDoc.CreateAttribute("src")
imgSrcAttr.InnerText = "./art/" + imageName.Substring(0, imageName.LastIndexOf("."))
imgSrcNode.Attributes.Append(imgSrcAttr)
mmlNode.ParentNode.ReplaceChild(imgSrcNode, mmlNode)
Resulting XML change:
<img src="./art/equJI161298_1" xmlns="" />
XML change desired:
<img src="./art/equJI161298_1" />
View 5 Replies
Nov 11, 2011
I have an application that runs in full screen. Controls are placed different when screen resolution is changed :
1024x768 :
1280x1024:
How to fix unwanted space added between grid and right form side,as in last image (1280x1024) ?
View 6 Replies
Aug 19, 2009
I have a problem when writing some text to txt files.Here is my My.Computer.FileSystem.WriteAllText("test.txt", tekst, False)where tekst is a string variable.
When opened in some HEX editor, test.txt begins with 3 unwanted characters - ASCII values: EF BB BF. Notepad isn't showing them.
View 5 Replies
Jan 26, 2012
Possible Duplicate: What's the term for the part of the URL after the question mark?
I have a company Website in Visual Studio / VB / ASP.NET 4.0. I noticed a competitor of ours also has .aspx extensions in their website. They have strings at the end of their website URL. For instance, when you click a language, it has this after the dot com:
/main.aspx?langtype=2057&locale=en-be
And of course it goes to that language/culture and the "be" is, I assume, the uiculture/subculture.But how do you get these strings in your own URL?
View 2 Replies