Skip to content
VUBuddy

CS410 Midterm Solved Subjective with References

Visual Programming PDF 654 KBUpdated 23 Oct 2026
Midterm past paper CS410 Midterm Solved Subjective with References PDF 654 KB
vubuddy.com
Type
Midterm past paper
Course
CS410 Visual Programming
Size
PDF 654 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 654 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 12. Download the file for all 12 pages.

CS410 – Visual Programming

Solved Subjective Portion

Qno.1 How can I use the CopyTo method of the Windows Forms controls collection to copy controls into an array? (3)

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

Ref

Qno.2 Write a complete syantax of "Getparents" functions? What kind of value it return and when this function is use?

Qno.3 Differentiate pen &brush?

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.

Qno.4 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)? (5)

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

Qno.5 How Windows keep track of the files? (3)

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.6 Can you write a class without specifying namespace? Which namespace does it belong to by default? (2)

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.

a-class-without-specifying-namespace-which-namespace-does-it-belong-to-by-default- .aspx?topicid=2

Qno.7 "In the GDI environment there are two working spaces", Name these two. (2)

Answer: In the GDI environment there are two working spaces

  1. Logical
  2. Physical

Qno.8 how many kinds of macros are there?

  1. Object-like macros resemble data objects when used,
  2. Function-like macros resemble function calls.

Qno.9 What are the GDI environment working space names?

Answer: In the GDI environment there are two working spaces

  1. Logical
  2. Physical

Qno.10 List down three Pre-Defined GDI objects in window

Answer: Pre-defined GDI objects in Windows are: Pens Brushes Fonts Palettes

Qno.11 what are macros and its types? Explain it with example.

Example:-

Here’s a macro that computes the maximum of two numeric values:

#define min(X, Y) ((X)>(Y) ? (X)Y))

Explain

To define a macro that takes arguments, you use the #define command with a list of parameters in parentheses after the name of the macro. The parameters may be any valid C identifiers separated by commas at the top level (that is, commas that aren't within parentheses) and, optionally, by white-space characters. The left parenthesis must follow the macro name immediately, with no space in between

Qno.12 what is a process?

Answer: A series of actions or steps taken to achieve an end, a process is a collection of interrelated work tasks initiated in response to an event that achieves a specific result for the customer of the process.

ab&q=What+is+Process&oq=What+is+Process&gs_l=hp.3..0l4.1060964.1063012.3.1063209.15.

  1. 0.1.1.2.515.2870.0j11j2j5-
  2. 14.0.les%3B..0.0...1c.1.z147022bvT0&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&fp=1cb31f4b3 d702abf&bpcl=39650382&biw=1024&bih=624

Qno.13 briefly defines Modal Loop?

Answer: Modal loop is run by Modal dialogs and process message as does application message loop. That’s why program execution is transfer to modal loop so the modal loop itself gets messages and dispatch message.

Qno.14 Write windows Programming control process?

Answer: Edit Control Static Control

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.