4,901 Posted Topics

Member Avatar for ponkhiraj

You could also use a dictionary as in Dim transform As Dictionary(Of String, String) and populate it where the key is the original char and the value is the replacement. Then you can do the replacement by For Each key as String In transform.Keys TextBox4.Replace(key,transform(key)) Next Caution - this will …

Member Avatar for Reverend Jim
0
557
Member Avatar for Stuugie
Member Avatar for eminenz cw
Member Avatar for pratik65
Member Avatar for Dili1234
0
1K
Member Avatar for LastMitch

I like the new feature but I am concerned that this will lead to people posting "bump" and other such empty content just to get their names in the bar.

Member Avatar for Dani
4
220
Member Avatar for lymwale.pablo

A cleaner add would be For Each dRow In dt.Rows Dim item As New ListViewItem(dRow.Item(0).ToString) For i As Integer = 1 To 8 item.SubItems.Add(dRow.Item(i).ToString) Next ListView2.Items.Add(item) Next

Member Avatar for tinstaafl
0
686
Member Avatar for Rouf mir
Member Avatar for <M/>
0
135
Member Avatar for <M/>

A lot of grammar peeves such as **People who don't know how to use reflexive pronouns** "How are are you?" "I'm fine. Yourself?" It's called reflexive because it reflects back. You can say "I will do it myself" because "do" relects back on "me". You can't say "If you need …

Member Avatar for <M/>
0
164
Member Avatar for Mike Askew

When I was still working stiff and had time to kill I'd write system integrity softwre (perform various checks and text the standby person if errors), rewrite old apps to improve them or I would learn some new technology, languge, etc.

Member Avatar for Bob Hensley
0
186
Member Avatar for dheerajsuthar

Anyone who lists "Family Guy" as one of their favourite shows is someone who (I think) doesn't take themselves too seriously. In other words, my kind of people. Welcome aboard.

Member Avatar for <M/>
0
269
Member Avatar for happygeek

I carried a cell phone for the last 10 years I worked. I spent far too much time on 24x7 standby and having my workday repeatedly interrupted with non-emergencies. When I retired in 2008 I swore I would never own another. So far so good. I relish my time without …

Member Avatar for TonyG_cyprus
2
455
Member Avatar for The Dude

I hate songs with no originality and lots of repetition. Ever see the guest acts on American Idol? If it wasn't for the background dancers, fireworks, smoke/fog, background videos, etc (most of which give me a headache) who would listen to that crap. Sure, there are a few talented singers/composers/performers …

Member Avatar for <M/>
0
691
Member Avatar for eharrell

++ and -- are auto increment/decrement. Yhe following statements are equivalent index++ ++index index += 1 index = index + 1 If you use ++ in an expression, whether you put ++ before or after is important. index = 5 x = index++ y = ++index In the above, x …

Member Avatar for Reverend Jim
0
322
Member Avatar for super-duper

If you need a directory listing on another machine, assuming you hae rights on that machine, the format is dir \\machinename\sharename Some shares may be hidden and or inaccessible like the defaults C$, D$, etc.

Member Avatar for JorgeM
0
144
Member Avatar for Patrick_Walsh
Member Avatar for <M/>
0
259
Member Avatar for hainguyen178
Member Avatar for pratik65

What database system are you using? Autoincrement fields are a function of the database and are usually integer fields. The DBMS assigns the value automatically. If you want something other than integer then you can select the largest value, strip off the non-numeric part, add one then get the new …

Member Avatar for adam_k
0
782
Member Avatar for kenomote

If your table has the fields (for example) myBooks ISBN Title Copies Borrowed You can get a list of the number of available copies of all books by SELECT Title, Copies-Borrowed AS Available FROM myBooks If a book gets borrowed and you need to update the table you can do …

Member Avatar for kenomote
0
143
Member Avatar for Reverend Jim

I was thinking about installing Visual Studio 2012. Does anyone know if I can have both 2012 and VS 2010 installed at the same time without screwing up either or both?

Member Avatar for deceptikon
0
254
Member Avatar for Dili1234

The obvious guess would be either TextBox1 isn't defined or sqlDataset isn't defined. Put a breakpoint at the line where you get the error and try to examine both objects.

Member Avatar for Dili1234
1
393
Member Avatar for BigPaw
Member Avatar for hhm_pro992

I'm not up on data bound controls so I can't speak to that, but the query shouldn't have single quotes around numeric fields. Try "UPDATE Inventry SET QTY = QTY - " & qqttyy & " WHERE CODE = " & codee Also, you needed a space before "WHERE". If …

Member Avatar for hhm_pro992
0
229
Member Avatar for Reverend Jim

The code in this snippet (and attached project zip) demonstrates how to use a background worker thread to monitor a network address (name or IP). It shows how to start and stop the thread and how to update controls in the main thread using delegates. It should be simple to …

Member Avatar for Reverend Jim
1
2K
Member Avatar for <M/>

I recall reading that Black Friday is a lot of hype and that there are better prices to be had at other times of the year. Plus you don't run the risk of being trampled to death. Correct me if I am wrong, but I believe it got its name …

Member Avatar for <M/>
0
164
Member Avatar for Programmer629

To start with you can ping another node by My.Computer.Network.Ping(txtWeb.Text) where txtWeb.Text is an IP address or DNS address If you just want to do the occasional ping then that should suffice. If you want to use it to repeatedly monitor another address while you do other things then you …

Member Avatar for Reverend Jim
0
207
Member Avatar for Neethaa

Here is a sample of code that gets values using an OleDbConnection and a DataReader. AddRow just puts the three values into a new ListView Row Private Sub btnOleDB_Click(sender As System.Object, e As System.EventArgs) Handles btnOleDB.Click ListView1.Items.Clear() Dim con As New OleDbConnection("Provider=SQLNCLI10;Server=.\SQLEXPRESS;Database=PUBS;Trusted_Connection=Yes;Connect Timeout=15;") Dim cmd As New OleDbCommand cmd.Connection = …

Member Avatar for Reverend Jim
0
156
Member Avatar for kenomote

It may be slightly different depending on which version of Visual Studio you are running, but in 2010, you open the project properties and click on "Settings" about halfway down the left panel. Enter a variable name, type and scope then enter an initial value. To load the value into …

Member Avatar for tinstaafl
0
166
Member Avatar for Neethaa
Re: labl

What line is throwing the error? Why bother converting all of the control values to integers and dates when all you are doing is putting them back into a string? Don't put single quotes around values in the query when the corresponding database field is numeric.

Member Avatar for Reverend Jim
0
172
Member Avatar for pratik65

I presume that the user enters numbers in all three textboxes then clicks a button to perform some action. In the button_click handler you get the numeric values from all three textboxes then do a comparison and display an error message if the Obtained_Marks value is outside the range. First …

Member Avatar for Reverend Jim
0
190
Member Avatar for Giggsette
Member Avatar for Jawow

>I got a problem getting my code to function That's a darned shame. If you want help then tell us what isn't working the way you'd like. What is your code supposed to do? Any error messages? If so then on what line?

Member Avatar for Reverend Jim
0
171
Member Avatar for preetg

I suggest you have a look at TrueCrypt. It is open source and free and I have used it for years. You can create an encrypted file of a user-specified size. Once the file has been created you mount it (via TrueCrypt) as a virtual drive then copy files to/from …

Member Avatar for Liaquat Nohari
0
340
Member Avatar for savedlema

Try the following. I don't have a sample database in Access so I haven't tried this query. I used SQL with the COALESCE function (does the same thing as NZ), then did a copy/paste. "SELECT StudentID, NZ(Physics,0) + NZ(English,0) + NZ(Chemistry,0) + " & _ " NZ(Biology,0) + NZ(History,0) AS …

Member Avatar for savedlema
0
1K
Member Avatar for faroukmuhammad
Member Avatar for Xantipius
0
447
Member Avatar for Matigo

I have no way of knowing where your code is being executed. Is any of the code inside the timer Tick event handlers? For what you are trying to do I would put the following code in the Timer2_Tick handler counter += 1 Label1.Text = counter If counter = 180 …

Member Avatar for Matigo
0
793
Member Avatar for DyO1

It looks like you pretty much have it except for the Else (and you should use & instead of + to concatenate strings). If TextBox2.Text = ".\sys\clock" Then TextBox1.Text = TextBox1.Text & Environment.NewLine & "It's " & DateTime.Now Else Textbox1.text = "You didn't use the .SYS\ code" End If

