1,857 Posted Topics

Member Avatar for major_lost

Are you sure you copied everything, did you overwrite the stub you already started, did you add the missing `End Class` statement at the end of your code? The code works fine as presented. Here it is all together: Public Class Form1 Inherits System.Windows.Forms.Form Public mylbl(26) As Label Private Sub …

Member Avatar for major_lost
0
355
Member Avatar for emran.bader
Member Avatar for ImZick

Val doesn't recognize a ',' as part of a number and stops converting the string there. Thus you end up with 1+2+1 = 4. Try this instead: `TextBox4.Text = Format((Double.Parse(Textbox1.Text) + Double.Parse(Textbox2.Text) + Double.Parse(Textbox3.Text)), "Standard")`

Member Avatar for ImZick
0
241
Member Avatar for Martje

Here's a simple class that will print an image and a string to a page using the default printer. This may not do everything you want but it should be enough to show you what is required. You can use things like the image size to figure out what location …

Member Avatar for tinstaafl
0
350
Member Avatar for lo0lo0999
Member Avatar for tinstaafl
0
116
Member Avatar for ajonk

Here's a thought. They have this wonderful new tool out now, it's called a `Search Engine`, and one of the best ones can be found [here](http://www.google.com)

Member Avatar for ajonk
0
90
Member Avatar for brandon66

try For Each Value In Counts If Value = "Three" Then 'do something Else 'do something else End If Next

Member Avatar for brandon66
0
97
Member Avatar for sk8ergirl

perhaps something like this will work: protected void Page_Load(object sender, EventArgs e) { ShowColumns(); } protected void ShowColumns() { GridView1.Columns[0].Visible = RadioButtonList1.Items[0].Selected; GridView1.Columns[1].Visible = RadioButtonList1.Items[1].Selected; } protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) { ShowColumns(); }

Member Avatar for ddanbe
0
127
Member Avatar for tubzz

> i have initializing code in the begining for position in line 8 But in line 25 you need to assign it a value in order for the for loop to work Also your If statement in 30 shouldn't have a semi-colon. Your using a keyword to identify a variable, …

Member Avatar for tubzz
0
423
Member Avatar for willshed

