Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
6
Posts with Upvotes
6
Upvoting Members
6
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #864
~23.6K People Reached
Favorite Forums

55 Posted Topics

Member Avatar for Knight_YUVA

Knight YUVA i would not recomend iether solutions to your post. Both contain bad programming practices. A better way is to use the the textboxs' validating event which is fired as the the textbox looses focus. See sample code: private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { e.Handled = (!char.IsDigit(e.KeyChar)) && …

Member Avatar for ChrisHunter
0
166
Member Avatar for beastie805

In function getdat(...) you have declared a local instance of infile which will will be a null value. Try parsing infile declare in function main() as a parameter in getdat(...).

Member Avatar for Ancient Dragon
0
193
Member Avatar for Milton Neal

I'm working on a bit vector class that I'm using in a current project. Basicly BitVector is a container class for storing and manipulating data a bit level. I have two member fuctions for "setting" and "getting" bits at a given index. // Returns the bit at the specified index. …

Member Avatar for Milton Neal
0
319
Member Avatar for Elias_3

try txtConvertedInches->Focus this should set focus to the textbox Cheers Milton

Member Avatar for Elias_3
0
207
Member Avatar for khorght

hid_write(hid_device *device, const unsigned char *data, size_t length); the 2nd parameter is an unsigned char pointer, ie pointer to a byte array. Have you tried using a byte array to send you data rather than a string?

Member Avatar for Nidal_1
0
920
Member Avatar for gobiking

In the case of testing for equality you would use OR ..... char sign; while(true) { ..... cin >> sign; if(sign == 'Q' || sign == 'q') break; // break from the loop. }

Member Avatar for Labdabeta
0
295
Member Avatar for sumbul.qaimkhani

The tax is a sliding scale, so what you have done needs to revised. Eg. if your income was $75,000, tax would be calculated as such. Total tax = $43,561 at 15% + (75,000 - 43,561) at 22% . Base your algorithm on this. Milton

Member Avatar for Milton Neal
0
154
Member Avatar for Ancient Dragon

Hi AD, maybe something like this: // vargs.cpp : main project file. #include "stdafx.h" using namespace System; static void UseVariableParameters(... array<Object^>^ list) { for ( int i = 0 ; i < list->Length ; i++ ) { Console::WriteLine(list[i]); } Console::WriteLine(); } static void DemonstrateVariableParameters() { UseVariableParameters("Help",2,3,4,5, '%d'); } int main(array<System::String …

Member Avatar for triumphost
1
687
Member Avatar for mc3330418
Member Avatar for rubberman
0
141
Member Avatar for Milton Neal

I'm re-kindling some of my C++ theory and was working through a C++ SringBuilder class I found on the net. I understand it all except the 2 operator methods. (See listing below). Can anyone explain what these operator methods are for and how and why you would impliment them. class …

Member Avatar for rstralberg
0
128
Member Avatar for emil.rubinic

String^ indata is declared as public so it will be accessible from Form1 as long as your SerialCommunication class is included in you Form1 class.

Member Avatar for emil.rubinic
0
84
Member Avatar for Mncedisi

My question is! This assignment is beyond the scope of a "beginners" C++ progamming level. So how did you advance to this level and "not know where to begin" ? Ok Maybe start by creating a class .. call it StockItem In this class I would add fields like... itemCode …

Member Avatar for Iyfjeyeon
0
182
Member Avatar for kamran.j

Hello Kamran Try this link http://www.cplusplus.com/reference/clibrary/cstdlib/strtod/

Member Avatar for kamran.j
0
222
Member Avatar for anonymous213

http://www.wisegeek.com/what-is-parksides-triangle.htm this should get you started Milton

Member Avatar for anonymous213
0
761
Member Avatar for streetalex310
Member Avatar for dot_binary

Try this http://blogs.msdn.com/b/nativeconcurrency/archive/2011/12/28/high-resolution-timer-for-c.aspx Milton

Member Avatar for Ancient Dragon
0
3K
Member Avatar for james.price.39501

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { FrenchFries ^ newfrm = gcnew FrenchFries(); if (comboBox1->Text == "French Fries") newfrm->ShowDialog(this); else this->Close(); } Milton

Member Avatar for Milton Neal
0
274
Member Avatar for triumphost

If this is a one of exercise, then you can always use GDI+ which of course supports the .PNG image format. Milton

Member Avatar for DeanMSands3
0
309
Member Avatar for triumphost

Box B In your constructor X1, Y1, X2 & Y2 are initized to 0. H and W are also initalized to 0. After your call to GetWindowRect() X1, Y1, X2 & Y2 are assign the desktop coordinates but H & W are still 0. You should provide some member functions …

Member Avatar for Milton Neal
0
231
Member Avatar for vytenis555

For simple byte arrays it is not necessary to use 'Byte Pointers' on the managed heap. triumphost code, of course is correct and works but declaring a byte array like this is more efficient. #include "stdafx.h" using namespace System; array<Byte>^ StringToByteArray(String^ Str) { array<Byte>^ bytes = gcnew array<Byte>(Str->Length); for(int I …

Member Avatar for Milton Neal
0
250
Member Avatar for jonnyboy12

> but i dont understand how i would apply this to somthing like a panel So you know that a Windows::Form::Panel does not support double buffering. ie no DoubledBuffered property. There are serveral way you can do this and the way I prefer is to create my own doubled buffer …

Member Avatar for jonnyboy12
0
300
Member Avatar for jonnyboy12

From you post I'm *guessing* that your app is a .NET winForms application. If so, have you tried enabling the double buffering property for the form. Milton

Member Avatar for Milton Neal
0
83
Member Avatar for chamika.deshan
Member Avatar for gethelpcpp123

Check your ascii values. Digits are decimal 48 to 57. If the password contains alpha characters (a->z, A->Z)and numeric(0->9) characters it is then refered to as alphanumeric. Cheers Milton

Member Avatar for WaltP
0
111
Member Avatar for jonnyboy12

Once you right click on a textbox it has input focus. So you can use its focused property (returns a bool value) if(textbox1->Focused) { ...... }

Member Avatar for Milton Neal
0
114
Member Avatar for CPEBB

The problem is in these lines: MinTotal, MaxTotal & Avr_Of_Total are declare as doubles, but you are using these as fuctions. cout << MinTotal(A)<<endl; cout << MaxTotal(A)<<endl; cout << Avr_Of_Total(A)<< endl; Cheers Milton

Member Avatar for CPEBB
0
382
Member Avatar for kase20
Member Avatar for Ancient Dragon
0
107
Member Avatar for slaythezeppelin

Move line 10 - using namespace std; before the reafFile(.....) function declaration in line 5. and all should complie ok.

Member Avatar for rubberman
0
165
Member Avatar for jonnyboy12

Double buffering your form will not help you out with your tabcontrol. Can you give more detail, are the background images on the tabpages? some code will help. Milton

Member Avatar for Milton Neal
0
136
Member Avatar for MatthewT

Try here for some useful information. [url]http://www.lvr.com/serport.htm[/url]

Member Avatar for VernonDozier
0
100
Member Avatar for hiddepolen

Check this is in your main() [code=c++] // Enabling Windows XP visual effects before any controls are created Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); [/code] I'm using 2008 and this is inserted automaticly when you create a new project. Maybe not so for 2010?? Milton

Member Avatar for hiddepolen
0
188
Member Avatar for lochnessmonster

Here is a link to the most commonly used built-in Exceptions. [URL="http://blogs.msdn.com/b/brada/archive/2005/03/27/402801.aspx"]http://blogs.msdn.com/b/brada/archive/2005/03/27/402801.aspx[/URL] There are several exceptions you can use for "Invalid Arguments". If nothing suitable follow Mike's post on creating your own exceptions:). Milton

Member Avatar for Milton Neal
0
79
Member Avatar for Martje

Set your pictureBox SizeMode property to AutoSize. [code=c++] this->pictureBox1->SizeMode = PictureBoxSizeMode::AutoSize; [/code] This will resize the pictureBox to the size of the image. Milton

Member Avatar for Milton Neal
0
2K
Member Avatar for georgy9002

Firstly you need some way of setting your draw character (ch). Either by having a property to initialise it or use your constructor. Secondly your rectangle class should have a Draw() method. Call it from your main ie. myRectangle.Draw() If you like you can even specify your draw character in …

Member Avatar for mtbs1826
0
172
Member Avatar for Alexkid

In your "progam_name.RC" file you will find the line: [COLOR="Green"][/COLOR]IDR_MAINFRAME ICON "res\\mfc_test.ico" Cheers Milton

Member Avatar for Alexkid
0
320
Member Avatar for fire_

This might help you get started [url]http://www.technofundo.com/tech/win/SNIcon.html[/url] Cheers Milton

Member Avatar for Ancient Dragon
0
85
Member Avatar for Mahsa_C++

Hello I assume that you are drawing the shapes you want directly on the forms graphics surface during the form's paint event. This will not work because the form has no knowlege of what's been drawn there and therefore can not scroll over it. One way to over come this …

Member Avatar for Mahsa_C++
0
534
Member Avatar for Milton Neal

Hi All This is more a discussion than a problem. :) I’m working on a small project that needs to be done in C++. Part of it requires that I maintain an array of file streams so that I can open serveral files at one time, read, write exchange data …