Member Avatar for Reverend Jim
0
223
Member Avatar for joshl_1995

I posted code in [Retrieve and save to another excel workbook](http://www.daniweb.com/software-development/vbnet/threads/422252/retrieve-and-save-to-another-excel-workbook) a while back which should get you started.

Member Avatar for Reverend Jim
0
278
Member Avatar for dr.syroj
Member Avatar for Reverend Jim
0
109
Member Avatar for Programmer629

You are talking about an incredibly complex program (Outlook) with many thousands of lines of code requiring intimate knowledge of several technologies and it's only your third project in VB? I think you are biting off way more than you can chew. In any case, you are asking for far …

Member Avatar for Programmer629
0
183
Member Avatar for joshl_1995

It's been a while since I did this from vbScript but this works. Save this code in sampleapp.vbs and create a test widget.xls file to play with. set xls = CreateObject("Excel.Application") xls.WorkBooks.Open "d:\script\dani\widget.xls" With xls.WorkBooks(1).WorkSheets(1) .Cells(2,1) = "Malcolm" .Cells(2,2) = "Delarge" .Cells(2,3) = 855321 End With xls.WorkBooks(1).SaveAs "d:\script\dani\widget2.xls" xls.Quit quick …

Member Avatar for joshl_1995
0
1K
Member Avatar for EmpK

The easiest way to write out the text is System.IO.File.WriteAllLines(filename, {empIDbox.Text,fnamebox.Text,lnamebox.Text,salbox.Text}) To read it back Dim text() As String = System.IO.File.ReadAllLines(filename) If text(0) = txtUpdateID.Text Then txtUpdateFirstName.Text = text(1) txtUpdateLastName.Text = text(2) txtSalupdate.Text = CInt(text(3)).ToString("C2")

Member Avatar for xerohomicide
0
230
Member Avatar for pratik65

Check out [How Do I Put a Number Limit on a TextBox](http://www.daniweb.com/software-development/vbnet/threads/440145/how-do-i-put-a-number-limit-on-a-textbox)

Member Avatar for Reverend Jim
0
112
Member Avatar for EmpK

If txtUpdateID.Text = False Then Will never work because you are comparing a string to a boolean. The short form of showing/hiding a label depending on a comparison is Enflbl.Visible = txtUpdateID.Text = "some string value" If txtUpdateID.Text is equal to the string value then the label is shown, otherwise …

Member Avatar for Reverend Jim
0
188
Member Avatar for EmpK

>If TextBox1.Text > 1500 Then Doesn't work because you can't directly compare strings and numbers. Also If TextBox1.Text > "1500" Then won't work because "2" > "1500". If you limit your textbox to entering numbers only then you can do If CInt(TextBox1.Text) > 1500 Then To restrict a textbox to …

Member Avatar for EmpK
0
747
Member Avatar for Dani

Well happy birthday to you. I'm almost double that myself but my son at Stony Brook is just one year younger than you.

Member Avatar for Mike Askew
6
761
Member Avatar for LastMitch
Member Avatar for savedlema

As far as I know, Access does not support temporary tables. However, you can create a table on the fly with SELECT INTO as in SELECT * INTO temptable FROM Customers WHERE Address LIKE '*C*' Just remember to drop the table when you are done.

Member Avatar for savedlema
0
392
Member Avatar for Reverend Jim

This request arose from the discussion [OPINION: Who thinks MAKING A POST on these forums is horrible](http://www.daniweb.com/community-center/daniweb-community-feedback/threads/439477/opinion-who-thinks-making-a-post-on-these-forums-is-horrible). My comment on that thread was >If I am not logged in and I click on a link in my email, I am taken to that post. I can start typing a response …

Member Avatar for Mike Askew
0
167
Member Avatar for vicky30312

You can simplify the coding and make it more obvious by using this pseudo-code. It eliminates some unnecessary testing and setup. set low and high range for guess (lo=1 hi=100) read user number loop calculate guess as hi - (hi-lo)/2 if this is the correct number then exit loop if …

Member Avatar for Reverend Jim
0
286
Member Avatar for ProgenitorVirus
Member Avatar for Reverend Jim
0
132

The End.