Declaring Graphics Areas?

Jul 8, 2011

I have a form that I want to draw an image on.I also want this to be an animation so I can't use picturebox.However when I declare the graphics it gives me the error: "Type 'System.Drawing.Graphics' has no constructors"

:I have already import 'system.drawing:
Dim g As New Graphics() 'I get the error here
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

[code].....

View 7 Replies


ADVERTISEMENT

Activate A Map's Different Areas So As To Be Able To Click These Different Areas?

Jan 30, 2010

I would like to add a picture on my form, e.g., a map of Europe, and i wanna be able to click on UK or France etc. Each country will be programmed in doing something else. What i wanna do for a start is to make my map active so as to can click on these different countries.

View 10 Replies

Looking On Input For Areas To Improve?

Jul 21, 2011

I'm currently in a programing class for vb.net. It's my first true exposure to OOP and I'm looking for some advice on areas where I could improve. I was wondering if someone would be willing to look at one of my programs that I have written and offer advice on areas where I can improve and things that I made much more complicated than they need to be. I'm not looking for a line by line critique just a general look at things to improve upon in the future.

View 2 Replies

Use A Common _ViewStart In Areas?

Nov 5, 2010

In my "root" Views folder, I have a _ViewStart with the following code:

@Code
Layout = "~/Views/Shared/_Layout.vbhtml"
End COde

[code].....

View 3 Replies

Placing The Same ASP.NET Control In Different Areas Of A Page?

Feb 4, 2010

I have some code that I've inherited, and it's not the greatest in the world, but it works, with one small exception:

This page is a directory search, it has controls identified by record ID, however there exists a situation where there can be more than one result with the same record ID, thus making .NET barf. I had originally implemented a check that just didn't put the control on the page, if it was already there, but we've been getting negative feedback.

My question is this: Is there a way to put the same control in two places at once, for instance having if a user checks one, the corresponding one checks as well? I'm not terribly well versed in how .NET behaves, but I'll try to provide as much additional context as possible, if needed.

EDIT: Here's the updated code that generates the controls by looping over a datatable of results

Dim cbxSendInfo As CheckBox
Dim strCheckboxID As String = "cbxSendInfo-" & drOrganizer("ID") & "-" & i
Debug.text = Debug.text & "    Loading Checkbox (" &

[Code]....

Where drOrganizer("ID") is the record ID, and i is the result record number.

I know this is a terrible way to do this, at least from my background, but like I said, this is inherited code that's been hacked to pieces.

View 4 Replies

VS 2008 With Big Areas Of Text In Database?

May 24, 2011

I need to save in my Database, records that have a big amount of lines, and like we know each text field of Access database, have just 255 caractheres to insert.

View 4 Replies

C# - Return Another PartialView That Occupy Different Areas Of My Page?

Jan 14, 2010

i have an Ajax ActionLink which normally just returns a PartialView (which is just a UserControl ascx file) however, my needs have changed and i want to return another PartialView (so a total of two PartialViews) that occupy different areas of my page... of course i can't call " return PartialView("UserControl.ascx") " twice in a row consecutivelly... so my question is what would be an elegant work around for this?

