4,901 Posted Topics

Member Avatar for discovery-power
Member Avatar for PdotWang

You say make it 10x10 with 10% each. This is the first time I am using the TableLayout panel. I am able to determine (faily easily) that "make it 10x10" means set RowCount=10 and ColumnCount=10. However "with 10% each" is not as clear. Perhaps you could spell this out specifically …

Member Avatar for jaimin4829
2
971
Member Avatar for Hawk123

I believe adam_k is correct. When you connect to a database on a network the standard is to keep the connection open for as short a time as possible because there are a limited number of connections available and you want to free them up for others. In your case …

Member Avatar for poojavb
0
238
Member Avatar for khizer03

You can do this with application settings. I don't know what version of Visual Studio you have so I'll describe the procedure for VS 2010. Start with your project open Go to the project properties settings Select the "Settings" tab down the left side of the panel Add an item, …

Member Avatar for codeorder
2
269
Member Avatar for Mike Bishop

I'll take a stab at it. I'm going to assume _userid is integer. A typicl update statement would be (at least in MS SQL) update tblUsers set Password = 'mypassword' where ID = 12345 Note the quotes around mypassword. try this code [code] cmd.CommandText = "update tblUsers SET Password = …

Member Avatar for hericles
0
485
Member Avatar for dobson1953

I'm not going to tell you what's wrong with the code just yet. What you need to do first is [LIST=1] [*]Tell us what the code is supposed to do. We shouldn't have to determine that by looking at the code [*]Pretty it up to make it more readable. Add …

Member Avatar for Reverend Jim
0
105
Member Avatar for sanket044

In the button click handler you can identify the button either by name or by label text (the label text is probably more informative depending on how you name your controls) [code] Dim button As Button = DirectCast(sender, Button) MsgBox(button.Text & " " & button.Name) [/code]

Member Avatar for Reverend Jim
0
122
Member Avatar for sanket044

In the button click handler you can identify the button either by name or by label text (the label text is probably more informative depending on how you name your controls) [code] Dim button As Button = DirectCast(sender, Button) MsgBox(button.Text & " " & button.Name) [/code]

Member Avatar for Reverend Jim
0
754
Member Avatar for Rox Vi

Try this [code] Dim row As Integer = 1 Dim col As Integer = 1 For Each line As DataGridViewRow In grdToExport.Rows For Each cell As DataGridViewTextBoxCell In line.Cells sheet.Cells(row, col) = cell.Value col = col + 1 Next row += 1 col = 1 Next [/code]

Member Avatar for Reverend Jim
0
454
Member Avatar for leutrim
Member Avatar for Karpati

Try Dim line() As String = System.IO.File.ReadAllLines("myfile.txt") That will read the entire file into an array, one line per array entry. You can access the text from line 5 as line(4).

Member Avatar for Reverend Jim
0
301
Member Avatar for Jakey101

Did it come with a recovery partition? Many computers are shipped without install disks. These computers typically have a partition that contains an image that will restore your computer to factory state. If the computer originally shipped with Windows 7 then that is what will be restored. Make sure you …

Member Avatar for phoenix_2000
0
189
Member Avatar for beforetheyknew

If you want to update a field automatically (like to display the time) you have to add a Timer control to your form and set it to run at a convenient interval. For example, if you add Timer1 to your form, you can set the interval to the number of …

Member Avatar for codeorder
0
131
Member Avatar for gplkrsna

wsh is reserved. If you execute the following line wscript.echo wsh the result will be the output of the line Windows Script Host use another variable name.

Member Avatar for gplkrsna
0
101
Member Avatar for SimpleMan78

Typically if you are using AD to authenticate then the user does not need to supply a username/password. The usual practice is to create a group in AD then add the appropriate users to that group. You then add the AD group to SQL server with appropriate access rights and …

Member Avatar for SimpleMan78
0
120
Member Avatar for rajkumardhawan

As an alternative to public torrents, you might look at OneSwarm. It was developed at the University of Washington. [url]http://www.oneswarm.org/[/url] In a nutshell, it allows you to set up private torrents if, for example, you wanted to share large files or sets of files between two or more computers at …

Member Avatar for ilmkidunya
-6
319
Member Avatar for jmrpjb

Stubborn browser toolbar addons can be removed/disabled using HijackThis (free) at [url]http://free.antivirus.com/hijackthis/[/url]

