Scale Polygons Mapped To A Resizing Picture?

Sep 29, 2011

Im craeating a dart scoring program (to use myself in my dart room) and want the user to be able to click in different areas of a picture of a dart board to register the thrown darts.

This program will be resizable, so the picture of the dart board can change it's size when the user change the program window size.

Im using a list of polygons(pointF-arrays) to map up each area and run some calculation to see if the mouse click is inside the polygons area, but how do I scale those polygons correctly when the picturebox is resized? My polygons are hard coded to map the dartboards area of the picture at a specific size.[code]...

View 1 Replies


ADVERTISEMENT

Colouring In A Picture Using Overlays Or Filled Polygons?

Jun 3, 2012

I am trying to create a VB.net form application to visually fill in a floor plan with different colours according to reservation status.The basic floor plan is white and the idea is to colour in the various apartments in different colours depending on some variables.I have tried overlaying .png pictures on top of each other but this doesn't work due to the non-true nature of transparency in visual studio as soon as you overlay more than 2 PNGs.Not much more success with drawing polygons either.

View 1 Replies

Croping And Resizing A Picture?

May 29, 2012

I am using the code below to take a picture with a webcam, saving that pic to a newly created folder by clicking the PictureButton.

The CropButton does the cropping.However when the SaveButton is clicked I need the pic being saved with the name "Cropped Photo.bmp" to allso be resized to 100x139 pixels.

Dim CurrentFilePath As String = ""
Dim StrInput As String = Now.ToString
Dim NewFolder As String = (cleanup(StrInput))

[code]....

View 15 Replies

Interface And Graphics :: Resizing Picture In Picturebox With Good Quality?

May 15, 2009

The problem is that i am trying to resize pictures so they fit into a picturebox with good quality. I have found a code (se attached code) on the internet that resize the picture correctly but the quality is poor.

If i resize the picture in Adobe photoshop before i put it into the picturebox the quality is good so there is nothing wrong with the orginal picture or the picturebox. It's the resizing that is the problem.

Here is the code.

'Generate new image dimensions
Public Function GenerateImageDimensions(ByVal currW As Integer, ByVal currH As Integer, ByVal destW As Integer, ByVal destH As Integer) As Size

[Code]......

View 4 Replies

Interface And Graphics :: Point Translation Between Polygons?

Sep 7, 2009

i have 2 polygons: 1 - A rectangle with a certain size defined with 4, 6 points or more (what ever becomes easier). 2 - A non-rectangular polygon (a quadrangular) what i need is that when given a certain point with inside the rectangle, i can translate that same point in the other polygon in the right position.

View 3 Replies

Use Lines To Draw Geometric Figures(Polygons)?

May 9, 2012

I'm trying to do something that is turning out to be out of my league at the moment. I need to draw geometric figures. These geometric figures have all the coordinates of their corners. Say I have a trapezoid, and I would want to draw it. The drawing would be done in a picturebox or a panel or a groupbox (some part of the form where only the geometric figure will be).

I saw the method on how to do that Here and that's exactly what I'm trying to achieve, but there it's drawn on a newly created form, and I need it in a picbox, panel or groupbox as I mentioned above. I also need the drawn figure to be at the center of the picbox/panel/groupbox.

The coordinates of the lines should be like (xa.text,ya.text) to (xa.text - xb.text, ya.text + yb.text) if I'm not wrong for the first line of the geometric figure and so on.

View 3 Replies

VB Graphics Polygons Filling - Scaling And Placement

May 7, 2008

I have a VB6 program in which all graphics are drawn with lines that are plotted to specific points in the controls (forms, picture box, etc.).

[Code]...

View 4 Replies

Create A Report That Will Give The Area Of Multiple Polygons On A Layer?

Sep 29, 2011

I am trying to create a report that will give me the area of multiple polygons on a layer. There will be an unknown number of layers and polygons. I was thinking I could use a multidimensional array with each row holding the layer name and the area of that polygon then loop through and separate the layers and sum the areas. My problem is that in all the reading I�ve done on the subject I�m not sure of how to initialize the array.

View 6 Replies

VS 2008 Drawing Dots/polygons On Mousdown Or Click Event In A Picturebox?

May 1, 2010

I have a problem. Im trying to create a form that enables a user to add dots on a mouse click event over an office floor plan. I have searched the web and this site but still am struggerling. My aim is to be able to draw dots (purpose is to highlight problems) and polygons over the plan (purpose to define which service area the floor area relates). I want to save all graphics to an access database with associated
fields.

My thinking is to place a second picture box over the first and make this transparent and use this as the user interface? I dont expect anyone to solve this for me, however, any help with how to draw dots and polygons through mouse down or mouse click would be most helpful.

View 3 Replies

How To Scale A Scroll Bar