how can i return two PartialViews WITHOUT wrapping these two PartialViews up in a larger parent view? i hesitate to do this because both items are in a different part of the html table which would require me to include practically the entire page in the parent view due to the structure of the table, and in this case lots of html data unnecessarily would be sent to the browser at each request - defeating the purpose of an ajax call/partial update (correct me if i'm wrong).

View 2 Replies

Custom TabControl - Move The Tabrect Areas?

Jul 23, 2010

Wondering if its possible to move the tabrect areas? For example:

[Code]....

I can already paint the tabs to the new location, but not sure if I have to override onmousedown or onmouseclick or what to have the tab selection area match up with the new painting. I haven't found any example of what I am wanting to do.

View 14 Replies

Setting Differnet Areas Of Form To Be Clickable?

Aug 26, 2009

i have a form that looks like this: i need different areas to execute different code, just as if there were buttons. how do i set areas of the form to be clickable in vb.net?

View 2 Replies

Draw Over A Form, Detect Drawing In Specific Areas?

Mar 27, 2010

[URL] In my Windows Form, I wanted the user to give an option to draw all over the form. But, if the user while drawing, enters the region 1, I want to assign a value to variable, say a=1. Correspondingly, if the user without leaving the mouse button previously enter the region 4, I want to b=1.After the user leaves the mouse button, I wanted to compare a and b. If both of them are equal, then Result=Done else not.

View 3 Replies

Making Transparent, Unclickable Areas In UserControl/pictureBox

Oct 22, 2010

I have a userControl with a picturebox in it. I need the areas of the userControl to be transparent and unclickable on the main form. After some searching Ive come up with this. [URL] but it doesn't seem to work. I have it set up so the usercontrol can be drag-and-dropped. but I dont want transparent areas to be dragable.

View 1 Replies

Stripping HTML Function Within Text Areas Content

Mar 10, 2010

I'm writing a small program that loads a folders contained file names into a list box, you then double click one of the file names listed and it appears within the programs text area where the user may freely edit it. I then have given the users options to export the data contained within the text box to a word template. What I'd like to do is add a button which the user can click in order to strip away all the html within the text areas content. I found a solution but for some reason I can't make it work. There are no errors displaying nor does the program crash out, it simply isn't doing what it should be doing.

The function I'm using is below:
Function stripHTML(ByVal strHTML)
'Strips the HTML tags from strHTML using split and join
'Ensure that strHTML contains something
If len(strHTML) = 0 Then
stripHTML = strHTML
[Code] .....

I've used the below snippet in an attempt to put the function to work in the text box.
Private Sub btnHTMLstrip_click()
' calls function stripHTML, applies to text box
richTxtBox.Text = stripHTML(richTxtBox.Text)
End Sub
So, its not working as it should?

View 1 Replies

Trim Images Crop To Remove All Blank Areas?

Aug 21, 2010

To reduce the size of some images I have, I'd like to remove the white padding that some have. The idea would be that if one has large white areas on the borders, then those can be cropped to save some space.

View 1 Replies

Ensure That Operator Cannot Accidentally Enter Data In Output Areas

Jan 24, 2010

1.Ihave to produce an application that enables the user to enter an integer rate of pay and an integer nr. of hours. On clicking a button the application should display rhe pay due. Amend the application:rate of pay to be entered as a real number;Employees are taxed at emergency rate of 40%. Amend to display GrossPay and NetPay.

2.Ensure that the operator cannot accidentally enter data in output areas!!!

The application is to be amended so thet the employees are paid overtime at time and a half for working more than 8 hours in any one session and all data enter by user should be checked to ensure that it is in a valid format and that the values are acceptable. [code]

View 2 Replies

Multiple File Upload With Input Areas Dynamically Generated

May 28, 2009

I want to create a form where the user can upload as many images as they like with the input areas being dynamically generated. I can't use Ajax for this I need to use ASP.NET controls and the images are being written to a database. Any ASP.NET control that can accomplish this? Here is my code for the dynamic form, its Javascript and its not passing the "PictureSmallLink" value back...and their in lies my problem.

<input id="PictureLinkSmall" name="PictureLinkSmall" type="file" runat="server" size="60" />
<input id="AddFile" type="button" value="Add file" onclick="addFileUploadBox()" />
<!--<p><asp:Button ID="btnSubmit" runat="server" Text="Upload Now" onclick="btnSubmit_Click" /></p>-->
<span id="Span1" runat="server" />
<script type="text/javascript">
function addFileUploadBox() {
[Code] .....

View 3 Replies

VS 2010 - Shading Some Areas Of Clock Image Based On Time

Mar 30, 2011

I have a table which contains the start date and end date, in my db. What I currently do is simply display both the fields in a ListView control. But instead of that approach, I'm thinking about displaying a 'clock' image and shading those areas with some color. This is similar to a Pie Chart. But the only difference is, I'm going to display a clock's image as background and the shading is based on the time.

View 25 Replies

Do All Programming Languages Use Static / HEAP & Stack Areas To Store Memory

Apr 9, 2012

Do all programming languages use the Static, HEAP, & Stack areas to store memory? Does understanding this help me with debugging in any way? How do I query or access the memory in .NET would I ever need to do that? Or the memory addresses?What keywords would I type into Google to get more on how the .NET CLR uses memory?I'm learning Java and am trying to compare .NET and Java and how memory management differs and is similiar.

View 2 Replies

Rendering Graphics Efficiently - DirectX - Graphics Card And Use Of DirectDraw Or OpenGL

Sep 23, 2011

We have a GIS application that has some performance issues. It creates and sends an image to a web browser. We start with a Bing Maps imager, add complex polygons (complete with transparent fill), save the finished image as a PNG, and send it to the browser.

The idea has come up that we could possibly install a graphics card and use DirectX or OpenGL to improve performance. I believe this would be the case even though we ultimately generate an image instead of sending the data the the screen. I believe our processes could still make use of the API and the hardware acceleration it provides. Our process is not unlike what CGI film makers do to render individuals frames of a film, though we simply render a single image and send it, as opposed to the hundreds of thousands of images needed for a single CGI film.

So my question is: would a powerful graphics card and use of DirectDraw or OpenGL provide us a worthwhile performance boost? It can take us 20-30 seconds to render a more complex map. Which is a long time to wait on a web page...

View 10 Replies

Interface And Graphics :: E.Graphics.Drawstring Length Overflow Page?

Nov 19, 2010

Im working on a project that needs to print a report of one client.Everything went smooth untill i came across my multiline input text data.When i display it in the PrintPagePreview the text go's outside my page. Even when im printing it only the halve of my text is displayed. I googled and looked everywhere but i can't get a clear fix for it.

[Code]...

View 3 Replies

Interface And Graphics :: Passing Bitmaps & Graphics To Subroutines As Arguments

Jan 22, 2011

I used to program with Visual Basic 6, so I have alot of old programs that I'm updating, plus I'm learning the new VB2008 methods. I'm writing a program that replaces the old "BitBlit" function which is no longer supported by Visual Basic 2008. It involves three picture boxes, one holds the sprite bitmap, a second holds the mask (silhouette) of the sprite bitmap, and a third has a background image.

[Code]...

View 3 Replies

Interface And Graphics :: System.Drawing.Graphics.DrawString On Other Window?

Aug 14, 2009

drawing text on a window which is not the current form's window.I remember doing this in Win32 api with getwindowdc(handle) to obtain a DC for the Window, then textout() on the DC.

View 2 Replies

Interface And Graphics :: Creating A Class Holding Some Graphics?

Jan 12, 2011

Ok, I want to create a class that will handle a special rectangle graphic.In my form, I want to have two of these special rectangles. So, basically, I need two instances of that class in my form, right?I manage to initialize two, alright. But, how exactly am I supposed tomanage drawing/graphics etc in a class, and the results to be displayed in my form?

View 13 Replies

Interface And Graphics :: Error - Graphics Paths For Designing

Oct 29, 2008

Using graphics paths for designing...but am getting an error when trying to add a shape to : _shapelist.add(createshape())

It says : Value of type 'system.drawing.drawing2d.graphicspath' cannot be converted to '1-dimensional array of system.drawing.drawing2d.graphicspath'

View 2 Replies

Graphics & RedrawWindow API, Clearing Graphics On The Desktop?

Sep 27, 2010

[code]...

ok, i know the code is a little rough, but it should be good to give you an idea of what im trying to do, if not i will still explain.simply draw 2 lines one from left to right, another from top to bottom, intersecting through the tip of the mouse.ok, theres no problem there the lines draw perfectally the way i want them.... BUT! now heres the issue im having.i cant get rid the previous lines.i did a bit of good old "Google'ing" and ran across a few links that all pointed me to the ReDrawWindow API, so i tried (as you can see in the above code) but i just cant seem to get it worked out.

View 5 Replies

Interface And Graphics :: Draw On Tabpage's Graphics?

Jan 19, 2011

So I decided to make my famous tile selector project, but instead of drawing in a form's graphics, do it inside a tabpage.Well, I managed to get it working, but it seems to... flicker.Normally, setting the form's DoubleBuffered property to True would help a lot there, but apparently, the tabpage has no such property.

When I invalidate the tabpage, I draw two images and fill one rectangle.Following past advice, those two images were created before, just once, and are stored in a variable so I don't create them every time I invalidate the tabpage.

View 1 Replies

Interface And Graphics :: Save Graphics As Png With Transparency?

Aug 1, 2010

Ok I have this: This makes a sub called 'graphicspaint' then writes "demo version" to a picturebox1

Code:
Imports System.Drawing
Imports System.Windows.Forms

[code]......

View 8 Replies

Interface And Graphics :: [VB2010] - Some Graphics Effects?

Dec 5, 2011

i whant do my own shadow effect. i can do the shandow. but how can i plus 2 bitmap images(1 above the other)?

View 15 Replies

"Dim Temp As Graphics = E.graphics/

Oct 20, 2011

My application is all centered around one form with lots of graphics drawings on it.All these drawings take place from within a paint event handler. However, the amount of code within that sub is becomming unwieldy.I have been trying to move sonme of it to another class and use the "dim temp as Graphics = e.graphics" construction to continue to draw graphics. However, I get all kind of argument exception runtime arreors when doing so (and I do not get these with the same graphics operations directly from the original paint event handler. I have also tried to pass on the original e argument, but with the same result.Is my conclusion that there is no solution to this so to continue with the unwieldy amount of code,correct, or am I mistaken somewhere. the "dim temp as graphics = e graphics" is recommended.

View 6 Replies

Interface And Graphics :: Keep Graphics Over Image

Oct 28, 2011

I load my picturebox with a jpeg. If I put my DrawObjects() sub into picturebox paint event.When ever a picturebox.refresh or picturebox.visible = true (vb.net seems to draw my DrawObjects() first, then load the jpeg Image over my drawing - erasing drawing) Is there a way to get the picturebox to redraw the jpg image first then draw on it, in picturebox paint event?

View 10 Replies

Use The Graphics Accelerator To Process Graphics?

Aug 21, 2008

In a Previous Thread, I asked some questions about how to create graphics. Everything was OK, until I realized that the graphics are really slow. While I was trying to find out what the problem was, I realized that the processor load was about 50% and my graphics card was not used at all. So doesn't Visual Basic use the Graphics Accelerator to process graphics? What I made is not a real program. It's like an experiment (I tried to make an image flip). Here is the Code:

[Code]...

View 1 Replies







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