Image - Slow Drawing Of The Initial Board
Jan 2, 2012
I'm currently developing a chess program. In my program, the problem I'm currently having is the slow drawing of the initial board. Here's part of my _gameGraph.DrawImage(MyResources.Marble_White, New Rectangle(x, y, 70, 70)) The code here draws the black & white squares using a for/next loop. I later use another for/next loop on the array holding the piece values, which uses the same type of function to draw the pieces on top of the squares. Both the pieces and the squares are .PNG images.
[Code]...
View 18 Replies
ADVERTISEMENT
Nov 27, 2010
I have a number of FTP routines all based on the code below. Why does this take 15 seconds to run the first time? [Code] If I use an FTP program like FileZilla or CuteFTP to connect to the same FTP server they make a very much quicker connection. Any ideas?
View 10 Replies
Dec 20, 2010
I am looking for a great VB.NET forum for support on the newest 2010 version.
I have a large project currently Compiled on the NET 4.0.
I have also ran it on 3.4, 2.0, and, 1.1..
I am trying to read a text file on a server which has ONE line about 12 charters long.
On the initial request to read the file I have about a 7 second delay before there is any further action. All subsequent request are instant considering I do not close the program.
I have searched and searched Google and read some older post from this site. Most refer to the proxy setting and say setting the proxy to NULL will fix this issue. Well we all know that this cannot be down in the newer version of .NET. I did not have this issue in .NET 1.1 using the same code.
Can anyone here tell me how to make the webclient avoid this delay the first time it hits the server?[code]...
View 4 Replies
Jan 6, 2012
My program draws a few hundred labels and depending on certain criteria, they may be visible or not. I figured that it would be pretty slow anyway, but even if there's only a few labels visible, it does a weird flicky thing for a few seconds before drawing them - at the same speed if there are a lot visible.
[Code]...
View 13 Replies
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
May 23, 2009
Is it possible to convert an object form System.Drawing.Graphics to System.Drawing.Image?
View 4 Replies
Jan 21, 2010
Here is my favicon code
Dim oURL As Uri = New Uri(e.Uri.AbsoluteUri)
Dim favicon As Image
If oURL.HostNameType = UriHostNameType.Dns Then
[code]....
The error is Value of type System.Drawing.Image cannot be converted to System.Drawing.Icon Is it even possible to make the favicon be the icon of the form?
View 4 Replies
Apr 3, 2009
im using an MDI parent form and MDI Child. how can i print the image that's inside a picture box that's inside the Child from a button that's on the Parent?when i try to use print preview or print dialog, i can't get it to recognize that the document is the picure inside the picture box. i've looked up this error message:Value of type 'System.Drawing.Image' cannot be converted to 'System.Drawing.Printing.PrintDocument'.[code]
View 6 Replies
Aug 11, 2011
I am currently using Visual Studio 2008 (VB.Net) and SQL Server 2008. I have images saved on the database as image. When I fetch it into my code it is a System.Byte[] and I am unable to cast it as a System.Drawing.Image to save to my DevExpress(v10.2).XtraEditors.ImageEdit.
View 1 Replies
Apr 9, 2012
I am making a web browser using geckofx. I have put the favicon in a picture box but I have changed my mind and now I want it as the form's icon. The code for the favicon is:[code...]
The favicon works fine in the picture box but i think it will look better as an icon. If i change the line Me.PictureBox1.Image = favicon to Form1.icon = favicon I get the error Value of type 'System.Drawing.Image' cannot be converted to 'System.Drawing.Icon'. How can I get this to work?
View 6 Replies
Jan 20, 2010
I have a System.Drawing.Graphics g, which draw something in a PictureBox. Now I want to export this pGraphics to a new System.DrawingImage pImage (or Bitmap). But how?
Dim pImage As Bitmap
Dim g As Graphics
g = Graphics.FromImage(b)
[Code].....
View 9 Replies
Mar 10, 2010
I have two graphics I'm trying to superimpose into one, then display in a DataGridViewImage cell...The Value property of a DataGridViewImage is an Image type.
Dim Image1 As System.Drawing.Image = imgl_Imagelist1.Images(0)
Dim Image2 As New Bitmap(imgl_ImageList2.Images(0))
Dim DualGraphic As Graphics = Graphics.FromImage(Image1)
[code].....
View 3 Replies
Mar 14, 2009
I didn't think that setting a background of a form may slow it down seriously, but it's real now
View 3 Replies
Feb 13, 2011
The background is 61KB JPG format and it really makes my game slow in VBB?? Without the background it's perfect.
Can't I use background image then?
View 3 Replies
Jan 15, 2010
Why does my program slow down when i add a Back Ground Image?
View 12 Replies
Aug 6, 2010
while using VS 2008 SP1 for VB WinForm apps (on Win 7 Ultimate machine),I find that while the performance of VS 2008 is on the slow side, it is generally tolerable except for one thing: when selecting an image for a button, the "Select Resource" dialog will come up, and I choose "local resource", then Import. After navigating to the appropriate folder and selecting the desired image,I will almost always get the "hourglass" (now the blue whirly thing),and only after several seconds will the operation complete(i.e. the "Select Resource" dialog will show the image I selected,and then I can close it and be on my merry way). Typically while the whirly thing is going, the dialog box title will say "Select Resource (Not Responding)". Also on some occasions during the wait period, the Select Resource dialog will hide, and I will have to click the VS icon in the taskbar to make it reappear so the operation can complete.
View 8 Replies
Jul 15, 2009
I have a weird bug with webclient. I made an app a while ago which uses webclient to download a small thumbnail image.. and I rememeber when I first made it, the first time webclient was used to download the image it always took 15 sec+ to download it, but after the first it always downloaded quickly (in like 1 sec) .. but then the problem went away for me and it always downloaded fine.but now someone else who uses my app is having the slow image download problem apparently around 50% of the time it downloads the thumbnail images. so does anyone know what might be causing this? As I said, I don't have the problem any more on my comp - but I don't know why :s
View 5 Replies
May 25, 2009
I have already posted this question on the "reporting services" forum and received no responses, so i thought i'd give it a try here.
SQL server 2005 SP3, VS 2005, vb.net, RV control.
When i add a background image to the page header, body and page footer, The rendering takes about one second per page. Without the background images, it renders about 25-50 pages per second. My report is a statement print report and has about 1500 pages.
Since it is the same image on each page, why does the server need to send that image over and over again to the report viewer control?
In vb.net i have the Report Viewer control and i bring up a report in normal viewing mode. when i click on the print layout mode, or have that mode set up to be the default mode, It takes forever when i have a background image and virtually no time for the same report without the images. The images are gifs about 5 or 6k each. I have chosen to embed the image into the report.
How do i optimize the usage of background images so they do not interfere with the rendering speed? Or at least minimalize the slowdown.
[EDIT:] I have discovered that if i render it to PDF and open the PDF and page through the report, it is much much faster. In other words if i choose to render to 'printlayout', it is say 25 times slower than when i render it to default, and about 20 times slower then if i render it to PDF. And the PDF contains exact rendering for all pages, exactly the same rendering as the print layout mode generates.
View 1 Replies
Feb 4, 2010
I think it's because I have a background image. For example when I maximize the program it lags. I mean big software companies have programs that have more pixel images and are much more colorful then my program is but never lag why. AVG has nice look but the program never lag. But the code runs fine so that is a good thing. How can I stop the lag with background image?
View 1 Replies
Jun 4, 2012
How can I draw an image in a program using visual basic, without actually drawing the image first on an graphics program or on paper?
View 2 Replies
May 2, 2010
My objective here is to paint an image onto a certain part of ANOTHER image. So I'm technically trying to copy one picturebox to another one.
View 1 Replies
Dec 21, 2009
I am trying to use Bitblt for drawing one image on another. but when i try to get HDC From first image it gives Negative pointer value, so BitBlt returns 0 value. is it possible to get device context from bitmap directly?
[Code]...
View 6 Replies
Aug 8, 2009
I have an app that displays images (using picturebox component). what I am trying to do now is to try to allow the user to resize the image how he wants it (scale). for this i think I need to create an instanece (bmp) clone of the selected image in the picturebox and draw it ontop of the original picture; then specifi new set of size points.I was trying to use the code below:
Graphics.FromImage(PictureBox1.Image).BeginContainer('i do not know what to do here')
I need to specifi the new size of the graphics container but I do not seem to have any clue on how to do it.
View 6 Replies
Jul 13, 2009
I encounter a problem when I try to save a graphic. Drawing and displaying the graphic is no problem, but when I try to save it on file it always results in an empty image.
My code so far is:
Initialization:
Public Class ImageDisplay
[code].....
View 9 Replies
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
Sep 28, 2010
I currently have a application that takes a image of the selected area that is set by the user.
I now would like to draw a black box in the section of a image
Top left
7, 458
Bottom right
512, 472
I would like that area filled up with a black box.
View 4 Replies
Nov 18, 2011
Been experimenting using VB.Net to make a game, Got most of it figured out but now my method of shooting missiles causes a terrible lag, This is how i'm doing it now.
Declares Private missiles As New ArrayList()
Dim canFire As Boolean = True
Fire
[CODE]...
Move all the missiles X positions + 1
Try
For Each pic As PictureBox In missiles
pic.Location = New Point(pic.Location.X + 1, pic.Location.Y)
Next
Catch ex As Exception
End Try
I have a timer making canFire true every second. It is a GIF Image, I tested with a PNG image and the lag is barely noticeable. Is there a better way to draw them while still being able to use GIF images?
View 5 Replies
May 25, 2009
i am creating a winform program using vb where i am loading an image into a picture box. then in the mouse down event i am creating small circles which can act as points which will be displayed on the image. say creating five points around the eye of a bird. then i am having a button by clicking it , a polygon will be drawn on those selected circles x and y as edges. i am having no issues until this. when i am trying to add another polygon in the same picture by clicking around its leg or whatever and pushed the draw button there must be another polygon i.e. two separate polygons 1 on eye and 2 on leg. but there is only one polygon from eye to leg. so my questions are
1) how to close a polygon and draw another one in picture box
2) how to select a previously drawn polygon and delete it.
picturebox_mousedown
Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
[code].....
View 4 Replies
Jul 20, 2011
I have 4 control 3 button and 1 picturebox
vb.net
Private sub Button1 Dim bm As Bitmap = New Bitmap("D:Trening4 - Copy.bmp"
[code].....
View 4 Replies
Oct 18, 2010
My goal is actually very simple: I simply want a (shared) function that accepts a List(Of String) which creates an image and writes those strings (line by line) onto the image. There's a bit more to it than that, but for the sake of example this is all you need to know.Usually when drawing on an image I would create a Bitmap object and get the graphics object from Graphics.FromImage:
Dim bmp As New Bitmap(100, 100)
Using g As Graphics = Graphics.FromImage(bmp)
g.FillRectangle(...)
[code]....
Seems easy enough, but the problem is that I don't know how many strings there will be in the list, nor how long they will be. The image should 'scale itself' according to the strings in the list. If the list contains 5 strings it should be 5 strings high (plus a little extra for borders). If the list contains only 1 string it should be only one string high. Same goes for the width, if the longest string is 150 pixels, the image needs to be at least 150 pixels (160, 170 or something).
This is all good, I can get the dimensions of the strings by using Graphics.MeasureString. The problem now is that I need the dimensions of the image to create the bitmap. I need the Graphics object to get the dimensions. But, I need the bitmap to get the Graphics object I'm stuck in a loop here, if I don't have the Graphics object (I can't create it from nothing..) then I cannot measure the strings, but if I cannot measure the strings then I cannot determine how large my image will be, so I cannot create a bitmap and associated Graphics object...
View 5 Replies