- Type
- Midterm past paper
- Course
- CS410 Visual Programming
- Size
- PDF 2.6 MB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 97. Download the file for all 97 pages.
Q.No.1 How can I use the CopyTo method of the Windows Forms controls collection to copy controls into an array?
Answer: The CopyTo method will take the current controls collection and copy all the controls into an array. In order to use it, you must specify the array and the starting point. For instance, the following code copies the controls to the MyArrayOfControls array starting at the first element
Reference:
Q.No.2 Differentiate pen &brush?
A pen is a graphics tool that an application for Microsoft Windows uses to draw lines and curves A brush is a graphics tool that a Windows based application uses to paint the interior of polygons, ellipses, and paths Pens to draw freehand lines, straight lines, and curves. brushes use to paint shapes
pens to designate trends in graphs and to outline bar graphs and pie charts Brushes to paint the sections of pie charts and the bars in bar graphs. Q.No.3 It is sometimes more efficient for an application to draw directly in a window without relying on the WM_PAINT message. How this task can be accomplished (i.e. how can we draw in a window directly without using WM_PAINT message)?
(Page#167)
Answer: The task can be accomplished which is given below:-
This can be useful when the user needs immediate feedback, such as when selecting text and dragging or sizing an object. In such cases, the application usually draws while processing keyboard or mouse messages. To draw in a window without using a WM_PAINT message, the application uses the GetDC or GetDCEx function to retrieve a display device context for the window. With the display device context, the application can draw in the window and avoid intruding into other windows. When the application has finished drawing, it calls the ReleaseDC function to release the display device context for use by other applications. application draws a selection and an intervening WM_PAINT message occurs, the application must ensure that any drawing done during the message does not corrupt the selection. To avoid this, many applications remove the selection, carry out usual drawing operations, and then restore the selection when drawing is complete
Q.No.4 How Windows keep track of the files? (Page#78)
Answer: The system requires instance handles to keep track of all modules. The system assigns a handle to each copy of a running executable or .dll.
Qno.5 Can you write a class without specifying namespace? Which namespace does it belong to by default?
Answer: Yes, you can, and then the class belongs to global namespace which has no name. For commercial products, naturally, you wouldn’t want global namespace.
write-a-class-without-specifying-namespace-which-namespace-does-it-belong-to-by-default- .aspx?topicid=2 Q.No.6 " In the GDI environment there are two working spaces", Name these two. (Page#140)
Answer: In the GDI environment there are two working spaces
- Logical
- Physical
Q.No.7 How many kinds of macros are there?
(Page#40)
- Object-like macros resemble data objects when used,
- Function-like macros resemble function calls.
Q.No.8 What are the GDI environment working space names? (Page#140)
Answer: In the GDI environment there are two working spaces
- Logical
- Physical
Q.No.9 List down three Pre-Defined GDI objects in window. (Page#178)
Answer: Pre-defined GDI objects in Windows are:
- Pens
- Brushes
- Fonts
- Palettes
Related CS410 files
All CS410 files →- CS410 Midterm Solved Subjective with References Midterm PDF 654 KB
- CS410 Midterm Solved Papers Mega File Midterm DOC 132 KB
- CS410 Midterm Past Papers by Faisal Midterm PDF 751 KB
- CS410 Midterm MCQs by M Zahid Adnan Midterm PDF 588 KB
- CS410 Official Handouts Official handout PDF 5.1 MB Free
- CS410 Slides Lectures 1-30 Quiz RAR 11.4 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.