4,911 Posted Topics

Member Avatar for renzlo

I don't have access to a system to verify this but two options come to mind. 1. get a list of all PIDs of processes named java.exe just prior to launching the new instance then use that list to determine the PID of the new process, then use that PID …

Member Avatar for renzlo
0
303
Member Avatar for kikiey

You can't have two PCs on the same LAN with the same IP address. What kind of connection are you trying to make?

Member Avatar for john.knapp
0
467
Member Avatar for andrew_dvw_usr

I don't have access to my dev environment for the next few days so I'll try from memory. You can read all lines of the file into an array as follows Dim questions() As String = System.IO.File.ReadAllLines(filename) Then you can step through each question as For Each line As String …

Member Avatar for Reverend Jim
0
229
Member Avatar for LD Company

Is the database on the same machine as the application? Is the dababase server on his machine named the same as on the machine used to develop the application? Does the connection string contain the correct information to connect to the database? Does the user have sufficient access rights to …

Member Avatar for Reverend Jim
0
149
Member Avatar for ajitjhajjar

If I understand, you want the size of the scroll bar to be proportional to the font size of the selected text. In a RichText control, the scroll bar (vertical) represents two things 1. the position of the visible text in the entire RichTextBox text 1. the "size" of the …

Member Avatar for Reverend Jim
0
476
Member Avatar for Sevyt

I don't have access to VB while my computer is in the shop but let me make a suggestion (you'll have to verify the syntax). You can check all of the textboxes on the form by For Each tbx As TextBox In Me.Controls.OfType(Of TextBox)() If tbx.Text <> "" Then 'process …

Member Avatar for Sevyt
0
119
Member Avatar for Dani

>Are you trying to get answers to your own questions? At first I was here to get answers to questions. As I got more comfortable with DaniWeb I started "putting back in" by answering questions. Now I'd guess I run about 99% answering and 1% asking. I'm not saying that …

Member Avatar for john.knapp
0
272
Member Avatar for ponkhiraj

I wrote a sample code snippet that demonstrates how to use a [BackGroundWorker control](http://www.daniweb.com/software-development/vbnet/code/440614/backgroundworker-ip-monitor). Perhaps that can give you a start. My regular machine (with all the dev tools) is in the shop so that's the best I can do at the moment.

Member Avatar for Reverend Jim
0
1K
Member Avatar for timon.bijl

I don't have my regular computer with VB at the moment to check this, but to move a picturebox (or any control) you modify the Location property by PictureBox1.Location = New Point(xvalue,yvalue) And you can check for collision by comparing the edge x value (left or right as appropriate) of …

Member Avatar for Reverend Jim
0
91
Member Avatar for Neethaa

The confusion might be because of a misinterpretation. You use single quotes around a field value when the database field is of type String, not when the VB variable is of type String. For example, if the CompanyID field in the database is an int then two similar (but using …

Member Avatar for Reverend Jim
0
599
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
687
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
187
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
144
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
448
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 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

The End.