May 7, 2010

The following scroll bar would only generate 0 to 91.How do I do 0 to 100 or 0 to 255?The Form is made of:Horizontal scroll bar and Label1.Public Class Form1

Private Sub HScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles HScrollBar1.Scroll
Label1.Text = "Value = " & HScrollBar1.Value

[code]....

View 2 Replies

Is VB Developed On The Same Scale As C#

Jun 27, 2012

I know VB is still very popular, but does Microsoft put the same effort into developing VB as they do for C#? Will VB eventually fade away?

View 3 Replies

Scale The Image To Fit?

Jul 19, 2009

and it sets it as the background, but when If the image is too big it only shows part of it. Is there a way to set it to scale the image to fit?

View 5 Replies

.net - Have Each DataGridView Scale Appropriately?

Jun 18, 2009

In VB.net 3.5 SP1 I have a Windows Form with three DataGridView controls. One DGV takes up the whole bottom half of the form. The other two share the top half and are side-by-side.

I'd like to have each DataGridView scale appropriately. More specifically I'd like to have column widths and row heights adjust to the size of the form. Then I'd like the cell font to auto-fill based on a change in the cell size.

I've used the Dock property for the controls to scale to the size of the form. How can I get the rows and fonts to utilize the increased form size?

View 1 Replies

Bar Graph Scale Labels?

Sep 30, 2009

On the Y-Axis of a bar graph, how can I display descriptions as the scales instead of numbers? I don't see anywhere that I can do that.

View 2 Replies

Crystal Report Scale To Fit?

Feb 27, 2012

Is there a way to scale a report to fit in the printable area? Like Adobe Reader. My reports are in A4 size, but they're to close too the page borders. I bought a new printer, and the printable area is smaller than the old one, and there are some cuts in the report.I didn't change the paper size or whatever, just the printer.

View 1 Replies

FAQ: Resize An Image By The Same Scale?

Apr 10, 2009

How do I resize an image by the same scale? remember to mark the replies as answers if Welcome to the All-In-One Code Framework! If you have any feedback,

View 2 Replies

Scale Interface To VB Application?

Jul 30, 2010

I have a few different scales that I'm building a VB app for. Is there a universal serial port language that is common among weight scales that I can use to import real-time weight into VB?

View 1 Replies

.Net Forms Vs. Web Based ASP.Net Solution - Which Will Scale Better?

Nov 19, 2009

I am on a project helping to analyze the load a VB.Net WinForms application can take. This app has been in production for several years and has many many products on it. We plan to add more products but see the client footprint rapidly increasing. This is contributing the degradation of performance on the system overall.There is duscussion that moving the UI intensive portions of the app to ASP.Net it will reduce the client footprint and solve many of our issues.My question which of the following will scale better in terms of performance and load? ASP.Net(VB) Web based architecture VB.NEt WinForms 3-tier architecture

[Code]...

View 3 Replies

Change The Size Of The Picturebox According To Scale?

Feb 24, 2009

I need to draw a world map. I got necessary coordinates.I can draw it on a picturebox. To zoom in/out, I multiply the coordinates by a scale and draw them on the picturebox. At the same time I change the size of the picturebox according to scale.Now my problem is, it seems that the picturebox has limitations in size. I can't make it bigger than 32767.

View 10 Replies

Communications :: Digital Scale/ Indicator In VB?

Apr 3, 2011

my final year project title is monitoring weight changes in digital scale / indicator.i bought one digital scale online from A&D in order to test out my system.however unlikely other device (GSM MODEM, RFID...) there are no drivers or libraries (DLL) from this device.. with only the digital scale and (rs232 9-pins to usb convertor i bought) i was like lost wondering how to get communicate with the device.i have been search around in the internet for similar post.. but there are most likely dealing with the data receiving already. is there any journals or manuals for references? i willing to study over this and not simply ask for full codings.

- how to communicate with the device (serial port communication)

- is there any driver / libraries need to install bfore everything?

OS using - windows 7 ultimate (laptop)model of device - A&D JM-SERIES 150lb

View 19 Replies

How To Make Picturebox Image Scale

Dec 9, 2009

is there a way to change the size picture (scale the image according my size 300 x 150). Let say an user upload an image with (500 x 300), using picturebox, can i scale the image (500 x 300) to my picturebox size so that it can looks perfectly nice

View 2 Replies

Reading Data From Weighing Scale

Nov 14, 2010

I have a digital weighing scale I need to connect to the PC using RS232 communication port. Every time I weigh an object, automatically the result/ weight will display in the the texbox control in Visual Basic Application.I use to receive data via a timer for continuous looping sequence output to a textbox. Things do goes bad, as it flicking all the way. I using a indicator from AD series which read data from load cell of a truck weight bridge. It there's any way to stop this flicking without effecting the continuous loop?