Member Avatar for jmrpjb
0
169
Member Avatar for Tobyjug2222

I suggest that you change the file format so that all info for an order is on the same line. Pick a character like "|" to separate the fields. Each line can be parsed into separate fields by Dim fields() As String = line.Split("|") It makes the file I/O much …

Member Avatar for Reverend Jim
0
214
Member Avatar for paradox814

How does the user get access to the form to change a password if the current password has expired? Wouldn't it be impossible for the user to log on to get access to the form?

Member Avatar for Reverend Jim
0
155
Member Avatar for AquaNut

If you are going to do a copy and paste then you will get what you get. What is the format of the cells in the spreadsheet (is it an Excel spreadsheet). Numbers don't usuallt display with a leading zero. If the cells you want to copy can be identified …

Member Avatar for Reverend Jim
0
213
Member Avatar for ng5

I created a listbox and a combobox. I populated the listbox with the words (one per line) "the quick brown fox jumped over the lazy dog". I then added an event handler as follows: [code] Private Sub ListBox1_SelectedValueChanged(sender As Object, e As System.EventArgs) Handles ListBox1.SelectedValueChanged ComboBox1.Items.Clear() For i As Integer …

Member Avatar for Reverend Jim
0
174
Member Avatar for skp03

If you just want to run it on the development computer you can just create a shortcut to the EXE file produced in a bin folder in your project folder. If you want to run it on another computer you have to create an install package for your application.

Member Avatar for Reverend Jim
0
286
Member Avatar for VB 2012

The simplest answer would be that another process is using the file. Try the Handle utility available at [url]http://technet.microsoft.com/en-gb/sysinternals/bb896655[/url] and see what shows up.

Member Avatar for VB 2012
0
200
Member Avatar for gerchi152

Try ListView1.Items.Clear() instead of ListView1.Clear(). That will clear the items only, not the column headers.

Member Avatar for gerchi152
0
1K
Member Avatar for Rajoo Mal
Member Avatar for CoderNH

Easiest one first. set the Sort property of the ComboBox to True and the items will display sorted. [QUOTE]The comboboxes are populated via a list and the list is populated by reading a text file for each combobox.[/QUOTE] What is the type of your list? A "list" can be many …

Member Avatar for Unhnd_Exception
0
229
Member Avatar for toldav
Member Avatar for M.Waqas Aslam

Assuming you want to do this to all text controls on the form, add the following to subs [code] Private Sub Text_Enter(sender As System.Object, e As System.EventArgs) DirectCast(sender, TextBox).BackColor = Color.Yellow End Sub Private Sub Text_Leave(sender As System.Object, e As System.EventArgs) DirectCast(sender, TextBox).BackColor = Color.White End Sub [/code] Then add …

Member Avatar for Reverend Jim
0
199
Member Avatar for vb.netfreak

The easiest way to insert a record into a table is by ADO as follows [code] Dim con As New ADODB.Connection con.Open("Driver={SQL Server};Server=JIM-PC\SQLEXPRESS;Database=mydb;Trusted_Connection=yes;") Dim query As String = "insert into Table1 (RegistrationNo,Field1,Field2) values(12,'John','Doe')" con.Execute(query) con.Close() [/code] In this case I am inserting into a SQL Express 2008 table "Table1" in …

Member Avatar for G_Waddell
0
170
Member Avatar for nav07

You can use the Windows Task Scheduler to run a program at a given time. If you want your app to be running, then perform some action at a given time, you can add a Timer control to your app. Set the timer interval to whatever interval you want to …

Member Avatar for Reverend Jim
0
314
Member Avatar for dennis_ian

For an excellent article on this please see [URL="http://media.wiley.com/product_ancillary/74/04705328/DOWNLOAD/532874_both02_p2.pdf"]Printing With VB 2010[/URL]

Member Avatar for Begginnerdev
0
88
Member Avatar for alistairnear

Besides which someone doing a thesis would likely pick a topic a little more challenging. I had considered doing a masters back in 1977. My thesis project was going to be implementing a computer conferencing system. Formatting a USB device from VB9? I don't think so.

Member Avatar for Reverend Jim
-1
121
Member Avatar for skp03
Member Avatar for khizer03

You have a typo in the for loop. You mistyped "proc" as "porc". As far as I know, you can't lock the screen by killing explorer.exe. It can always be started again from task manager (which can be activated from the keyboard). However, you CAN lock the workstation by executing …

