1. Flow. All programs have a direction, i.e., they have a beginning, middle and an end.
2. Decision. All programs generally have decisions, i.e., if this condition, do this, else do that.
3. Repetition. It's a very rare program that doesn't need you to do the same thing in places. So, there's generally some looping structure that allows you to repeat the same code again and again without having to write the code out multiple times.
Everything else is just knowing the syntax of the language and how and when to apply these techniques.
Reuse code, if you repeating on 2 or more places consider put that inside a function and call it everywhere you need that code.
Application resources consume. For example you have a variable that will have values between 0 and 20, declare it as byte instead of int. Byte support number until 256 and only consume 1 byte, int support a number until 2.147.483.647 but consumes 4 bytes. If you are loading a list of objects this can have a huge impact on performance.
Comment code, give some hints of what you have done. When you have maintain code not developed by you, you will understand the importance of comment code.
Hi all, I have a program that wont support the windows messaging system, so i cant use "sendkey", it will accept keyboard input so if i could send keystrokes to the keyboard buffer this should work, I am trying to automate a proccess.
<DllImport("user32.dll", CallingConvention:=CallingConvention.StdCall, _ CharSet:=CharSet.Unicode, EntryPoint:="keybd_event", _ ExactSpelling:=True, SetLastError:=True)> _ Public Sub keybd_event(ByVal bVk As Byte, ByVal bScan As Byte, _ ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer) End Sub
'Example of use sending Scroll Lock Key to system ' This can send control charactors as per your requirement where sendkeys doesnot work. Public Sub Test() If GetKeyState(VK_SCROLL) = 1 Then keybd_event(VK_SCROLL, 0, 0, 0) keybd_event(VK_SCROLL, 0, KEYEVENTF_KEYUP, 0) End If End Sub
Good day, wonderful people of this forum. Please I am using crystal reports visual studio version CRforVS_13_0_15 and I am finding difficulty displaying the rows on separate pages. Displaying a row on a single page is not a problem. But let's say SQL query returns 30 records, these records should display on 30 pages separately. Which means every page will have different record. None of the fields is on the detail section. I appreciate your effort in advance. Many thanks
I personally like NSIS (no link as I am using my iPad), as it has tons of plugins and other utilities. The latest versions (3.0 betas) support both Unicode and ANSI encodings, switching with a simple directive.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???