Somtehing like this should work: Imports System.IO For Each Folder As String In Directory.GetDirectories("C:\Software Name\athletes") ListBox1.Items.Add(Folder.Split("\").Last) Next

Member Avatar for tinstaafl
0
224
Member Avatar for shanki himanshu

Code seems to work fine on my Code::Blocks 12.11 with Cygwin GCC compiler.

Member Avatar for shanki himanshu
0
137
Member Avatar for Mr.pc.online
Member Avatar for joshl_1995

If your string has a common delimiter, such as carriage return or period, you can use the Split function to split the string and store the pieces in an array. The Join function will then put the pieces back together with the delimiter.

Member Avatar for tinstaafl
0
360
Member Avatar for sonyj
Member Avatar for fx.eko
Member Avatar for write.me

Try this: static double computeVariance(ref double Variance, params int[] intValues) { int sum = 0; for (int n = 0; n < intValues.Length; n++) { sum += intValues[n]; } double avg = (double)(sum) / (double)(intValues.Length); double varSum = 0; for (int v = 0; v < intValues.Length; v++) { double …

Member Avatar for tinstaafl
0
155
Member Avatar for Lobster1071

Perhaps handling the [MouseHover Event](http://msdn.microsoft.com/en-us/library/vstudio/system.windows.forms.control.mousehover%28v=vs.100%29.aspx) will work

Member Avatar for tinstaafl
0
124
Member Avatar for siaosituimoloaublood

A couple of things: use the boolean result of TryParse to test if there is a number being entered, Dim ValidTest as Boolean = Integer.TryParse(txtPoints.Text, intSearchPoints) If Not ValidTest Then MsgBox "Please Enter a Valid Number" Exit Sub End If use a for loop whenever you know the exact number …

Member Avatar for siaosituimoloaublood
0
110
Member Avatar for kingk110
Member Avatar for rgilmore

There is a Read-Only Lines Property that is an array of strings that represent the lines in the textbox. You should be able to iterate through that, something like this: For I=0 to RichTextBox1.Lines.Length-1 'Access the specific line like this, RichTextBox1.Lines(I) 'And you can use the 'RichTextBox1.Lines(I).Contains("Some String")' method to …

Member Avatar for tinstaafl
0
167
Member Avatar for Counterpartz

Try this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Assign_4 { class Program { static double MeanVar(ref double mean, params int[] intValues) { mean = intValues.Average(); double variance = 0; for (int i = 0; i < intValues.Length; i++) { variance += Math.Pow((intValues[i] - mean), 2); …

Member Avatar for Counterpartz
0
310
Member Avatar for sarman.boyslo
Member Avatar for tinstaafl
0
2K
Member Avatar for mariozeph

Something like this might work for you: Dim Names As Dictionary(Of String, String) = New Dictionary(Of String, String) Dim open = OpenFileDialog1.FileName '// or you can specify the file path If IO.File.Exists(open) Then '// check if file exists Dim openFileLines() As String = IO.File.ReadAllLines(open) For Each line As String In …

Member Avatar for mariozeph
1
454
Member Avatar for PerplexedB
Member Avatar for <M/>

Main is your program's start point. Without that the program has no idea what to do first. Even if yopu want a certain routine to run first you have to call it from Main. Main is also where any parameters being passed are sent to. If you've been deleting things …

Member Avatar for tinstaafl
0
191
Member Avatar for AmrMohammed

There does appear to be a standard for biometric interfaces. Here's some articles about it: [Click Here](http://en.wikipedia.org/wiki/BioAPI) [Click Here](http://www.iso.org/iso/home/store/catalogue_tc/catalogue_tc_browse.htm?commid=313770) [Click Here](http://biometrics.org/bc2012/presentations/Standards/Tilton1130-1155.pdf) [Click Here](http://msdn.microsoft.com/en-us/library/dd401509%28v=vs.85%29.aspx)

Member Avatar for tinstaafl
0
101
Member Avatar for doraemon

The easiest might be to put the functions, subs you need into a code library(.dll). That way when you add it as a reference and import(vb)/using(C#) it you can use the routines in your new web app. This will simplify your learning curve somewhat. What I've found that works for …

Member Avatar for doraemon
0
1K
Member Avatar for spawn2004

It appears to me the structure of the data being added to vector is different than the file. You're putting flevel(str[5]) before str[0], if you're not parsing the data to account for that it will give you screwy results, when you save it. Also it looks like the '#' at …

Member Avatar for spawn2004
0
130
Member Avatar for xHellghostx

You might be making it too complicated. You could simplify the rules and post them on the form(eg. only first and last name, only letters and numbers, only spaces, apostrophes, and dashes for punctuation), then simply use Split to separate the names and check if the name is in the …

Member Avatar for Reverend Jim
0
4K
Member Avatar for chrisStark123

Then sort your list by amount, either as you add each one or later after it's complete.

Member Avatar for chrisStark123
0
140
Member Avatar for masterfact18

A [MaskedEdit Control](http://msdn.microsoft.com/en-us/library/aa733654%28v=VS.60%29.aspx) will restrict your input to numbers and you can specify a certain number of digits, and you can specify formatting as well.

Member Avatar for tinstaafl
0
186
Member Avatar for nitin1

One way is, to start with a couple of loops to run through multiplication tables, say 2 to 16, 2 to 5 times. For each answer convert it to a different base as a string then add the values of each digit together, and compare the result to the multiplier.

Member Avatar for tinstaafl
0
95
Member Avatar for blaze007

You could use a third array to hold the lines of strings. For each line in the string array .Split()[0] gets parsed to an int and put in array1, and .Split()[1] gets parsed as an int and put into array2. Here's a link to the [C# Programming Guide](http://msdn.microsoft.com/en-us/library/67ef8sbd%28v=VS.80%29.aspx) When you've …

Member Avatar for ddanbe
0
382
Member Avatar for sk8ergirl

try this: protected void btnDeleteFromListBox_Click1(object sender, EventArgs e) { GridViewRow row = GridView1.SelectedRow; GridView1.Rows.Remove(row); }

Member Avatar for BMXDad
0
288
Member Avatar for vatsal.jariwala.14

In both Visual C++ 2010 Express and Code::Blocks with the Cygwin GCC compiler, using,`#include <windows.h>` works fine.

Member Avatar for asifalizaman
0
20K
Member Avatar for masterfact18

It should work if you change all your `Or`'s to `And`s(i.e `If Val(Text10.Text) <= 100 And Val(Text10.Text) >= 97 Then`). Altenatively you might find this quite a bit simpler: Dim Score As Integer Score = Val(Text10.Text) If Score <= 100 Then If Score >= 97 Then Text11.Text = 1 ElseIf …

Member Avatar for tinstaafl
0
289
Member Avatar for masterfact18

In VB6 you can call the event handler the same as any sub, just use `Command1_Click` in the Click handler for Command2. It's probably cleaner to make the code in Command1 a separate sub routine or function and call it from each button. If you decide to change things down …

Member Avatar for masterfact18
0
237
Member Avatar for swathi sajja

Use a [Try-Catch](http://msdn.microsoft.com/en-us/library/vstudio/fk6t46tz%28v=vs.100%29.aspx) block

Member Avatar for tinstaafl
-1
99
Member Avatar for swathi sajja
Member Avatar for tinstaafl
0
92
Member Avatar for joshl_1995

try this: Dim NewItem As ToolStripMenuItem = New ToolStripMenuItem NewItem.Text = Line AddHandler NewItem.Click, AddressOf NewItem_Click ContextMenuStrip1.Items.Add(NewItem)

Member Avatar for ghincelino
0
269
Member Avatar for ironbrew

Try this [Click Here](http://msdn.microsoft.com/en-us/library/67ef8sbd%28v=VS.80%29.aspx). Use the examples you'll find in there to create your code, and when you have a problem getting your code to work then let us know

Member Avatar for tinstaafl
0
219
Member Avatar for robjackstewart
Member Avatar for ravenous
0
966
Member Avatar for sgw

At iteration 1861 you surpass the max for a signed long and it starts returning negative values. Try using `ulong a=i*i*i/2-3*i*i/2+3*i-1;`.

Member Avatar for asifalizaman
0
256
Member Avatar for Siberian
Member Avatar for monching

This [post](http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/45ba284f-d95c-44c6-b250-f347c0916b14/), might help.

Member Avatar for monching
0
94
Member Avatar for asifalizaman
Member Avatar for gamers18

if newItem is the structure your passing you could make your dictionary of that type, then add newItem directly to the dictionary. something like this might work: Dictionary<String, Item> dic = new Dictionary<String, Item>(); public void addItem(Item newItem) { dic.Add(newItem.getItemName(), newItem); } public void listItemInfo(String itemName) { Console.Write("Name: {0}\n", dic[itemName].getItemName()); …

Member Avatar for tinstaafl
0
5K
Member Avatar for Cameronsmith63

try this, Add the event handler when you create the control: for (int NumberofPictureBoxes = 0; NumberofPictureBoxes < NumberOfDirectories; NumberofPictureBoxes++) { PictureBox picture = new PictureBox { Name = "" + Guid.NewGuid(), Size = new Size(150, 150), Location = new Point(NumberofPictureBoxes * 152, 1), SizeMode = PictureBoxSizeMode.StretchImage, Image = Image.FromFile(ListOfPictures[NumberofPictureBoxes].ToString() …

Member Avatar for Cameronsmith63
0
219
Member Avatar for rendykvalentino.p

You'll have to show more code than that and explain a little better. That code first of all has nothing to do with clicking a button, and second of all doesn't do anything.

Member Avatar for tinstaafl
0
89
Member Avatar for tinstaafl

Here's a simple wrapper for printing text. Built as a class library, this can be used in any .net application. This has automatic word wrapping. I figured that using the new constructor to accept different parameters would easily allow for printing different documents with different settings. I included Name, Font, …

1
582

The End.