ali raza

C#, .Net ,Asp.net and my thoughts

Category Archives: Windows form

How to resize image in .net

use follwing Code change image path at load event method for downloading Code Imports System Imports System.Drawing Imports System.Drawing.Imaging Imports System.Drawing.Drawing2D Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim WorkingDirectory As String = “c:\AliPicture” ‘create a image object containing a verticel photograph Dim imgPhotoVert As Image = [...]

Saving and Restoring Form Location

A common requirement for a form is to remember its last location. Usually, this information is stored in the registry. The code that follows shows a helper class that automatically stores information about a form’s size and position using a key based on the name of a form. public class FormPositionHelper { public static string [...]

How to fix the size of windows form at different monitor resolution

Some time developer/coder have to choose appropriate location of windows form on the screen, But limitation comes with the size and resolution of monitor. The solution is used Screen Class which gives right gives you working area of screen of monitor. Then Form load Event will look like this private void dynamicSizeForm_Load(System.Object sender, System.EventArgse) { Screen [...]

Follow

Get every new post delivered to your Inbox.