View 3 Replies

Reading From A Weighing Scale Using Multithreading?

Sep 14, 2009

i trying to do a app, this app need to take reading from the weighting scale via bluetooth. but my problem now is that the reading from the weighing scale do not come in dynamic way. meaning to say that the value in the textbox will change base on the weight on the weighing scale.

View 2 Replies

VS 2008 Toledo Scale Automation?

Oct 29, 2009

i would put this here maybe someone would be in the know.Waiting to here back from the company also.At work we have a truck scale and it has a control that reads the weight.Model of the control is Toledo Scales Model 8530. The control has a serial cable to communicate with.I am trying to figure out what command to send to it to get the weight back.I have connected to it with a serial monitor and i dont seem to be getting any information back so thought maybe I had to send something to it.Right now we have a 3rd party dos program that is communicating with it that i dont have the source to.

I dont know if i could just bypass the control and connect to that serial cable or not,,, i would need to find an adapter if so.Ok probably shot in dark but thought what the heck this is a smart group

View 15 Replies

Checking For Mapped Drive?

Dec 17, 2009

I am having problems verifying that the drive is mapped. The code I have is this:For the Public Class I have this:

Dim wshNet As New IWshRuntimeLibrary.WshNetwork

wshNet.MapNetworkDrive("Z:", "\\10.21.2.218\Share", True, "wecon\sophosuser", "soweco")

To remove the drive I am using:

'wshNet.RemoveNetworkDrive ("Z:\", False, False)

What I am looking for is how to verify that the z drive is mapped, and if so then run the unmapping drive command.When I try to use a if wshNet. anything the stupid thing won't return a true or false value?I searched all through the net to find some sort of If drive mapped = true, however nothing comes up that I can implement.

View 3 Replies

Copying From Mapped Drive?

Jun 30, 2009

I read about the UNC path, but that doesn't seem to be making much difference, it may be that I need a user name and password for the connection, can anyone demonstrate code that allows username and password entry so that a file can copy to and from a mapped network drive or the UNC is "\serverarchiveJune"

View 1 Replies

.net - Scale Object Size Viewport-> Preview?

May 28, 2009

I toying with a project where I can position objects runtime on the screen. I also have an small "preview"-window, where I want to see the outline of the objects.I have an object array who have size and location on the "scene". Now I want to loop through my scene-objects and create one picturebox in the preview-window for each object in the "scene".

So, I have the size of the "Scene" and an array of the objects that are visible on the scene. Every object have an size and location mapped to the scene.I also have a preview window that have an dynamic size. How do I create a preview that scales down to the preview window? To make it easy, I loop through the scene objects in the scene and create a picturebox on the preview-form for each object, that uses the preview-forms size to do the scaling.

[Code]...

View 2 Replies

Get Chart Scale To Resize When Data Updated?

Feb 28, 2012

What I have managed to do is currently display a chart with 3 bars on it linked to textboxes what have numerical values in them when the form is loaded. i.e TextBox1 has an initial value set in it's properties of 10, TextBox2 has a value of 20, TextBox3 has a value of 30.

When I run the program the graph displays these values correctly.

I have also got a button, Button1 which when pressed will plot the chart again, (so if I manually change the values in the TextBoxes after the form has loaded), it will display the new values via the bars.

The problem I have is that if if once the initial values have been plotted when the form loads, i.e. 10, 20 & 30, the Y axis of the chart has a maximum value of 35, so that all the initial values for the bars are shown. But if I change the values to say 15, 30, 80. and then press Button1 to update that bars to thier new values, the bars change but the one that show's 80 can not been seen fully as it goes off the chart, as the Y axis still only shows a maximum value of 35!

Does anyone know how to get the chart to resize to be able to display all the bar values within the chart each time the values are changed and the Button1 is pressed, whether it be reducing the graph for smaller values or enlarging the chart for higher values?

I am not 100% sure I am going about it in the correct way as I have not got any experience in using charts and am having to stuble about the net trying to find basic example code of how to setup and use a chart

My code so far is:

Imports System.Windows.Forms.DataVisualization.Charting
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[Code].....

View 2 Replies

Gray Scale Display From A 8 Bits Buffer?

Oct 31, 2011

I use the last Bitmap constructor(width, height, stride, pixelFormat, buffer) with a buffer containing a 8 bits gray scale image. The picture box displays the image in false colors. I have no way to change the palette. How should I proceed ?

View 8 Replies

How To Dynamically Changes / Scale UI Based On Form Size

Jul 6, 2010

I'm wondering how do i create a User Interface that scale automatically based on the form size that the user desired.For example, we can see it in most of the modern browsers. The UI scale (larger or smaller) automatically based on the form size (try Chrome or Opera)

View 11 Replies







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