VS 2008 Drawing Circles At Run Time?

Jul 5, 2010

I've got a fun little question for you all. I am designing a program that allows you to click on a picture to input data in certain areas. What I want to do it pretty allow someone to take a look at a picture. Click the add point tool, then select an area on the picture where it places a circle. I then want them to be able to go back to the circle and modify data if necessary

View 8 Replies


ADVERTISEMENT

Drawing Circles In .NET?

Mar 22, 2010

However my m8 will support me with any problems about the server, but he doesn't know how to fix this one in the client.The Sub have to create random sized circles, which are showed when u just hit some **** in space.It works fine in VB6, but in .NET i got a lot of ISSUES:

Sub DrawHitCircles(ByRef accuracy As Short)
Dim GO As Single
Dim check As Short
Dim guns As Short

[code]....

View 5 Replies

VS 2010 Drawing Circles In A Chart Temporarily

Jan 13, 2011

Im drawing a chart based on values from a database as an image in a picturebox. I can then add lines and circles etc in the picturebox, so as to highlight areas in the chart.

The next step I would like to do is to have temporary lines and circles, so when I move the mouse, the circle grows or shrinks and only when I release the mousebutton the circle is assigned to the chart picturebox.

View 1 Replies

VS 2010 Drawing Circles, Rectangles, Elongated Shapes?

Apr 20, 2012

I would like to draw a rectangle on a form, for example to mimic a steel beam that is 6 metres long.Within this rectangle, there may be 4 "openings" or circles that mimic a diameter of 600mm, so i need to draw 4 circles within the rectangle, to indicate a beam that has 4 openings. Other issues I need to cater for is that one of the circles may not be in the centre, it may be slightly raised.The user can change the length of the beam and the size of the openings so i'd like to refresh my drawing to keep in line with this.

View 3 Replies

50 Random Circles With Different Colors?

Feb 9, 2011

I am working on a program to generate 50 circles starting with the smallest in the center of the form. The circles do not over lap and the appear to grow outward. Each circle has to be a random color. I have the code that generates what I need but all the circles are the same color. I was thinking about either using an array to hold each circle and color as to not assign the same color to all of them but not sure about putting a graphic in an array. I also think maybe a nested loop of some sort but was unable to figure one out.

Private Sub mainForm_click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Click
Dim penColor As New Pen(Color.FromArgb(Rnd() * 255, Rnd() * 255, Rnd() * 255, Rnd() * 255), 2)

[Code]......

This works to do what I need to get done, I just need each circle to have a random color as it is drawn.

View 2 Replies

Moving Circles Within A Form?

Aug 5, 2009

