Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8871777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:04:37+00:00 2026-06-14T18:04:37+00:00

I am begginer in programming languages so I wanted to start with something easy

  • 0

I am begginer in programming languages so I wanted to start with something easy like Visual studio (Visual basic language). Currently trying to figure out why is it that using this kind of code, images inserted into my form via code is bigger then actually they should be…

My first project is to create analog clock that can be skinned via Photoshop, but this thing with image sizing is driving me crazy.

It would be very good if someone could explain me why is this happening…

Code and result below:

Public Class Form1

'25x25 white rectangle image
Dim rec As Image = Image.FromFile("c:\img\rectangle.png")

Private Sub pic_Paint(sender As Object, e As PaintEventArgs) Handles pic.Paint
    'Declaring graphics
    Dim g As Graphics = e.Graphics
    'Drawing image into PictureBox called pic
    g.DrawImage(rec, 200, 200)
End Sub
End Class

Outcome

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:04:38+00:00Added an answer on June 14, 2026 at 6:04 pm

    It’s possible you’re not running at 96dpi (your titlebar looks a bit big to me) or the 25×25 image you’re using has a DPI metadata field that tells GDI (the graphics system in Windows) to draw it with scaled dimensions.

    I recommend using the SetResolution method of the Bitmap class or fiddling around with the DrawImage overloads.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Begginer's question. I'm trying to write small piece of code in Visual Studio (VB.net)
I'am begginer in android programming and I'am trying to create app that is logging
I'm a complete begginer with Linq. And I woild like to know, if it
I am just begginer so sorry for my silly question. my model looks like
Hi i'm a c# begginer and i'd like to do a simple program which
this is a begginer question about including .rb files. I would like to have
I'm a begginer in Hibernate, and I'm trying to save test data into a
this is a really basic question I know, I am a begginer in Haskell.
I'm a begginer in cookies and stuff like that. I need to set a
so im learning php (begginer if you cant tell) and, im currently pushin/pulling data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.