Member Avatar for adam_k
0
103
Member Avatar for vb.netfreak

Two hundred buttons on one form seems a tad excessive but if you must, I suggest you create the buttons at runtime. You can lay them out precisely and keep references to them in an array for easy access. Another advantage is that it is easy to define just one …

Member Avatar for Reverend Jim
0
234
Member Avatar for Begginnerdev

I usually use ADO and I use the connection string "Driver={SQL Server};Server=" % server & ";Database=" & database & ";Trusted_Connection=yes;"

Member Avatar for Begginnerdev
0
2K
Member Avatar for dennis_ian

For an excellent article on this please see [URL="http://media.wiley.com/product_ancillary/74/04705328/DOWNLOAD/532874_both02_p2.pdf"]Printing With Visual Basic 2010[/URL]

Member Avatar for Reverend Jim
0
164
Member Avatar for Reverend Jim

In the last few days I have lost the ability to render certain images on DaniWeb. For example, the icons to the left of the threads now show only as text. Likewise with the "buttons" in the edit window. Any ideas what might have caused this or how to fix …

Member Avatar for caperjack
0
130
Member Avatar for RaoxFaello

Start by reading just about any Visual Basic how-to book. I haven't seen one yet that doesn't cover this.

Member Avatar for Begginnerdev
0
89
Member Avatar for khizer03

Put a shortcut to your application in C:\Users\All Users\Microsoft\Windows\Start Menu\Programs\Startup so that it runs whenever anyone logs on or C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup for specific users (replace %USERNAME% with appropriate username)

Member Avatar for Reverend Jim
0
93
Member Avatar for lili22

You are being taught to program because it is important to be able to analyze and describe a process in detail, and at some point you will need to have an appreciation for the work that goes into developing an application. For a non-programming example, try to write out a …

Member Avatar for Reverend Jim
0
379
Member Avatar for jugnu

You could try psexec from the SysInternals (free) suite. You can download it from [URL="http://technet.microsoft.com/en-us/sysinternals/bb842062"]here.[/URL] This excellent suite was developed (mostly) by Mark Russinovich.

Member Avatar for Reverend Jim
0
460
Member Avatar for slbreaul

There are a few things you have to do before you even start writing code. [B][U]Determine the structure of your database[/U][/B] Determine what tables you need and what fields will appear in each table. One of the tables will be the libraries table and will contain at least two fields, …

Member Avatar for Reverend Jim
0
76
Member Avatar for toldav

If I might make a suggestion. Have you considered using a dictionary? It would simplify your code considerably. Here's an example: [code] Dim city As New Dictionary(Of String, String) city("AUS") = "Austin" city("BOS") = "Boston" city("BWI") = "Baltimore" city("DFW") = "Dallas" city("JFK") = "New York" city("LAX") = "Los Angeles" city("MIA") …

Member Avatar for toldav
0
206
Member Avatar for MB1711

You step through the tree and keep track of the current and previous nodes (I use variables named curr and prev). When you find a node with a value greater than the value of the node you want to insert then you can use the Insert method on the prev …

Member Avatar for Reverend Jim
0
4K
Member Avatar for vammy
Member Avatar for tallygal

There are a few things wrong here. The first thing is that your function return values do not agree in type with the values you are returning. Let's take [code] Function CommissionTotal() As String commTotal = (commpercentage * grossSales) / 100 Return commTotal End Function [/code] You declared the function …

Member Avatar for tallygal
0
246
Member Avatar for johmolan

First of all may I suggest that you use the built-in copy methods rather than rolling your own. My.Computer.FileSystem.CopyDirectory(srcefolder,destfolder) will do the copy of the entire folder just fine. That will save you some debugging. If you want to set a folder constant just do Const srceFolder = "D:\MyFolder" To …

Member Avatar for GeekByChoiCe
0
532
Member Avatar for djjavo

You could also define a click event for just one of the controls in the set then use AddHandler on form load to add the other controls to that handler. It would save a lot of clicking. You would have to modify the original handler to distinguish between the controls. …

Member Avatar for djjavo
0
2K
Member Avatar for khizer03

What kind of database? What is your level of expertise with databases/VB? Do you mean a process like [code] get username and password from text fields on a form compare to list of valid usernames and passwords from the database if username and password were found in the database let …

Member Avatar for Reverend Jim
0
293

The End.