Member Avatar for Narue
0
245
Member Avatar for meepokman

Hi Since moving from VB6 to C++ .Net I've ported a few of my VB apps to C++ .Net. The approach I usually take is to start from scatch! In your case if you haven't done so already is to download the VB.Net version from the site you linked and …

Member Avatar for meepokman
0
284
Member Avatar for i_luv_c++

Try [COLOR="Red"]Clean Solution [/COLOR]then re-build it. In VS2008 it is in the [COLOR="Green"]Build[/COLOR] menu but not sure if it is the same for VS2010. Milton

Member Avatar for Milton Neal
0
112
Member Avatar for davyboi91
Member Avatar for Milton Neal
0
134
Member Avatar for frank754

It appears you are using C#? It would be better to post your thread in this area. You will get more responces there Milton.

Member Avatar for frank754
0
170
Member Avatar for Jennifer84

Hello Jenifer88 Your code is full of mixed Managed and Unmanaged code:-/ If you are going to write code in the .NET environment it is best to stick to managed code where possible. I've commented out the unmanaged code in you program and given you something to get going with. …

Member Avatar for Milton Neal
0
316
Member Avatar for homeryansta

Hi From reading the theads to your post, I understand that you want access to a control on a form outside of the class the form is created in. If this is what you are trying to do then there two ways to do it. One way (the prefered and …

Member Avatar for Milton Neal
0
200
Member Avatar for ccube921

Hi Need to add: [code=c++] return 0; [/code] at line 33 This will force a "return" from function "main" and terminate your program. Cheers Milton

Member Avatar for ccube921
0
208
Member Avatar for nolife

Hello array<Byte>^ is the correct syntax for a byte array in CLI/CLR. Trying to use to use it without the tophat "^" will generate a complier error. Syntax [code=c++] array<Byte>^ b = gcnew array<Byte>(1000); [/code] This tells the compiler to create a new array of a 1000 elements of the …

Member Avatar for nolife
0
166
Member Avatar for moteutsch

Hi Moshe A) If the RichTextBox is filling the entire form you can set the Dock property of the RTB to "Fill" and the size of the RTB will risize with the form. B) Or you can resize it this way: Get the size of the form's window before the …

Member Avatar for Milton Neal
0
122
Member Avatar for didijc

Hi Have you tried using: [code=c++] System::Windows::Forms::ControlPaint::DrawReversibleFrame(rect, color, style) [/code] It draws a rectangle directly to the screen (no graphics surface is required). Note that the rect is in screen co-ordinates. It requires 2 calls, the first to draw the rectangle and the second call will erase it. Let me …

Member Avatar for didijc
0
176
Member Avatar for W34531

Try something like this for your drawBlock method. [code=c++] void drawBlock (int p) { int width = p * 3; bool isodd = false; int oddrow = 0; int oddcol = 0; if(p % 2) // Test if odd; { isodd = true; oddrow = (p / 2); oddcol = …

Member Avatar for W34531
0
148
Member Avatar for Stefano Mtangoo

Hope this might clear this up for you. The notion of a [B][I]struct[/I][/B] in C++ goes far beyond the original consept of a [B][I]struct[/I][/B] in C. It incorporates the object-oriented notion of a [B]class[/B]. This idea of classes, from which you can create your own data types and use them …

Member Avatar for LordNemrod
0
101

The End.