4,911 Posted Topics
Re: You could also put all of the radio buttons inside a container like a GroupBox and access them all by [code] Imports System.Windows.Forms . . . For Each ctrl as Control In GroupBox1.Controls Debug.WriteLine(ctrl.Name) Next [/code] | |
Re: Can you please avoid convenient (for you) abbreviations? I assume f.k and p.k are foreign and primary keys. Also, some context would be nice. If you want help please do us the courtesy of providing as much information as you can. For example 1) how about some code for us … | |
Re: The easiest way to read in a text file is to do it all at once as in [code] Dim alltext As String = My.Computer.FileSystem.ReadAllText(filename) alltext = alltext.Replace(vbLf, "") Dim lines() As String = alltext.Split(vbCr) [/code] Or you can do it all at once by [code] Dim lines() As String … | |
Re: So you want someone to do all the work yet you can't even take the time to describe what the program does? Not cool. | |
Re: Based on what you've told us (which is nothing), neither do I. | |
Re: If you want to display text in a textbox you say [code] txtMyTextBox.Text = mystring [/code] If mystring contains vbCrLf (carriage return/linefeed) then multiple lines will be displayed (as long as you have enabled that in the properties for the textbox). If you want a more specific answer then ask … | |
Re: You can also use the syntax [code] Dim sqlQuery As String = "SELECT * FROM MyTable WHERE DateColumn BETWEEN @param1 AND @param2" [/code] | |
Re: You can't get something for nothing. If your virtual machine is honking back cpu cycles doing video conversion then there are fewer cycles left for other processes. If you limit the resources available to the virtual machine either by putting a ceiling on available memory or by lowering the priority … | |
Re: You could always boot off a linux live cd and copy the files to another folder or some other media. Have you tried running a CMD session as Administrator and rerunning cacls to /e /g everyone:f | |
Re: Go to control panel - > Windows updates -> view update history | |
Re: 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 … | |
Re: [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 | |
Re: This is a vb.net forum. What you posted was C or C++ code. | |
Re: 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 … | |
Re: 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 … | |
Re: 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] | |
Re: Show us what you have done so far. | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: This is not a newbie project. I've been programming for 35+ years I wouldn't begin to touch it. | |
Re: try OriginalWord.ToUpper Like "*[AEIOUY]*" The pattern is "anything" followed by "any vowel" followed by "anything". Just leave out the "!" ![]() | |
Re: 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] | |
Re: 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. | |
Re: The syntax has changed. You can set it by [code] PictureBox1.MaximumSize = New System.Drawing.Size(200, 200) [/code] | |
Re: 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. | |
| |
Re: 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 … | |
Re: 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 | |
Re: 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 + … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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] | |
Re: 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 … | |
Re: Why not just use the screensaver settings to lock the computer after a specified period of inactivity? | |
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 … | |
Re: Check out SpinRite at [url]http://www.grc.com/spinrite.htm[/url] They have an excellent video on what the software can do. | |
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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
The End.