473,842 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

not display drawing in PictureBox

10 New Member
I used system.drawing. graphic in C# to draw the Rectangle and Ellipse in PictureBox. In my PC and other my buddy PC show the drawing graphic and color.
But my customer PC doesn't show the drawing graphic. In my customer PC, i already installed .net Frame Work 2.0 (SP1). I don't know why missing? I write code like this...

Pen penMi = Pens.Blue;

void DrawAllMi(Graph ics g)
{
g.DrawRectangle (penMi, x1 - 4, y1 - 4, 8, 8);
g.DrawEllipse(p enMi, x1 - 5, y1 - 5, 10, 10);
}
Feb 11 '09 #1
7 3846
falaque
12 New Member
hi
try putting this problem in windows programmig forum :), this is problem related to widows programmin it seems.
Feb 11 '09 #2
winzone
10 New Member
@falaque
Hi,
Is this not C# window programming section???
May i know specific link of C# window programming section.

Thanks
Feb 11 '09 #3
falaque
12 New Member
Yes you are right, this is C# section, and for windows programming also its ok. I was just trying to suggest that if you could post this problem in any windows programming forum you will have more scope of getting answer.
Feb 11 '09 #4
winzone
10 New Member
@falaque
thank,
i will try other section to get more scope of answer.
Feb 11 '09 #5
winzone
10 New Member
I used system.drawing. graphic in C# to draw the Rectangle and Ellipse in PictureBox. That PictureBox is 512x512 ratio. In my PC and other my buddy PC show the drawing graphic .

Problem is,in my customer PC, the drawing graphic not work well function and system draws many rectangles the whole PictureBox, cannot set position.

In my customer PC, already installed .net Frame Work 2.0 (SP1) and OS is Window XP. I don't know what missing? I write code like this...


Expand|Select|Wrap|Line Numbers
  1. Pen penMi = Pens.Blue;
  2. void DrawAllMi(Graphics g)
  3. {
  4.     g.DrawRectangle(penMi, x1 - 4, y1 - 4, 8, 8);
  5.     g.DrawEllipse(penMi, x1 - 5, y1 - 5, 10, 10);
  6. }
Feb 17 '09 #6
winzone
10 New Member
I used system.drawing. graphic in C# to draw the Rectangle and Ellipse in PictureBox. That PictureBox is 512x512 ratio. In my PC and other my buddy PC show the drawing graphic .

Problem is,in my customer PC, the drawing graphic not work well function and system draws many rectangles the whole PictureBox, cannot set position.

In my customer PC, already installed .net Frame Work 2.0 (SP1) and OS is Window XP. I don't know what missing? I write code like this...

Expand|Select|Wrap|Line Numbers
  1. Pen penMi = Pens.Blue;
  2. void DrawAllMi(Graphics g)
  3. {
  4.     g.DrawRectangle(penMi, x1 - 4, y1 - 4, 8, 8);
  5.     g.DrawEllipse(penMi, x1 - 5, y1 - 5, 10, 10);
  6. }
  7.  
Please give me suggestion,
Thanks.
Feb 17 '09 #7
Studlyami
464 Recognized Expert Contributor
This would be a better question for the C# forum.
Feb 17 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1958
by: Li Weng | last post by:
Hi, I have a form with a picturebox. I added an image in picturebox at design time. I create the form in codes with New and .Show() to pop up. But image doesn't show up. The picturebox looks transparent. Please help. Thanks in advance. Li
3
18493
by: Steve Montague | last post by:
I need to decode a base64 image and display it in a PictureBox control. Currently I get an "Invaild character in a Base-64 string." error, so not sure if a bad file or bad code, I have: byte arrBytes = new Byte; // read the file from disk System.IO.FileStream fs = System.IO.File.OpenRead("../../Photo.jpg"); arrBytes = new byte; fs.Read(arrBytes, 0, (int)fs.Length - 1);
2
20564
by: Bradley1234 | last post by:
Seems simple but Im missing something. In a C# form Ive got a picturebox and a button I have the File Open dialog linked to the button, but Im drawing a blank on how to take the stream and push the thing onto the picturebox. Here is the code, tia OpenFileDialog fileChooser = new OpenFileDialog();
13
3354
by: Metallicraft | last post by:
I have a vb6 application. On the main form is a picture box with one or two images and several pieces of text displayed in it. These are created on the fly using gdi32 routines that are all in a referenced, custom dll. I call a PrintImage routine in the dll and pass it only the the Picturebox.hdc from the main form. The dll's print routine draws to the hdc and it shows up in the picturebox perfectly. I would like to do a similar thing...
2
2168
by: active | last post by:
Problem: The PictureBox display appears to have the image cut off. I.e., the image bottom does not display although the PictureBox has room for it. It occurred to me that what was displayed was the same size as the PictureBox was before it was resized. So I figured the bitmap was too small and tried to increase it's size as shown below. Two things: First it didn't fix the problem. Secondly, I'm not sure I've done it correctly and...
0
3888
by: akh | last post by:
I want to use de Drag and Drop ´s event to move a picture box from a form and within a Picture Box. But I have behaviour if the MyPBox As PictureBox as the Globale varible or not Thanks for your help, Here is the code.
9
3193
by: davetelling | last post by:
I am not a programmer, I'm an engineer trying to make an interface to a product I'm designing. I have used C# to make a form that interrogates the unit via the serial port and receives the data. I want to be able to draw lines in a picturebox based upon certain data points I have received. I dragged a picturebox from the toolbar onto my form, but after having gone through the help files, looking online and trying a variety of things, I...
1
4258
by: MrNobody | last post by:
I have browsed the Net and found some library called DevIL which was ported to C# by some fellow but apparantly while itloads some tga files many times it fails, not sure why- no errors thrown just no image displayed in my PictureBox. And this is using the reference app that they made as well. Do you know any other library out there (free) that does this?
4
5608
by: gerardianlewis | last post by:
Any help appreciated. (VB.NET under XP and Vista, SP1 installed) My code, inherited from a VB6 version of an app that ran under W98, loads an image from a file into a PictureBox. The user may want to move or delete the file that is being shown. The corresponding event- driven code for "delete this picture" uses: My.Computer.FileSystem.DeleteFile(sPath)
0
9872
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9715
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10945
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10314
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9453
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7858
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7038
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5696
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4499
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.