There is an Articles section, where you can submit articles and tips.
Roy.
There is an Articles section, where you can submit articles and tips.
Roy.
You say it doesn't work, but you don't explain how it doesn't work. Does it error, or just give the wrong answer? From what I can see, you check to see if root = NULL, which is good. But then you compare the values of root->right->data and root->left->data against n1 and n2. But what if root->right or root->left is NULL? Then it's data will be undefined, and the compare will fail. If it doesn't error out at this point, it may just go on to the else condition, which is fine. But as I said, I don't know how it is failing.
Roy.
You could implement the IComparable interface in your class, and then define the CompareTo function. Put your comparison logic in this CompareTo function. Then all you would need to do is call the Sort method on your collection. MyNewCol.Sort()
Roy.
I believe that what you did was, Ctrl K Ctrl H, which inserts a comment token. All you have to do to remove is it another Ctrl K Ctrl H.
Roy.
Could you try something like this: Read each xml file one by one, and as each file is handled, write a "handled" file in the directory. Once ALL xml files are handled, rename the "handled" files to "finished" files. Hope this helps. Roy.
Roy.
I've never done any gaming programming, so my idea may be way off, but... I assume that the circles are objects that maintain data about themselves. Could you have the circle objects keep track of what ray would intersect them? That way all the calculations would be done at the time of movement, and at the time the gun is fired, all that needs to be done is to check each circle to see if the shot qualifies as a hit.
Roy.
Tj. wrote:
i have made the form stretch to accomodate for buying new items, but it doesnt show in the schools screens due to their resolution. this is why i thought of a prent child form.
Instead of using parent/child forms, have you considered using a tab control with two or more tab pages? (I don't work with VB 6.0, so I can't give you specifics)
Roy.
I'm sorry but...? Why display a list of options, and then not allow the selection of any? :confused:
Roy.
led mike wrote:
Help... I know not of what you speak
They speak of "The Hitchhiker's Guide to the Galaxy" by Douglas Adams. The reference is to the question of Life, the Universe, and Everything. The answer is 42, but we don't know what the question is.:confused:
Roy.
I never liked Pluto as a planet anyway, so I'm just as happy it was demoted.
Roy.
Can you do something like this? Date= " & "'" & Now.ToShortDateString & "'" & _
Roy.
The : in the class declaration indicates that your class will inherite from some other class. In the example you gave: public class SampleClass: ExcelReport, IReport
SampleClass inherits from the class ExcelReport, and the interface IReport.
Roy.
Really? Application.Exit() should have closed the application, not just Form2. Hiding Form1 should not make a difference. Form2 isn't a separate application that you are spawning from the Form1 application, is it? Roy.
It is difficult to know for sure what your problem is, as you did not include all your code. For instance, what is the value of splitter, and what does your loop look like? Try stepping through your code and examining the value of dateopened, houropened, and whoopened. I think you will find that they all contain the same thing, an array with all the dates, all the hours, and all the whoopened. You might try modifying it like this: stringarray = s.Split(splitter); Console.WriteLine(Convert.ToString(stringarray[i*3])); Console.WriteLine(Convert.ToString(stringarray[i*3 +1])); Console.WriteLine(Convert.ToString(stringarray[i*3 +2]));
This is assuming that the first iteration of the loop, i is zero. I hope this helps. Roy.
btnClose.enabled = false
Roy.
The best way of doing this is to use radio buttons instead of checkboxes. That is what radio buttons are for. Roy.
The only way I have seen this work, is to go ahead and place all your panels on the form, one on top of the other. Then when you are not working on the panel that is currently on top, right-click on the panel, and select "send to back". Repeat this until the panel you want to work on is on top. I hope you don't have too many panels ;). Roy.
If txtPosition1.Text <> "" And txtPosition2.Text <> "" & txtPosition3.Text <> "" And _
The problem is with one of your and
s. You mistakenly used an &, which tries to do a bitwise and
instead of a logical and
. (Mixing up your C/C#/C++ with your VB?) This type of thing is hard to catch. Your brain sees what it wants to see. Roy.
Why do you need to use a check box? This type of functionality should be done with radio buttons. Roy.
Try this. Instead of wrapping your Application.Run
in a try..catch, write a new exception handler. (If I recall correctly, you wanted the application to end after an exception? That is the reason for the Application.Exit()
. If you don't want this, go ahead and remove it.) Good luck. static void Main() { Application.ThreadException += new ThreadExceptionEventHandler( MyExceptionHandler); Application.Run(new Form1()); } private static void MyExceptionHandler(object sender, System.Threading.ThreadExceptionEventArgs e ) { MessageBox.Show(e.Exception.Message); Application.Exit(); }
Roy.