4,901 Posted Topics

Member Avatar for juniorsilver

I'm old school. I prefer to do my insert queries using the connection object. An insert query looks like insert into tablename (col1name,col2name,col3name) values (col1value,col2value,col3value) In your case the connection object is named con so once you have composed your query in a string (let's call it query), you execute …

Member Avatar for Reverend Jim
0
152
Member Avatar for tallygal

[code] For i As Integer = 1 To 10 barChartListBox.Items.Add(New String("*", i)) Next [/code] adds * ** *** **** ***** ****** ******* ******** ********* ********** to the listbox. I comes out nicer with the Courier New font

Member Avatar for Reverend Jim
0
210
Member Avatar for Howdydoody
Member Avatar for Reverend Jim
0
104
Member Avatar for moparman426

First of all, when you post code, please do it without the line numbers. It screws up the formatting. Now for the problem. I presume that the letters you use are restricted to those on a phone keypad corresponding to the digits in the phone number. If so, you really …

Member Avatar for Reverend Jim
0
173
Member Avatar for lbgladson

Do you mean a string like "......"? Or do you mean a series of decimal numbers? I presume you know how to create a textbox control. Let's say you have one namex txtDecimals. You can refer to the text in the box by txtDecimals.Text. For example, to copy it to …

Member Avatar for Reverend Jim
0
114
Member Avatar for daniwaber

Put BeginUpdate() and EndUpdate() around the code. If your control is called rtbText then [code] rtbText.BeginUpdate() ' ' your update code goes here ' rtbText.EndUpdate() [/code]

Member Avatar for Reverend Jim
0
171
Member Avatar for marcogr8
Member Avatar for QuickBooksDev

Without having access to the site to play with, my first guess would be either that you have failed to fully qualify the file(s) you want to fetch or that you haven't issued a "CD" command (or possibly "CHDIR") to change into the correct folder on the remote site.

Member Avatar for Reverend Jim
0
233
Member Avatar for lbgladson

Let's look at fmtstr first. "{0, -18}{1, 10}" This says you want to format two items. The first item will be in a field that is 18 character wide. If you specified 18 (positive number) the text would be right justified in the field. Because is is given as -18 …

Member Avatar for Reverend Jim
0
127
Member Avatar for System Jay

The actual syntax of the SQL query is INSERT INTO table (col1name,col2name,...) VALUES(val1,val2,...) An actual example would be insert into mytable (first_name,last_name,notes) values("john","smith","heck of a nice guy"); with table named "mytable". An example in VB would be [code] firstname = "John" lastname = "Smith" notes = "a heck of a …

Member Avatar for Reverend Jim
0
183
Member Avatar for vasim jada

You never get the value of Student_profile from the database. You also stated that the type of that column was Yes/No. My SQL is somewhat rusty but you later say you want to test against the values "yes" and "No". I don't think that a Yes/No field is actually stored …

Member Avatar for Reverend Jim
0
866
Member Avatar for tstory28

This is not a newbie project. I've been programming for 35+ years I wouldn't begin to touch it.

Member Avatar for Reverend Jim
0
606
Member Avatar for pfm200586

try OriginalWord.ToUpper Like "*[AEIOUY]*" The pattern is "anything" followed by "any vowel" followed by "anything". Just leave out the "!"

Member Avatar for Unhnd_Exception
0
110
Member Avatar for wisedave

Microsoft sells a family pack which allows you to install Winidows 7 Home on up to three computers. As for upgrade/full, you can actually do a full (from scratch) install of Windows 7 from an upgrade disk. See [url]http://www.winsupersite.com/article/windows-7/clean-install-windows-7-with-upgrade-media[/url]

Member Avatar for caperjack
0
316
Member Avatar for markdean.expres

If you have a text field named txtMytext and it contains "abcdefghijklmnop" then the following code [code] txtMytext.Focus() txtMytext.SelectionStart = 3 txtMytext.SelectionLength = 6 [/code] will set focus to the control with "defghi" selected.

Member Avatar for markdean.expres
0
276
Member Avatar for bluehangook629

The syntax has changed. You can set it by [code] PictureBox1.MaximumSize = New System.Drawing.Size(200, 200) [/code]

Member Avatar for bluehangook629
0
129
Member Avatar for markdean.expres

