Skip to content
VUBuddy

CS410 Midterm Subjective by Faisal

Visual Programming PDF 706 KBUpdated 23 Oct 2026
Midterm past paper CS410 Midterm Subjective by Faisal PDF 706 KB
vubuddy.com
Type
Midterm past paper
Course
CS410 Visual Programming
Size
PDF 706 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 706 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 23. Download the file for all 23 pages.

Rana Abubakar Khan

If you want to learn computer programming then contact with me

JOIN FB GROUP FOR VU HELP · MUHAMMAD FAISAL · MIT 4th Semester · Al-Barq Campus (VGJW01) Gujranwala · CS410 Short Questions for Mid Term Exams · CS410 - WINDOWS PROGRAMMING

Q.No.1 How can I use the CopyTo method of the Windows Forms controls collection to copy controls into an array?

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

Q.No.2 Differentiate pen &brush?

(Page#69) · PEN · Brush

A pen is a graphics tool that an applicationA brush is a graphics tool that a Windows for Microsoft Windows uses to draw lines based application uses to paint the interior and curves of polygons, ellipses, and paths Pens to draw freehand lines, straight lines, brushes use to paint shapes and curves. pens to designate trends in graphs and to Brushes to paint the sections of pie charts outline bar graphs and 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)

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?

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.

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)

  1. Logical
  2. Physical
All CS410 files →
CS410 Visual Programming All CS410 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.