Avoid Using Percent (%) Symbol In Search
Jun 21, 2010I have a method that searches a database using the contents of a textbox. I don't want people to be able to type "%" and retrieve all of the info.
View 1 RepliesI have a method that searches a database using the contents of a textbox. I don't want people to be able to type "%" and retrieve all of the info.
View 1 RepliesI am trying to search all sub directories for a symbol and replace it with another. The code below works for a specified path but it will not search sub directories.
[Code]...
I am writing sample code for Date conversion using VB.net.Problem i am facing that it is prefixing and suffixing with hash(#) symbol.ex : #2010-12-12#.How to remove # symbol so that i can only date.
View 2 RepliesI have a program where you have three entries, CD name, artist, price and it goes into a listbox and .txt file when closing. I have to have a message box if you enter the same CD name. I have a code to open the .txt file and compare strings but I need to change it to compare only the CD name and not all three entries. Is there a way to do my string compare against my listbox without opening the .txt file?? The program loads the listbox from the .txt file when opening. Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click' adds CD information to the list box
' declare variables
Dim strName As String
Dim strArtist As String
Dim strPrice As String
[code].....
I have been given some instructions to percent encode a URL twice. I know how to percent encode a URL once but how do you do it twice? Surly when it is encoded once, it will be the same when encoded again.
View 2 RepliesPublic Class Form1
Private Sub btnCompute_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCompute.Click
Dim percent As Double
[Code]....
Above is the code i have created. I am having issue with the variant "Percent" to display 37.50% instead of 37.5.
vb.net
'' Project name: Golf Pro Project
' Project purpose: Displays the commission based on a
[code]......
i dont know how to assign variables and im juist totally lost right now and this is due today and i was sick 2 weeks and am 2 chapters back.
I am trying to filter fields in a table that contain percent (%) and apostrophe (') characters. I kow that to filter an apostrophe you need to add another apostrophe (''). However, when a text contains the percent (%) character in combination with an apostrophe (') character, an exception is thrown. Also, when using the % character in a filter string, it will be function as an "*" (fields starting or ending with). I need the % to be considered as a character whenever the % makes part of a string in the field.
Dim TheTable As New DataTable
Dim col As New DataColumn("Col1")
TheTable.Columns.Add(col)
Dim TheRow As DataRow = TheTable.NewRow
[code]....
I need help getting a progress bar to show percent in it. I want to have the percent in the middle of the progress bar, like is sometimes seen in a few programs. I have googled this, and can't find anything. I found something on The CodeProject, but it was just a label and drawing a rectangle behind it. I would like the actual progress bar that is available through the toolbox.
View 5 RepliesIs possible get the percent of a word in the content of a richtexbox? if yes, can you give me some example?
For example if I have 100 words in a richtextbox and I want to know what is the percent of a word in this content (for example if a word called "music" is repeated 10 times = 10%. If this is not possible in a richtextbox, is possible in other box like textbox?
i was wondering if it's possible to do such:
'form location Me.Location = New Point(10%, 50%)
i know this code doesn't work as it looks, just loads the location by pixels. this is just a question, hopefully with a working code for a marked answer..so much work to do and so many choices to choose from.
the code below shows an if statement that is determining a customer type and a discount percent for that customer.But when I run the code it only ever reads the first discount percent even though the allocated price range is above the first discount percents range and should therefore give the second discount percent and i cant figure out why it is not using the second discount percent in any of the bronze, silver or gold statements.
[code]...
I have a numeric value in a Textbox that I'd like to format as a percent. How can I do this in C# or VB.NET?
View 4 RepliesI've been at this for an hour, but I can't seem to format a string as a percent while I am looping through a datatable. The string value that is being passed in is "3.22"
Public Function securityDt() As DataTable
Dim secMasterDt As New clsDataSecurity
Dim dt As New DataTable
dt = secMasterDt.getSecurityMasters()
For Each row As DataRow In dt.Rows
[Code] .....
I'm writing a small App that mimic's the Task Manager and I can get all the running processes images names and physical Memory usage but can't seem to figure out how to get the CPU usage Percent for each process.
opps forgot and as well as the indivdual process usage percent, so the precent each process is using....
VB.net 2003
i followed a few tutorials on here to create a calculator in VB.NET. But i am having trouble getting the percent button working properly.I have tried to come up with some things but nothing i have tried is working.I used this Basic Calculator VB.Net and this one Create a Calculator.I have searched google for an answer but it seems what i have is not working.Im not sure exactly what is needed so i will post all of the code i have. [code] My percent does not work it multiply's by a random number is seems.I am new to VB.NET so im not sure what i am missing.
View 4 RepliesI have this issue where for every 1% below a 95% threshold a charge of £67 is added. For instance if the percentage drops to 70% I would need a method of totalling the charge for every percent.
Would I need to use a Do....While loop then the if...then statements?
We were given this and for some reason I can't get this to work right. Here is the whole thing:The following code should display three rows of percent signs in the msgLabel. The first row should contain one percent sign, the second row should contain two percent signs, and the third row should contain three percent signs. However, the code is not working correctly.
[code]...
I'm trying to build a function where I can pass in a percentage and it would have that percentage to return a true value. However I'm completely drawing a blank on how to make on such function.
View 3 RepliesI'm guessing the reason this macro isn't doing what I want it to is because of an error on my part in the code. Basically, I want the values in the cells pointed out in the code to be increased by 10% each time the button is pushed.
Here is the code:
Sub Add10percent()
IncreaseColumnValuesBy10Percent 2, 0.1
IncreaseColumnValuesBy10Percent 4, 0.1
IncreaseColumnValuesBy10Percent 6, 0.1
IncreaseColumnValuesBy10Percent 8, 0.1
[Code] .....
I'm trying to get the battery life meter in percent, so it will be shown on a progressbar when you're on a portable computer.
View 2 RepliesI'm making a software where I need to have a transparent background in my form and then 50% transparent control. I don't know how to make the control 50% transparent without getting the back color from the form as back color.
View 3 RepliesTrying to find a code to display ' BatteryLifePercent' by itself on the screen of a gps unit running Windows CE Core 5.0. I have absolutely no experience in programming. Just piecing together things I find and slowly learning to make a working program. So if this is possible, could someone post a code for it? Ideally I'd want just the percentage showing on the main page with ability to size font and position somewhere on the screen. [Code]
View 4 RepliesI have been surfing the net all night to try and just learn how to do what I think should be a simple thing! How do I in vb.net when I press a button make it so that the windows volume changes to 50%? Is this that hard to do? Why cant it be like "windows.volume = 50" or something?
View 11 RepliesExample i have string =D:aaabddddd.jpg
string =D:aaabdddddfsdfsdfdd.jpg
i want to flexible sub string from right to ""
so answer=ddddd.jpg and dddddfsdfsdfdd.jpg
I have a string like 30+20%. Now I want to replace 20% with (20/100). Thats it.
View 6 RepliesI've got a list of System.Drawing.RectangleF objects that all overlap the same RectangleF object.In my picture below, the 3 overlapping rectangles would be the pink, yellow, and red rectangles.My main rectangle in question is the light blue rectangle.
Second Image: I know that with RectangleF objects I can use the Intersect() method that will return me another RectangleF object representing the overlap. But as far as I can tell, this only really works when comparing two rectangles.
My question is: How could I determine the TOTAL area/percentage (i.e. the combined total overlap of the red, yellow, and pink rectangles when compared to the light blue rectangle - but it would need to be smart enough to not count the area in which the red and yellow overlaps twice, and same for the pink and yellow)?
NOTE: The green lines represent the area I'm looking for, just the total area of the blue rectangle that is not visible.
UPDATE: I've added a 2nd image to further demonstrate what I'm looking for. In the second image, the presence of the burgundy rectangle should have no affect on the total percent covered because that area is already covered by the yellow and green rectangles.
I am using flash player 11 in VB.Net when I load the swf file in flash player the CPU usage goes to 100%. Any other light weight flash player to use in vb.net?
View 1 RepliesI am trying to filter fields in a table that contain percent (%) and apostrophe (') characters. I kow that to filter an apostrophe you need to add another apostrophe (''). However, when a text contains the percent (%) character in combination with an apostrophe (') character, an exception is thrown. Also, when using the % character in a filter string, it will be function as an "*" (fields starting or ending with). I need the % to be considered as a character whenever the % makes part of a string in the field. How can I address these issues? [code]
View 8 RepliesWe work with multi currency accounts and in my program i want the correct Currency Symbol to show against prices etcAs i am in the UK the default symbol is �. But what i would like to do is at the start of the program check what currency the account is and then from then on FormatCurrency will use the correct Symbol.
View 3 Replies