The purpose of this (maybe there is a better method I don't know) is to so the user can say what order they want pieces of code to be compiled in. Sort of like a flow-chart. I want it somewhat animated, so, example being 3D circles the user drags and drops in the order they want things.

1. I need 4 circles inside of a form.

2. I need it so when the user selects the circle, they can drag and drop it in an order.

3. User clicks OK to finish their chosen order.

I haven't designed anything before that needed to check the borders of the form etc.

View 1 Replies

Interface And Graphics - Randomly Generating Circles

Mar 1, 2009

I am trying to randomly generate circles at the top of the screen, but it doesn't seem to be working. I want it to generate five balls, but it only generates one, and it's in the same place each time. [Code]

View 5 Replies

Make Collide A Lot Of Circles Drawn During Runtime?

Jul 14, 2009

Right now I'm trying to make collide a lot of circles drawn during runtime. I have no problem making 1 circle collide with the form's bounds nor with another circle, however, if I draw like 25 circles in runtime, how can I make each one "move" and set the "collision properties"?

Can I make the circles move outside of the form? Let's say, the whole screen?

View 15 Replies

VS 2005 Logic For Filling Circles In A Rectangle?

Nov 14, 2010

I am struggling with coding up a bit of logic.

I have a map which I have created zones which are basically rectangles which have the coordinates sorted

eg
Zone 1
Zone 2
Zone 3

I then want to create circles within the rectangles. So for example

Item1, Zone1
Item2, Zone1
Item3, Zone3
Item4, Zone2
Item5, Zone1

So i would like Item 1, 2 and 5 to show up as three circles and when the mouse cursor floats over them to show it. The item list is dynamic and so I am not sure how to get about with this?

View 7 Replies

Algo / Code To Cover A Rectangular Area Using Circles?

Jun 13, 2012

This is a problem like the puzzle - "find minimum number of coins to completely cover a piece of paper".

The difference is:

in my case RADIUS of the coins is variable (but all coins should have same radius).

Real scenario:

1. I need to draw circular shapes on a rectangular image.

2. Number of circles (N) is CONSTANT/ User input

3. Size of image (S) is CONSTANT/ User input

4. The program should find the MINIMUM RADIUS (R) that is needed to draw N number of circles on an image of size S, so that, the image is completely hidden behind the circles.

This is NOT a puzzle/assignment that I'm trying to solve.This is part of a larger project that I'm working on.

I don't need any drawing code. I just need the code/algo to find the radius.

View 22 Replies

Draw Ishihara-transformations (circles In Circle Without Intersection)?

Apr 28, 2011

Question: I need to draw pictures as below in C#/VB.NET Draw ishihara-transformations (circles in circle without intersection)?

Note that my problem is NOT drawing circles in C#.

My problems is drawing them without much whitespace and without intersection.

My thought would be using "Orbits" and then draw the circles with center on the "orbit" lines. (with some orbit lines for bigger and some only for smaller circles)

View 2 Replies

Drawing Pixels With Me.creategraphics In System.drawing (yay)?

Jun 3, 2012

draw individual pixels, without resorting to drawing a line and setting it's length to 1. Is there an actual ability to draw a pixel that is just 1 pixel big?

View 2 Replies

VS 2008 Drawing 'arc'?

Aug 19, 2009

I have a little experience with drawing using GDI+ in VB.NET, but not so much with more complex shapes. All I ever used were lines and rectangles, and the occasional ellipse.I need to draw an 'arc' like this:I can specify the starting angle (0 in the picture), ending angle (angle from the horizontal (left side)), and the starting and ending radius, and I'm sure any other things I need can be calculated from that.The problem is that I have no clue which drawing function to use. Can I do it using FillPath, or FillClosedCurve, or? Of course, I could create a pie shape and then draw a second pie shape (slightly less radius) on top of that to make it appear like it's a single shape, but what if it needs to be 'transparent'? I don't want it to draw a solid shape on top.

View 17 Replies

Drawing On Picturebox Vs Drawing On Form?

Feb 18, 2012

I need some code to draw a resizable, draggable rectangular cursor (or selection box) on a picturebox. I found some excellent code (albeit rather old) that does just that, but on a form rather than a picturebox. I have tried converting the code - basically moving things to the picturebox events (Paint, MouseDown, MouseMove etc). It nearly works but leaves a trail behind it when you move or resize the cursor. In other words, the selection rectangle is not being erased before being drawn in the new position.

Is there some fundamental difference between drawing graphics on a form and drawing on a picturebox that would cause this behaviour? Something like, when you invalidate a form and cause a redraw it erases what you did last? If not, then I just need to dig a bit further and work out how the cursor is being erased from the previous position.

Here's the original code that works fine on a form:

Private DragRect As New RectangleF(20, 20, 100, 80)
Private Adornments(7) As RectangleF
Private MouseInRect As Boolean = False

[Code]....

View 1 Replies

VB 2008 Move A Drawing?

Apr 24, 2012

I have made a program in which a small space ship rotates, with some tutorials I found, then when i tried to move it I realized that .location does not work for bitmaps..

View 1 Replies

VS 2008 CustomGroupBox Drawing?

Sep 2, 2010

I have a Custom Groupbox that overrides the OnPaint event to do some custom drawingbackgrounds, etc. The problem I have is that when I use it in an application and want to draw text on the control, it gets drawn first, then immediately afterwards the OnPaint from the control gets called and draws on top of the text. Is there any way to get the text drawn after the control's OnPaint?

View 1 Replies

VS 2008 Dragging A Drawing?

Sep 12, 2009

Dim fnt As New Font("Verdana", 16)
Protected Overrides Sub OnPaint(ByVal pe As PaintEventArgs)
Dim g As Graphics = pe.Graphics

[code].....

View 17 Replies

VS 2008 Drawing A Grid?

Apr 23, 2009

I am having a bit of trouble drawing a grid with GDI+ and VB.net 2008. The grid is designed as one point perspective. The horizontal lines are not correctly positioned, and the form is taking a long time to draw. Could anyone suggest a faster, and mainly more accurite method?

Here is my code currently:

Public Class Form1
Const VanishPoint = -200
Dim g As Graphics = Graphics.FromImage(New Bitmap(Me.Width, Me.Height))

[Code]...

View 2 Replies

VS 2008 Drawing On A Image?

Oct 16, 2009

I want to draw a line on a image, easy enough in principal the image is a map and the lines is between city pairs?

View 12 Replies

VS 2008 Drawing On A Picture Box?

Feb 2, 2011

I have my application to where you can load up an image and draw on it with the mouse left down and drag.Only problem is, if the form becomes the inactive one or is minimized/maximized the drawings go away until I scroll the image in the form (I put the redraw functionality in the picturebox.Paint event).How can I make the lines I draw stay permanently? I've put picturebox1.refresh in the minimizedchanged/maximizechanged and form.activated events and still nothing..Even tried the picturebox's resize event and nothing?

View 18 Replies

VS 2008 Drawing On Progress Bar?

Dec 21, 2010

I'm trying to draw text on the progressbar. This code below works, but when the progress bar re-paints itself the text disappears.

ProgressBar1.CreateGraphics().DrawString(Vaule & "%", New Font("Arial", CSng(8.25), FontStyle.Regular), Brushes.Black, New PointF(ProgressBar1.Width / 2 - 10, ProgressBar1.Height / 2 - 7))
jmcilhinney suggested i look into the PaintEventHandler.

I read the MSDN documents, but they used PictureBox(). I made this code below, but no luck.

[code]....

View 4 Replies

VS 2008 Graph Drawing

Sep 30, 2009

my assignment is to draw a graph within my VB form with a some variables I have. I was told by my boss that I should use Microsoft Chart Control 6.0, but I don't think it matters if it is in another software.I currently have a few variables, each with a lot of values, "Frequency", which is user entered from maximum to minimum, CH (channel) 1-4 which are given by a machine output I use at my company. My graph, is supposed to have the Frequency values in the X-Axis (horizontal) and the CH 1-4 values within a range of each other in the Y-Axis. Can anybody help? My code for extracting the data and getting the frequency is below. How I got most of it is thanks to Stanav, the thread is over here: url...It comes with 3 buttons (I have not put in the code for button 3), the 3rd button will be used for plotting the graph when clicked.

View 3 Replies

[2008] CustomGroupBox Drawing?

Sep 2, 2010

I have a Custom Groupbox that overrides the OnPaint event to do some custom drawing,backgrounds, etc. The problem I have is that when I use it in an application and want to draw text on the control, it gets drawn first, then immediately afterwards the OnPaint from the control gets called and draws on top of the text. Is there any way to get the text drawn after the control's OnPaint?

View 3 Replies

Click Button To Insert Drawing, Click Drawing To Get Option To Delete - VB Versus Access

Jun 21, 2010

Say I have 3 Buttons, labelled: Unit 1, Unit 2 and Unit 3. When I click on any button I want a drawing of that unit to appear on screen at a pre-specified starting point. Thereafter when I press any other one of the buttons the unit drawings appear alongside each other in a line. So I could end up with:

[Code]...

View 4 Replies

Error: Operator '=' Is Not Defined For Types 'System.Drawing.Image' And 'System.Drawing.Bitmap'

Aug 17, 2009

With this line...

If PictureBox1.Image = My.Resources._2star Then

I get this error: Operator '=' is not defined for types 'System.Drawing.Image' and 'System.Drawing.Bitmap'.Is there another way to say = with images?

View 8 Replies

Drawing A Gradient In Visual C++ 2008?

Feb 9, 2010

I'm trying to draw a simple rectangular gradient but I keep getting this one error. Here is the code below: Drawing::Rectangle^ myRectangle =

gcnew Drawing::Rectangle(10, 10, 100, 100);
Drawing2D::LinearGradientBrush^ myGradient =
gcnew Drawing2D::LinearGradientBrush(myRectangle ,Color::Red, Color::Blue, 50);
e->Graphics->FillRectangle(myGradient, 20, 30, 100, 100);

View 7 Replies

VS 2008 - Drawing ListView Using E.Graphics

Sep 13, 2009

I have been looking through the code bank and i cant find anything that is helping me with my problem what i have is a print button that when clicked it goes to my print preview page, then i can print the file. i have got all the other controls on my page to display correctly using this example

e.Graphics.DrawString(sType, New Font("Arial", 10, FontStyle.Underline), Brushes.Black, 110, 650)

but how can i get my ListView header and content to preview on the page as well. my listView has 5 columns and i am using the PrintDocument control.

View 10 Replies

VS 2008 Drawing In Visual Studio?

Jun 29, 2009

This may be a stupid question, but is it possible to add things like lines to a form easily? Without creating the line manually using System.Drawing?

View 5 Replies

VS 2008 Drawing On The Screen Using The Mousepath

May 15, 2009

I'm trying to draw on screen using the mousepath, as I understand I should use the GetDC function and ReleaseDC function, what I want to do is when the mouse left button is down I want to draw anywhere on the screen the path the mouse did (like painter but on the screen), The main problem is that when I draw I have to clean it up later (After the left mouse is up). How can I use the Mousepath to draw on screen?

View 2 Replies

VS 2008 Drawing X Number Of Bitmaps?

Jan 13, 2010

how to draw an unknown amount of images to a form

the amount of images should be determined during runtime.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved