1,857 Posted Topics

Member Avatar for soche123

Here's a place to start [Click Here](http://www.daniweb.com/software-development/cpp/threads/148432/how-do-i-count-words-in-a-string-properly)

Member Avatar for new_developer
0
183
Member Avatar for Mr.M

If you use a list of strings and the readalllines and the writealllines methods, you can read manipulate and overwrite the file without any extra coding. Here's one way of doing it: Imports System.IO Imports System Imports System.Linq Imports System.Collections.Generic Imports System.ComponentModel Imports System.Drawing Imports System.Text Imports System.Windows.Forms Public Class …

Member Avatar for aman'z
1
2K
Member Avatar for jony_munsi

Since you're coding a console app, use console.readline and your input will be a string. from there simply validate that each character is a digit, and a for loop can easily parse the string into the values you want.

Member Avatar for tinstaafl
0
149
Member Avatar for kamalashraf

One caveat to bear in mind with the algorithm you're using. If any one of the sides is half of the perimeter the algorithm will return 0. For Example 10, 20 ,30, s will equal 30, when you subtract c from s you end up with 0, which makes the …

Member Avatar for tinstaafl
0
270
Member Avatar for soche123

First off you seem to want to declare some chars, but you're not giving any of them a name. Secondly the cout statement on line 12 is missing the statement terminator `;` Thirdly none of the cout's will execute unless the number entered is exactly one of those grades, except …

Member Avatar for tinstaafl
0
629
Member Avatar for o Chantelle o

FillRectangle expects a Brush not a Color, but if you instantiate a Brush derivative(i.e. SolidBrush), you can set the color property using the Color.FromARGB overload that accepts just the RGB values and assume and Alpaha value of 255 (fully opaque). Private Sub ListBox10_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) …

Member Avatar for o Chantelle o
0
2K
Member Avatar for Anark10n

Have you tried running just the compiled code without the VS2010 running? I've heard some people have trouble running VS2010 on Win7/8. I think some have had better luck using the XP Compatiblity Mode.

Member Avatar for rubberman
0
325
Member Avatar for o Chantelle o

there are several ways to do that. Hard code ths list as data inside the program, use progam settings, external file, database, have a webite or ftp site with a file, are just some of the ways this could be accomplished. To find out for sure you'd probably have to …

Member Avatar for o Chantelle o
0
131
Member Avatar for kipslem

The split function will do the job: Dim MyString As String = "ajasasaj$testing%878788%%$lkshhajsjah" 'This splits a the string, by the "$", into an array Dim MySplitString() As String = MyString.Split("$") 'This gives the number of records Dim Cnt As Integer = MySplitString.Count 'This joins the string back together without the …

Member Avatar for kRod
0
212
Member Avatar for omgnametaken

something like this might work: for (double i = 5; i <= 23; i += 1.5) { textBox1.AppendText(i.ToString() + "\n"); } the output is: [0]: "5" [1]: "6.5" [2]: "8" [3]: "9.5" [4]: "11" [5]: "12.5" [6]: "14" [7]: "15.5" [8]: "17" [9]: "18.5" [10]: "20" [11]: "21.5" [12]: "23" …

Member Avatar for ddanbe
0
106
Member Avatar for vishalonne

Your code is close to correct, you were trying to access the groupbox just by it's name instead of as an object: foreach (GroupBox sgrpBox in batch_creation.ActiveForm.Controls.OfType<GroupBox>()) { if (sgrpBox.Name.Substring(0, 4).Equals("gBox")) { foreach (ComboBox comboBox in sgrBox.Controls.OfType<ComboBox>()) {....... When you cast the objects in the foreach loop as the specific …

Member Avatar for tinstaafl
0
668
Member Avatar for loso09
Member Avatar for Reverend Jim
0
2K
Member Avatar for zbzHenry

first off, you declared i as string, then you assign it an integer and compare it to an integer. Keeping Option Explicit On, helps to catch this kind of mismatch right away. Secondly, you've started a while loop based on the value of i, but you never change i so …

Member Avatar for Dili1234
0
614
Member Avatar for SLMQC

Basically all your message does is say something went wrong. Using the message directly from `ex` will give you a better idea of exactly want went wrong. Change the line to `MessageBox.Show(ex)`. Then make note of the exact message wording. That will determine how you proceed from there. Or better …

Member Avatar for Reverend Jim
0
263
Member Avatar for zachattack05

As with all software, when it no longer does everything that you need it to do, upgrade. The main caveat to that is if you're building secure applications and/or deploying for enterprise you'll probably want to stay current with the latest technologies.

Member Avatar for zachattack05
0
139
Member Avatar for vishalonne

Also the control will have a Parent property if you need to know which groupbox it is in. If your controls are added at design time, a couple of nested for each loops will allow you to add the same handler to each combobox. foreach GroupBox gb in Me.Controls.OfType<GroupBox>() { …

Member Avatar for tinstaafl
0
216
Member Avatar for Black_Lion

it might be better to use the oftype property in your foreach loop; public void ClearTextBoxes(Control control) { foreach (TextBox c in control.Controls.OfType<TextBox>()) { c.Clear(); } }

Member Avatar for annaharris
0
190
Member Avatar for ScubaSam

>[The types in System.Data.OracleClient are deprecated. The types are supported in version 4 of the .NET Framework but will be removed in a future release. Microsoft recommends that you use a third-party Oracle provider.](http://msdn.microsoft.com/en-us/library/vstudio/77d8yct7%28v=vs.100%29.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1) However that page does discuss using it.

Member Avatar for tinstaafl
0
180
Member Avatar for habenero

You can copy and paste the appropriate code snippet here, just click the 'Code' button, paste it in, and the code comes out nicely indented the same as Visual Studio. Add an explanation of what the code is not doing right, any error messages, and the relevant line throwing the …

Member Avatar for habenero
0
340
Member Avatar for Affable zaki

The first step is represent every type you want to convert as Tola. Doing this you get a table like this: Grams = 12.5 Tola = 1 Masha = 12 Ratti = 20 form this a simple formula will convert from any type to any type. Convert to quantity to …

Member Avatar for Affable zaki
0
5K
Member Avatar for jaejoong
Member Avatar for tinstaafl
0
78
Member Avatar for pwolf

It seems to me you're using the class without instantiating an instance of it. Perhaps something like this,`Data NewData;`, will help. Then use `NewData.loadDB();` to call the methods. Also just noticed, your datasource string seems to have an extra `'` in it.

Member Avatar for pwolf
0
262
Member Avatar for schroaus

You'll have to show how you're finding the mouse position. Most likely the rectangle holding the image is much bigger than the image. You could try resizing the rectangle, or calculating the center of the image and use that as an offset. One way to make the character appear to …

Member Avatar for schroaus
0
704
Member Avatar for sushants

[realloc](http://www.cplusplus.com/reference/cstdlib/realloc/?kw=realloc) void* realloc (void* ptr, size_t size); Reallocate memory block Changes the size of the memory block pointed to by ptr. [free](http://www.cplusplus.com/reference/cstdlib/free/) void free (void* ptr); Deallocate memory block A block of memory previously allocated by a call to malloc, calloc or realloc is deallocated, making it available again for …

Member Avatar for deceptikon
0
163
Member Avatar for missc
Member Avatar for tinstaafl
0
170
Member Avatar for dhimanbiswas4u

If you create a webbrowser control, then create an htmldocument from a URL loaded in that control, you now have acces to all the elements in the web page and can access any values in those elements, even get the outer html code for any specific element. Public Class Form1 …

Member Avatar for tinstaafl
0
273
Member Avatar for Chan2013

> How do I return the value of a custom property in Word 2007 using VBA? Where is the property? And where do you need to put the value? What code have you got?

Member Avatar for Chan2013
0
310
Member Avatar for Kratoswoo

Where's your code that fills the comboboxes? What are you using for a data source? If it's a file, we need to see a sample of that. If it's a database we need to see the table structure and how your connecting and querying.

Member Avatar for tinstaafl
0
65
Member Avatar for anibal.zuniga.5

I would suggest using a custom structure(StoreItem) for each item chosen with name, quantity, price per each, total cost, and discount as properties of the structure. You might have a method to adjust discount terms Then another structure(Order) that containbs a list of StoreItem, subtotal, tax, net total as properties. …

Member Avatar for tinstaafl
0
123
Member Avatar for Affable zaki

Here's an article on the [HTML Document Class](http://msdn.microsoft.com/en-us/library/vstudio/system.windows.forms.htmldocument%28v=vs.100%29.aspx)

Member Avatar for Affable zaki
0
237
Member Avatar for newbie26

Your first place to start is use a more uptodate language. What you want to do is possible with the express versions of Visual Studio. Using VB6 is like chaining a steel ball to your ankle before you run a marathon, you've lost before you even start. Next you should …

Member Avatar for tinstaafl
0
110
Member Avatar for siddiquedu
Member Avatar for siddiquedu
0
386
Member Avatar for Vusumuzi

The pdf is probably an image of text. OCR or transcribing by hand are probably your only options. In this case it will probably be much faster to just transcribe it into notepad then copy and paste it here.

Member Avatar for chrispitt
0
145
Member Avatar for erinkay528

Your code was clos as written. A couple of things, you're incrementing a local variable in primecount, then displaying different variable in main. Also you're incrementing total in the wrong place, you need it after the end of the for loop, and just before you clear counter. Here's some adjusted …

Member Avatar for tinstaafl
0
329
Member Avatar for castajiz_2

Basically what happens is you end up with several copies of the function operating until the last one ends then they back up until the first one ends. so the for loops don't end when the new function is called, their execution is basically suspended until the call is returned. …

Member Avatar for ricky.subiantoputra
0
835
Member Avatar for Passoword!!

I'm pretty sure there is no native class or api for that. You'll probably have to open the file in binary mode and read, parse and write the data directly.

Member Avatar for Passoword!!
0
353
Member Avatar for JOSheaIV

Yopu might have to be a bit more specific on how you want to compare the arrays. If the arrays have the same values will they be in the same order? If the arrays are different sizes how do you want to handle that? if arrayA has 1,2,5,10 and arrayB …

Member Avatar for JOSheaIV
0
225
Member Avatar for ibr123

Here's some code to look at: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication12 { class Program { static void Main(string[] args) { int bbase = 0, playerNo = 0, dataentryerror = 0; int[,] PlayersStats = new int[12, 5]; while(true) { bool goodentry =false; while (!goodentry) { Console.Write("Enter …

Member Avatar for tinstaafl
0
135
Member Avatar for sumitrapaul123

Something like this should work: MouseDown -= OnMouseDown; DoubleClick -= OnDoubleClick;

Member Avatar for tinstaafl
0
115
Member Avatar for kalaithilak

Or do you want the second form to open inside the first form? If you start a new project using the application wizard and set it for Multiple document Interface, you get a working sample on how to set one up.

Member Avatar for mridul.ahuja
0
181
Member Avatar for Hnna

Take a look at this [thread](http://www.daniweb.com/software-development/vbnet/threads/118869/search-in-datagrid)

Member Avatar for tinstaafl
0
477
Member Avatar for yuvjeeth

If you add a reference(Project menu) to Microsoft Scripting Runtime, you'll have access to the FilesystemObject which has a FileExists method. Using that should give you what you want. btw joshl_1995 that's .net code

Member Avatar for mridul.ahuja
0
236
Member Avatar for PM312

This [MSDN Article](http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn.datasource.aspx) should help. Basically it appears you create a table with the data to populate the comboboxes, by querying the database, and set the comboboxcolumn datasource to the table.

Member Avatar for tinstaafl
0
523
Member Avatar for SLMQC

You have several options, the [Mid Statememnt](http://msdn.microsoft.com/en-us/library/aa266166%28v=vs.60%29.aspx) will replace a string within a string with characters from another string. You can use the [InStr function](http://msdn.microsoft.com/en-us/library/aa445031%28v=vs.60%29.aspx) to find the index of the string you want to replace. The [Len Function](http://msdn.microsoft.com/en-us/library/aa445063%28v=vs.60%29.aspx) can be used to find the length of a string.

Member Avatar for tinstaafl
0
293
Member Avatar for PM312

Put the event handler in your class using the handles clause. Private Overloads Sub Me_LostFocusByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LostFocus In your form have another event handler without the handles clause, use the addhandler statement instead. The one with the handles clause should run first AddHandler …

Member Avatar for PM312
0
176
Member Avatar for chrispitt

a function overload means you can accept different sets of parameters for basically the same function. an operator overload means you define how the operators(+,-, ++, --, etc.) work for your class

Member Avatar for tinstaafl
0
185
Member Avatar for PM312

Here's one way to do this. Make your own control: Public Class White_ReadOnly Inherits TextBox Public Sub New() [ReadOnly] = True BackColor = Color.White End Sub End Class With this you can add new ones dynamically, by adding this class to the end of your form code, and declaring it …

Member Avatar for PM312
0
1K
Member Avatar for sidyusuf
Member Avatar for tinstaafl
0
194
Member Avatar for LeNenne

Your problem could be here: `sourcefile1 = File2.Path & "\min"` your using min as a string constant isntead of a variable. Try this: `sourcefile1 = File2.Path & "\" & min`

Member Avatar for Jx_Man
0
210
Member Avatar for jaejoong

I don't see anything in that code that would cause that exception. How are you deploying the app?

Member Avatar for jaejoong
0
290

The End.