We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
As programmer, your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better.
When you just ask for the solution, it is like trying to learn to drive a car by having someone else training.
Creating an algorithm is basically finding the maths and make necessary adaptation to fit your actual problem.
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
We have no idea what you have tried, what happened when you did, or what help you want from us.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
Hi, I'm creating a custom VScrollBar and I have problem getting the exact Y position of the thumb like the Windows.Forms.VScrollBar, I have searched online and I found some examples of custom scrollbars like:
The problem with these examples are that they don't get the exact top position of the thumb comparing to the windows scrollbar. I am getting a Top position that while scrolling becomes less than the real position
the problem is that the Y position I get is smaller than the position of the Windows Scrollbar.
I tested my custom scrollbar with the Windows scrollbar with the same Maximum, Minimum, LargeChange and SmallChange, and when I get a Y position of 45 the other has a Y position little bit bigger than 45. The difference between the Y positions gets bigger as a set the Maximum value bigger.
I would avoid the decimal type, what you need is either float or double, since ratio could be a very small number; decimal is fine for monetary amounts, not for arbitrary scaling. Have you ever looked at the actual values while debugging?
this is what is inside thumbSize. it works pretty well.
int trackHeight = (Height - (2 * topButton.Height));
int thumbHeight = (LargeChange / Maximum) * trackHeight;
I changed the values fromdecimal to float I'm still getting the same result. the thumb never reaches the bottom. I think there must be something else to add to the thumb position than I'm not adding.
If you can't reach the scroll's bottom, it means ratio is too small. As your math seems OK, I can imagine only two reasons:
1. a rounding down error, probably caused by a bad choice of data type (such as decimal only offering two fractional digits);
2. ThumbSize() returing too large a value; so please check and/or provide the exact code for that method.
Suggestion: take one example, note all the numbers, compare what they are (from logging or interactive debug session) with what they should be (manual calculation), you then should be able to see the error right away!
PS: ClientHeight isn't always the right value, e.g. when a HScrollBar appears, it reduces the VScrollBar's height!
Hello those who are reading, I am a beginner in programmer and currently frequent in C#. I am working on building a cross-platform mobile application and I am confused on what to do. I know what I want my application to do and I am done with making the sketches and connecting them. Now I do not know how to proceed. ANY HELP/ADVICE WILL BE VERY APPRECIATED. THANK YOU.
I am working on building a cross-platform mobile application and I am confused on what to do.
That comes as no surprise. You've taken on a task that's challenging even for an experienced programmer! I suggest you instead focus on learning the basics of programming, select a target platform like Windows command line or Windows Forms, and eventually learn how to program for a mobile platform like iOS or Android. One step at a time.