I want to make a graphic of certain data in my program. The problem is that the zedgraph doesn't zoom out to see the dots or lines in the graphic. This is my code:
[Code].....
I've tested the codes that Zedgraph provides in his homepage, but that code only work if you call this subroutine in the form load. Instead of that, I want to make the graphic when I clic a button.
I have a converted VB6 App that would draw irregular shapes on a PictureBox when I click on a button, and these irregular shapes would persist until I either close the App or erased the PictureBox to start the display anew.I converted my App to VB.Net to do the same, i.e. draw on a PictureBox again, but the drawn lines appear briefly and then, at the end of the drawing process, when my App returns control to the Operating System in wait for another event, the graphics disappear as if erased by the App (which I don't do of course).I have created a Graphics Object associated to my Picture Box as:
Dim CurrGraphics as System.Drawing.Graphics CurrGraphics = PictureOut.CreateGraphics
I then use the DrawPolygon and DrawLine methods to add the irregular shapes I want:
where CurrPen is a defined Pen, and Pts is the Points() array with the coordinates of the displayed shape. Several dozens irregular shapes are drawn and then the subroutine stops, and returns to waiting for another request from the user.What could be the prime reason why graphics do not persist in a PictureBox, and are erased immediately after they are created ?
PS: I do not use the PainEvent of the PictureBox PictureOut, as in the example given in the VB documentation (below), as the display process is initiated by clicking on a button, and I cannot relate how to transfer control to the PaintEvent as below:
Private Sub Form1_Paint(sender As Object, pe As PaintEventArgs) Handles _ MyBase.Paint ' Declares the Graphics object and sets it to the Graphics object
I am working with a very simple (so far..) little program where i use som trig to create a circle using pixels created vith the Ellipse-comand "(x, x, 1, 1)" etc.
But I want to se when the graphics is drawn, just not the finished circle, how do I do that?
I use the "Paint" version of the form. I am a beginner so excuse my poor skills. Shouldn´t this be a very simple little problem?
I'm trying to make a mini map for a 2d space shooter of mine; I've for the math down (I think) for when an item should appear on the mini map, but the problem is the graphic. As it stands, the graphic spills over the edge of the mini map graphic and disappears only when it's fully outside. I need it to crop the image, or at least not show it off the mini map graphic.I thought of using the sourcerect rectangle of the spritebatch.draw, but it seems to me that would only work for the right and bottom section, as I can adjust the size of the rectangle. I haven't tried this yet, but I will soon. Can the location of the source rectangle be changed in relation to the graphic that it is a part of being drawn so that I can use that to crop the left and top sides?
There are several times in my code when I need to determine the width of some text. Under VB6 I would use the .textwidth() method pretty much any time I wished.Under VB.NET it appears that the paint event is the only place I can gain access to an initialized graphics object and from that the measurestring() method.Do I have to use a flag in the paint event when want to auto-resize my splitterbar position or is there another way?
I am struggling with VB.NET's graphics paradigm.There are several times in my code when I need to determine the width of some text. Under VB6 I would use the .textwidth() method pretty much any time I wished.Under VB.NET it appears that the paint event is the only place I can gain access to an initialized graphics object and from that the measurestring() method.
I have a program for school project that has input fields for Name, Address, City, State and Zip. I need to error check so that the fields are not empty.I have used If statements that check to see if the fields are empty and shows a message box if they are but if I leave the whole form empty and click the button that activates it, all the if statements go- one by one instead of pausing for the user to input the required data.How do I check for data and make the program stay there until the data is input? I have tried TRY/CATCH but it won't catch this type of error.
this is the
'This program computes customer's bills at the pizza shop for all combinations of 'crusts, toppings, sizes and discounts Option Strict On Public Class PizzaForm
This program is very difficult for me, but I must get threw it or I cannot finish... What I am doing is making a Database of foreign Languages with the spelling of the words and the pronounciation inside the database... The USER enters a paragraph of words into the translator textbox and pushed translate. The program has a DATABANK of words with the phonetic spellings and matches the word, then translates to phonetics. The problem is that new words keep appearing inside the language. So I incorporated a Database of 2 fields
I cannot find a way to make a program that I write make a shortcut in the start menu for all users.My final goal is to make an MSI and deploy it in group policy to all users on a computers OU. Is this possible?
Dim IncomingCommand As String = e.CommandLine.Item(0).ToString
If IncomingCommand.Substring(0, 2) = "-1" Then
form1.close()
End If
End If
I am trying to make the program close if the -1 string is sent with the program. See my installer allows for me to run certain programs before it actually installs, but it doesn't shut down copies of the program itself. So I have a next startup instance set to shut the program down if the -1 is received. But if the program is not running it starts up instead. This is not desired. form1.close doesn't work. e.cancel = true doesn't work, etc etc. What can I do to make the program not start during this instance.
I made vb.net program for 1440x900 resolution, if i run my program on 800x600 or 1024x768, my program's resolution is bigger then windows, so i have problem with resolution. Now i want to change my program's size and i am interested in, wich resolution is correct to make program, 800x600 such as minimum?
We have a great book written for Visual Basic 2005 that we type code that is prepared in advance. We are using Visual Basic Express 2008 and normally this works really great; type the code run the program and it works, however I am running into a snag.
The textbook shows the following code: IN THE(General) (Declarations)AREA we are told to type the following:
' Create a Graphic object to use with the game's bitmap Dim myGraphicObject As Graphics = Me.CreateGraphics ' Create an empty Bitmap Object
[Code].....
is there a difference between VB 2005 and VB 2008 that would be causing the errors? or am I missing something subtle maybe mistyped?
I would like to know how to use the graphic methods:
-DrawString -DrawLine -FillRectangle
I am meant to use these in a method called Drawgraph in order to draw a grid and bar chart. How can I go about this? What parameters do I need to send? What variables do I need to declare?
what im trying to do= make a program that will make multiple accounts
[code]...
ok what i type in textbox(es) "1" i want it typed on a "3"{a website=www.justin.tv/signup} when i hit the "2"[button1]i really dont have any idea what im doing i know ill need to have a webrowser to load the justin.tv/signup but i have no clue what the name of the boxes are called on the webpage
I have just started to try learning how to use Visual Basic (im running the 2008 express free version). The example im trying to get working right now looks like follows[code]...
I am programming a design surface where I add Image objects to the surface when an image is added it calls the draw objects command. It works fine I would like to figure out how to covert the object to an image to save it? Below is the draw sub used to draw objects onto the surface:
Public Sub DrawObjects(ByVal g As Graphics, ByVal Scale As Single) Dim drawObj As GraphicObject Dim i As Integer
I am working with a graphics program in VB to move an image around the Form. I'm trying to create barriers that cannot be crossed. At first, I tried to represent this with a 2D array, but this proved too complicated. For now, I'm trying to create a series of rectangles. What I want to happen is when the point the image is anchored at intercepts one of these rectangles, it will either be prevented from moving or sent back to where it was directly before the image moved. I know there is an intercept command, but I've been unable to figure out how to use it in this content. The code I have is below.
Public Class Form1 Dim PlayerSprite As Image Dim BGImage As Image
[code]....
As I said, this is to create a graphic barrier. However, I expect to make a number of these Rectangles?
i would like to be able to erase a graphic that was created.I would like to not have to redraw the graphics minus the graphic thats unwanted.Is there a way to delete a graphic?
I want to make a form to schedule the on and off time of equipment. & rows for seven days. 96 columns for 24 hours divided by 15 minutes. Each cell will be red for on and green for off. Click the cell to toggle the color. I know what I want it to look like. But I dont think using 500 buttons is a good idea. I am looking for better ideas on which direction to go. I am using visual studio express.
I'm developing a scanning application in VB.NET 2005 using TWAIN. The scanner returns to me a handle to a DIB. I need to save this to a file, but I've been searching everywhere and can't find any information.