If you want to retain the current font but just change the size you can use [code] listBox1.Font = New System.Drawing.Font(listBox1.Font.Name, fontsize) [/code] And specify your desired value for fontsize.

Member Avatar for Reverend Jim
0
678
Member Avatar for aznboi2010
Member Avatar for diamondw

Please take the time to ask a coherent question. If you can't be bothered to explaini it properly then don't expect a coherent answer. For example [quote]i wanted the inpu to be - number to be converted(text box)[/quote] I presume this means "The number to be converted is input by …

Member Avatar for diamondw
0
925
Member Avatar for vbnoob1

First of all you can't just do number = txt1.Text Because txt1.Text is a string. You have to convert it to a floating point value as follows number = CDbl(txt1.Text) Same thing applies to txt2.Text, txt3.Text and txt4.Text except you use CInt and make start, increment and finish Integers

Member Avatar for Reverend Jim
0
237
Member Avatar for butler1233

You can get the list of words into an array by [code] Dim words() As String = Replace(My.Computer.FileSystem.ReadAllText(filename), vbLf, "").Split(vbCr) [/code] To generate a random index for words you can call [code] Private Function Random(ByVal lo, ByVal hi) 'returns a random integer in the range [lo,hi] Random = lo + …

Member Avatar for Reverend Jim
0
136
Member Avatar for aadi_capri

Is it an actual database (regularly definied rows and columns) or is it a spreadsheet with varying fields depending on the row? In one case you CAN access the data using ADO (or whatever MS calls it now) and recordsets, etc. If not then you can access the rown and …

Member Avatar for Reverend Jim
0
227
Member Avatar for java_programmer

Is it a local router that you can cable into? It's possible that the router and your computer are using different types of encryption. For example, your computer may be set to WPA and your router to WPA2. If you can cable in you can check the settings on the …

Member Avatar for jingda
0
98
Member Avatar for XF15-Loader

Assuming level 1 takes 1 lego and given that level 4 takes 16, I am thinking that each level takes that level squared bricks. The first 4 levels then would take 1+4+9+16 or 30 bricks. Thus, an array is not needed. You start with a sum of zero then create …

Member Avatar for Reverend Jim
0
148
Member Avatar for bilal_fazlani

That's exactly how it is done. The items are added as follows: [code=vb.net] item = New ListViewItem 'create new listview item item.Text = col1text 'add column 1 item.SubItems.Add(col2text) 'add column 2 item.SubItems.Add(col2text) 'add column 3 listView.Items.Add(item) 'add item to listview [/code]

Member Avatar for Reverend Jim
0
197
Member Avatar for moparman426

