1,857 Posted Topics

Member Avatar for westsiderailway

When you call form2 create a new instance of it, then when it closes you can still access the values in any of the properties and/or controls. A good way to tell when the form closes is by using the ShowDialog method which returns a dialog result when the form …

Member Avatar for deceptikon
0
1K
Member Avatar for Yeonng

It looks to me if the dates are stored as strings you'll have to convert them to a date type to be able to compare the months like that.

Member Avatar for Yeonng
0
1K
Member Avatar for vampersie

2 things I noticed, . If returnprice is returning an int then price should be an int not a string. Class B has no public: modifier, therefore nothing is visible outide the class.

Member Avatar for vampersie
0
123
Member Avatar for Sara Tech

Instead of ReadAllBytes try the [BinaryReader.Read Method](http://msdn.microsoft.com/en-us/library/vstudio/ms143295%28v=vs.100%29.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1) which has an overload to fill a buffer on each read.

Member Avatar for tinstaafl
0
329
Member Avatar for clasp1

When you're using .net for a windows form project both the .net library and the C++ standard library are available. For many people, using the .net library is more intuitive. Also if at some point you branch out and start using other .net languages being used to the .net library …

Member Avatar for clasp1
0
653
Member Avatar for joester007

@TheRealSai you should start your own question. Remember to include the code you've done and details about where exactly the code is failing.

Member Avatar for JennyV143
0
256
Member Avatar for moon.fall.58

For your purposes you're probably better off returning the value you want rather than passing an address to the function. Your code becomes much more readable and easier to understand. Here's a few simple improvements to your code: #include <iostream> //cout and cin #include <string> //for string use #include <conio.h> …

Member Avatar for tinstaafl
0
567
Member Avatar for royi.navon

One idea is to start by telling us what the program is and isn't doing right. Especially since aside from needing the output formatted better, this seems to do what you want.

Member Avatar for tinstaafl
0
137
Member Avatar for klemek

We need to see a sample of the data. The code is trying to read half the file into one array then the other half into a different array, sequentially. If the data isn't set up that way then your code won't work right. In order to fix it we'll …

Member Avatar for richieking
0
148
Member Avatar for saja.omarii.7

If you actually read the rules before you posted this, you would see how inappropriate the post is. This site basically helps those that helps themselves. Show some effort with a specific problem and people will be more than happy to help. But we won't do your homework for you. …

Member Avatar for Jamblaster
0
338
Member Avatar for princessophia

Consdider the following function that will take any string such as you described and offsets each character by a value of 1 , loops back to 'a' and keeps any capitalization: string EncryptString() { string retval; for(int i = 0; i < theString.length(); i++) { //temporary variable to hold each …

Member Avatar for tinstaafl
0
1K
Member Avatar for KAMAE94

Whichever sort algorithm you use you have 2 main choices, either change the gpa array with the same index parameters you're changing the ID array with. Or, use a custom class and put the data in an array or vector of that class. This way the data is strongly coupled …

Member Avatar for iJimJones
0
160
Member Avatar for Deep Modi

A richtextbox is designed to allow different font, foreground and background colors for every letter. Here's the [documentation](http://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox%28v=vs.110%29.aspx) for it

Member Avatar for Deep Modi
0
271
Member Avatar for beastie805

Saying you get a bunch of errors doesn't help anyone give an answer. You have to itemize the error messages you're getting, especially the line it's pointing to. One problem you have is you're using `NUM_STUDENTS` but it's not defined any where in your code. Another problem, you're trying to …

Member Avatar for beastie805
0
2K
Member Avatar for saja.omarii.7

According to this quote from an [online reference](http://www.cplusplus.com/doc/tutorial/control/) >Notice that switch can only be used to compare an expression against constants. Therefore we cannot put variables as labels (for example case n: where n is a variable) or ranges (case (1..3):) because they are not valid C++ constants. > If …

Member Avatar for saja.omarii.7
0
381
Member Avatar for apohbakuteh

In the answers in this [post](http://www.daniweb.com/software-development/vbnet/threads/461971/calendar-application), there are links to examples.

Member Avatar for apohbakuteh
0
149
Member Avatar for PulsarScript

Hard to tell for sure, but it seems to me that you want to randomize the background color. Simply make an array of the color choices and get a random index to choose the color. If you need help with using the rand() function here's a [tutorial](http://www.daniweb.com/software-development/cpp/threads/1769/c-random-numbers) on it.

Member Avatar for owenransen
0
190
Member Avatar for castajiz_2

To me one of your first steps would be to design a class(es) to hold the meaurements and the methods for making your calculations. One word of advice the math looks like it will get fairly complicated, so making the property names verbose and meaningful will help you keep the …

Member Avatar for ddanbe
0
192
Member Avatar for supernova122

If your original code was referencing .net1.1 then you try and load it as .net2.0 these sorts of thing can happen. You should start a new project then copy the code over and fix it from there.

Member Avatar for tinstaafl
0
381
Member Avatar for prashantsharmazz
Member Avatar for Nebil

It sounds like you're making it more complicated than it needs to be. A ListView was designed for this type of data. Set the View property to details and set the columns up. Now each row belongs to separate item. If you must insist on using a rtb the Lines …

Member Avatar for tinstaafl
0
251
Member Avatar for smitty68503

The first thing I'd suggest is using a MaskedTextBox. You can set the format to be only integers. Then handle the Validated event to check for divisibility by ten. The mod operator returns the remainder from a division. So if the quotient is 0 the dividend is exactly divisible by …

Member Avatar for raidenx44
0
365
Member Avatar for Mafiamanandre

One way is to create a class(`Public Class User`), with username, password, user type and time to expire as properties. My.Settings will accept objects so a List(Of User) can be stored and read quite easily. How this is implemented can be refined when you show the code for the project …

Member Avatar for joshl_1995
0
179
Member Avatar for chdboy
Member Avatar for deceptikon
0
3K
Member Avatar for daino

try googling 'c++ library Base85' That showed me a c++ source, a vb source and a c source and a fairly simple tutorial as well, all in the first page.

Member Avatar for daino
0
1K
Member Avatar for vampersie

Here's an [article](http://v2.cplusplus.com/faq/sequences/strings/split/) that discusses several options for splitting string in c++.

Member Avatar for tinstaafl
0
203
Member Avatar for pritaeas

A curious thing. It formats properly when the section is made longer, i.e. when a tag is added. Couldn't the code detect long names and just make the section longer? ![a2722d58835c0315abca502bc68ef63d](/attachments/large/3/a2722d58835c0315abca502bc68ef63d.jpg "a2722d58835c0315abca502bc68ef63d") I see this in firefox win7

Member Avatar for pritaeas
1
226
Member Avatar for Guruprasad_1

The error code you're getting indicates that one of the arguments isn't valid. Here's the [msdn article](http://msdn.microsoft.com/en-us/library/windows/desktop/ms221283%28v=vs.85%29.aspx) that outlines all the pariculars.

Member Avatar for Guruprasad_1
0
466
Member Avatar for humorouscheese

One option is to keep the button's enabled property to false until both textboxes have data. One way to keep track of that, without extra global variables, is to use the Tag property for each textbox. You could use a common validating event handler for the 2 textboxes to check …

Member Avatar for tinstaafl
0
240
Member Avatar for refphlex
Member Avatar for tinstaafl
0
239
Member Avatar for strongard63

One thing that might help is write the bytes to a file and use a Hex Editor to see what the individual bytes are. Decoding from binary is in a class all its own, since you have no idea how many bits make up a byte and how many bytes …

Member Avatar for ddanbe
0
203
Member Avatar for castajiz_2

The for loop has these part, for(initialize counter;set condition that while true the loop will run;set increment). In your example the counter(n) is already initialized so that part is skipped. The loop will run as long as the counter(n) is not 0. In each iteration of the loop the counter(n) …

Member Avatar for Ketsuekiame
-1
173
Member Avatar for joester007

A couple of things I noticed. Several of your functions are supposed to return an Integer and your returning a String. This is a sloppy habit to get into and can create huge problems in a large project. One way to guard against this is to set Option Strict to …

Member Avatar for joester007
0
158
Member Avatar for VUEKID

What is your code doing or not doing that you want changed? What is a sample of the data in the text file?

Member Avatar for tinstaafl
0
195
Member Avatar for frlg

Not sure what your question is. The `genera_archivo()` sub routine is already reading the elements of your structure. To read a file instead of writing to a file, you could use `ifstream` and just change the operator to `>>`. On a side note, you're incrementing `i` twice every time you …

Member Avatar for tinstaafl
0
122
Member Avatar for boher

something like this should work: Dim NewLabel as Label NewLabel.Text = Date.Now.ToString For i=1 to DataSet.Tables("myTable").Rows.Count Dim Row as Datarow = DataSet.Tables("myTable").Select("ID = " & i) Dim Time as Date = Row.Item("Time") If(Time < Date.Parse(NewLabel.Text)) Then NewLabel.text = Time.ToString() End If Next FlowLayoutPanel.Controls.Add(NewLabel)

Member Avatar for chuchaykaw18
0
267
Member Avatar for Nebil

If you declare it at class level(outside any subs or functions), then any routine can access it.

Member Avatar for tinstaafl
0
182
Member Avatar for xxn5

Something like this might help: For Each file As String In Directory.GetFiles("C:\", "*.mp3") File.Copy(file, "MyNewDirectory\" & Path.GetFileName(file)) Next If you need to do it with only the names in the listbox For Each name As String In ListBox1.Items File.Copy("C:\" & name, "MyNewDirectory\" & name) Next If you want the original …

Member Avatar for chuchaykaw
0
218
Member Avatar for Deegirl

If this is for a custom class, VB is probably suggesting that you also have a default New constructor: Public Sub New() intProdNumber = 0 End Sub It's ok to have both. Also remember your constructors should initialize every member of your class

Member Avatar for chuchaykaw
0
223
Member Avatar for Mafiamanandre

Your first step will probably be to add a Login form to your project. The template is included in VB.net. Just use the Add-New Item option. At this point you have the form elements needed to process the login. One option to store the data for each user, is to …

Member Avatar for Reverend Jim
0
2K
Member Avatar for VUEKID

This [post](http://www.daniweb.com/software-development/cpp/threads/402920/a-litttle-problem-with-file-handling) should help

Member Avatar for mike_2000_17
0
2K
Member Avatar for VUEKID

It's hard to tell exactly what you mean without functioning code. The snippet you gave, isn't complete and it's not formatted at all.

Member Avatar for tinstaafl
0
180
Member Avatar for _Devower
Member Avatar for tinstaafl
0
2K
Member Avatar for laura301019

One option would be to use php. Here's an [open source project](http://sourceforge.net/projects/wass/?source=navbar) that seems to do what you want. Here's an [example in ASP.net](http://www.codeproject.com/Articles/31766/DayPilot-Scheduler-Control-for-ASP-NET), which might help

Member Avatar for laura301019
0
147
Member Avatar for strongard63

I suspect the code is shown using hexadecimal(base16), which is composed of numbers and the letters A-F. If this is correct, the code, will most likely, have to be broken down into 2 character strings and converted to 8-bit bytes(base10), assuming ASCII encoding and not Unicode.

Member Avatar for ddanbe
0
199
Member Avatar for TheNewKid

Since you're starting with a standard button and modifying it, you should have access to the MouseEnter event. Put your code to change the button in there. Setting the [TransparencyMask of the Bitmap](http://msdn.microsoft.com/en-us/library/vstudio/system.windows.forms.controlpaint.createhbitmaptransparencymask%28v=vs.100%29.aspx) Should help in what you want. One alternative to the button is the label. By changing the …

Member Avatar for tinstaafl
0
291
Member Avatar for joester007

What he most likely means is that each button will pass both operands and a code for the operation required to a sub routine named results that will carry out the required operation and output the result. If you look at your code you'll see how there are several blocks …

Member Avatar for tinstaafl
0
188
Member Avatar for DawnofanewEra
Member Avatar for Vasthor

it seems to me that to use the (size_t,char) string constructor you should probably be constructing a new string. Something like this should work: Screen::Screen(pos ht, pos wd) { contents = string(ht*wd, ' '); height = ht; width = wd; cursor = 0; } Screen::Screen(char c, pos ht, pos wd) …

Member Avatar for tinstaafl
0
296
Member Avatar for mcoliver88

Since this is a different question you should really start your own. A word of advice, use real code. Pseudocode doesn't tell anyone about what kind of structure you're using or how any classes are set up, etc..

Member Avatar for bertha
0
321

The End.