First of all, please repost the code without line numbers. It screws up the formatting. Also, a suggestion to simplify your code. Create the nine digit buttons and name them btn0, btn1, etc. Create a button click handler for one button then modify it as follows: [code=vb.net] Private Sub btn0_Click(ByVal …

Member Avatar for Reverend Jim
0
158
Member Avatar for markdean.expres

Why not just use the screensaver settings to lock the computer after a specified period of inactivity?

Member Avatar for NetJunkie
0
129
Member Avatar for Reverend Jim

Well, this is embarrassing. I had to completely rebuild my laptop from scratch. I usually keep 3 or 4 items pinned to the taskbar and launch them with WINKEY-1, WINKEY-2, etc but somehow or other this no longer works. I really should know how to do this but I just …

Member Avatar for caperjack
0
125
Member Avatar for Chins

Check out SpinRite at [url]http://www.grc.com/spinrite.htm[/url] They have an excellent video on what the software can do.

Member Avatar for benmar
0
754
Member Avatar for Reverend Jim

I have an app I wrote in Python/wxPython. When I click a button, the action that is taken will depend on whether or not a modifier key (such as CTRL) is currently pressed. I can't toggle a swich based on a keypress event (eg ctrldown = True or False) because …

Member Avatar for Reverend Jim
0
169
Member Avatar for WolfShield

I'm no great fan of C++ but rather than awaiting the death of C++ I would much rather see the demise of programmers who write butt-ugly code regardless of the language. My elder son recently completed his PhD in computational bio-physics and I perused a lot of C++ code over …

Member Avatar for Netcode
0
1K
Member Avatar for pennywise134
Member Avatar for pfm200586

If you have already covered arrays then I suggest you use an array to hold the random numbers. You start with no random numbers in the array. Your outer loop will terminate when you have generated the 6 required unique numbers. Inside the loop you can generate a random number …

Member Avatar for JoshuaBurleson
0
333
Member Avatar for kes166

First of all, you shouldn't copy actual executables to that location. If you have a look you will see that it has "lnk" files there which are shortcuts to the actual executable files. So for starters you could create just a shortcut there and put the executable anywhere. If the …

Member Avatar for Reverend Jim
0
142
Member Avatar for thetraeller94

If you have it pinned to the taskbar you can press and hold CTRL+SHIFT and left mouse click on it, or you can right mouse click and select "Run as Administrator". You will be asked to confirm your action. The app will run with elevated rights.

Member Avatar for NetJunkie
0
2K
Member Avatar for mnewsome

Unless they have totally changed Virtual PC in the last three years, VPC is not an operating system. It is an environment which created virtual machines. In other words, you run VPC, then create a virtual machine into which you install whatever OS you want to run. If you have …

Member Avatar for Seten
0
134
Member Avatar for lollqt

A better way to generate non-repeating random sequences (for example, dealing cards from a deck) is to start with your array, Amount, then generate a random integer from 0 to last (where last is initially set to Ubound(Amount). When you generate your first random index (let's call it rind), adjust …

Member Avatar for Reverend Jim
0
391
Member Avatar for aripaka

You can try running Trend Micro Housecall from [url]http://housecall.trendmicro.com/uk/[/url] If you can't do this online, you can download (from another computer) and burn a boot CD or USB boot stick. Boot off the media of choice and disinfect.

Member Avatar for r.sergio
0
306
Member Avatar for raaif

You can't use the class name as a variable. You have to declare the class as follows: [code] Public Class cust Private m_inputstr As String Public Property inputstr() As String Get Return m_inputstr End Get Set(ByVal value As String) m_inputstr = value End Set End Property End Class [/code] Then …

Member Avatar for raaif
0
372
Member Avatar for anonimous
Member Avatar for harinath_2007

This usually happens when you have failed to specify a boot device. Did you tell vmware (via the settings) to use the physical CD/DVD device on your computer? The alternative is to make an iso file from your XP CD/DVD and make sure it is mounted. Both options are set …

Member Avatar for caperjack
1
3K
Member Avatar for anonimous

If the quantity for discount varies from item to item then I suggest you add it as well as the discount to your listview as a subitem. That way you wouldn't have to hardcode a test for each type of item. Also, your insert query is independent of the item …

Member Avatar for adam_k
0
2K
Member Avatar for x38class
Member Avatar for deepanbecse

The following code scans the first 500 rows and 20 columns of all worksheets and writes the values of all cells that start with the letter "c". [code] Imports Excel = Microsoft.Office.Interop.Excel Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim xls As …

Member Avatar for Reverend Jim
0
1K
Member Avatar for skypilotpete
Member Avatar for Reverend Jim
0
392
Member Avatar for saba kausar

I found "Mastering Visual Basic 2008" (Evangelos Petroutsos - Wiley Publishing) to be a very good book. There is a VB 2010 edition as well.

Member Avatar for Netcode
0
163
Member Avatar for theonebit

Can you please describe (in words instead of code) what it is you are trying to do? In other words, if I was the programmer, what would you tell me in order for me to write the program without any further input from you?

Member Avatar for theonebit
0
206
Member Avatar for OblibSystems

I did exactly the same thing this summer to troubleshoot a problem with my Rogers Rocket Hub at the cottage. Do you have a question? You don't require a CMD session to execute the ping. A simple (simple enough for my purposes) ping function is [code] Private Function PingStatus(ByVal addr …

Member Avatar for Reverend Jim
0
123
Member Avatar for rbrnkr

Try this [code] Dim lines() As String = Split(My.Computer.FileSystem.ReadAllText(myfile), vbCrLf) dim flt() as string = Filter(lines,"Joe Blow") [/code] This will give you an array containing only the matching lines.

Member Avatar for Reverend Jim
0
159
Member Avatar for moparman426

Let's try to make it clear with an example. Take the number 9184 or 9 1 8 4. Add 7 to each digit giving 16 8 15 11 Take the remainder after dividing by 10 giving 6 8 5 1 Swap digits 1 & 3 giving 5 8 6 1 …

Member Avatar for Reverend Jim
0
222

The End.