I'm writting program in VB 2010, but I have a problem. I want to draw a temporary line on PictureBox control MouseMove event. That works fine but deleting of that line doesn't work. I tried to draw the white line on the same coordinates (PictureBox's background is white), but won't work.
Here is the code: Private Sub drawing_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles drawing.MouseMove
Lots of ovalshapes... What I want to do is that when the mouse is over one of the shapes, it will display the name of the shape in a label. I can easily do it for each shape like this:
Private Sub p34_mouseover() Handles p34.MouseMove Label1.Text = p34.Name End Sub
[Code]....
But if I do it that way, I need to make like 120 subs. Is it possible to make one sub/function/whatever that handles this for every ovalshape?
Alright my goal is to test to see if the user has dragged a label over a button. I have add event handlers for MouseMove and ButtonEnter, the trick is that i dont want the buttonEnter sub to fire unless the user is actually dragging a label.Dim dragging As Boolean = False
[Code]...
I thought would work but because the user is dragging the label the mouse never actually enters the button field. I also tried doing lbl.location = button.location... but unless the label and the buttons are the exactly the same size in exactly the same location then the event wont trigger.
I am using VS 2008. I have a listview control whitch 'checkboxes' property enabled.My question is: how can I trap a MouseMove event over an item only, excluding the associated checkbox?I have the following code in MouseMove event of the ListView control but it cannot differentiate between an 'item' and a 'checkbox:
Private Sub mylstview_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles mylstview.MouseMove Dim oListViewItem As ListViewItem[code]....
Actually I'm creating a simple paint application in VB.Net 2010. I want to draw shapes in my application same as we do in Microsoft Paint using mouse.
I'm a bit successful also using mousedown and mouseup events of a picture box. The mousedown event sets the starting point and mouseup event sets the ending point(diagonally opposite point of rectangle.) The problem is "Nothing seems to be occuring between mousedown and mouseup events(Well..that is obvious because I didn't add any code on mousemove event). My question is: "Can I do something to see a growing rectangle during mousemove event?". The rest of the drawing should remain unaffected.
This is more of a mathematical problem than programming problem.I have created a very basic 3D engine using Visual Basic .Net. It displays lines on the screen with an additional z axis. The engine works, however when part of the line goes below 0 it messes up and starts drawing the line inverted again.
This is how it calculates the points:
y = (point.y / z) + offset.y + camera.y x = (point.x / z) + offset.x + camera.x
Can anyone work out a way to only draw part of the line when it intersects the z=0 axis?
Dim Gr As Graphics = SomePanel.CreateGraphics() Gr.Drawline(StartingPoint, EndingPoint)
I want to be able to have a line drawn from point a to b, but be able to rate it 90 degress based on user input so if the user inputs 70 I want it to rotate 30 degree's to simulate a 70 deg relationship to a horizontal line that it touches if that makes any sense. a is starting point b is the user inputs 70 and it draws it at 70 in relationship to the horizontal lineheres the image that i forgot to post above Attached image(s)
I was wondering if anyone could steer me to any good references to using OpenGL in vb.Net? I wanted to try a simple line drawing test to start off with, and came across many old discussions about using CsGl or the Tao Framework. But I could not get CsGL to import into Net2008 (the Add Reference window simply could not see the DLL that was clearly there when using Windows Explorer). And although I could get Tao to import OK, and found portions of one person's project, I figured that somehow the GL window he was referring to had to first be set up as a GL object (new class?).In addition, all the OpenGL books I have looked at only discuss OGL with respect to some version of C.From what I have gathered, you need a connector between vb.Net and the opengl32.dll libraries and that is what CsGL and Tao are about. But the edumucation resources seem very few.
how to draw in vb.net, and I figured the easiest way is to get my hands dirty and start coding. I figure that the best way to start is by drawing a line on the form. What I'm trying to do is use the graphics.drawline(), but I'm failing. This is what I'm using so far
I have a question about drawing lines. Most of the code snippets I've seen approach drawing a line with the mouse down as the startpoint and the mouse up as the endpoint. But I am trying to draw a line by startpoint as a mouse click and then an endpoint as a mouse click just as you do on a typical cad program.
That's vertical and 1 pixel wide. This is for a mulitiprocessor performance monitor.How do I do it....if you tell me which routine to use... I'll take it from there. I don't think the routine is
System.Drawing.Graphics.DrawLine, because it's looks to an external reference like I'm putting random pixels in.If possible I need to put the pixels in by hand. Besides this line of pixeld is another line of pixels for another epoch. They are not related numrically.
My program is giving the error: "End of statement expected" The red lines are the ones giving errors. I'm trying to draw lines on a picturebox to create a graph
Dim iScale As Single Const Distance = 1000 pictureBoxGraph.ForeColor = QBColor(0)
I am doing some txt file programming and i came to the problem...I could write what is in a combobox in a txt file to then read it when the app is opened again.But if i want for example to delete a line in the text file.I want for example if i have in the combobox 1,2,3,4,5 and 6 and i select 5 and i touch a button delete , i want the application to check if the value(5 in this case) is in the etxt file and delete
I am doing a project with graph (VB.NET). I am drawing a line handling dynamic property ( opacity changes based on DB value). I don't know how to change the opacity.
Is it possible when drawing a line to use a binary pattern? Is there a command for this?
Example:
167 is 1010 0111 Draw a line X32 x Y1 would be: 10100111101001111010011110100111 205 is 1100 1101 Draw a line X32 x Y1 would be : 11001101110011011100110111001101
I have been working on an angle calculating program. I have incorprated a feature so you can type the angle and the program draw it. I have since added a few new features and updated everything as such. For the life of me I can't figure out why the draw angle has stoped working. let me just paste some code.
Right, the program isn't so complicated. The important bit is that you type an angle in textbox1 and hit enter. Then what happens is the angle is calculated against a base line (one of the new features is that this base line can be moved from left to right and center.) the problem occurs when you hit enter, the program doesnt actually draw the line for you.
Ok so i have a uni assignment to delete lines of text out of a text file, so far i have figured out how to search the text file for specific bits of text, i,e name of user, ive also used a loop to find out what line in the text file the specific line exists as...my
code so far is Dim line As String Dim Input As StreamReader
[code]....
the selected policy is what im tryin to use to write over the line of texts that already exists however i think that maybe instead of deleteting what exists it will just move it down a line and make a blank line
I have this program that outputs all the servers on a specific game. It outputs it to a text file. However, There is a lot of annoying spaces. This is kind of hard to explain, so I'll try to explain it. This is what The text file looks like.
As you can see, they have these annoying spaces. What I want to do: 1. Get rid of the spaces, But keep the space between the IP and the Port. 2. After the spaces that are bad are gone, I want the program to output each single IP AND port To its own text Box. It doesn't matter is the textbox of the IP and Port are seperated, It can just be one textbox with the IP and port, with a space between them. Thats about it!! I have the GUI done, and the rest of the programming, all I need now is this. Reformat without spaces > output each seperate line of text to a seperate textbox > TYTYTYTY
Is there a way for VB to send a command to the command prompt? Say, I wanted it to open a CMD box and send ipconfig into that box, what would that be?
I have gotten farther along in my work, and the "add friends" works great Now, I am working on deleting friends. I have the following snipplet from my code:
Basically I want to Position a line from The middle of my screen to the bottom right of my screen. But I need to draw over the game to do this. I dont mind if it flickers as long as its there is all i want. Like this VV
I am busy with a project converting VS2005/2008 sln files.
I am quite far but have came acroos a problem with my source code.
I have found the files I need to change, I have changed them to the version that I need.
I now need to read the files back into my program and delete the line I have changed as it contains project numbers that are irrelevant. Then I need to save it.
I have got as far where I have searched for lines that begin with 'Project'. I have changed this also so it's now a question of reading the files in, Deleting the line with the 'Project' number and saving them.
OK, SO i have this program that outputs all the servers on a specific game. It outputs it to a text file. HOWEVER, There is a lot of annoying spaces. This is kind of hard to explain, so ill try to explain it. This is what The text file looks like. [Code]
As you can see, they have these annoying spaces. What I want to do: 1. Get rid of the spaces, BUT KEEP A SPACE BETWEEN THE IP AND THE PORT. 2. After the spaces that are bad are gone, I want the program to output each single IP AND port To its own text Box. It doesn't matter is the textbox of the IP and Port are separated, It can just be one textbox with the IP and port, with a space between them. Thats about it. I have the GUI done, and the rest of the programming, all I need now is this. Reformat without spaces > output each separate line of text to a separate textbox > TYTYTYTY
PS, is there a way for VB to send a command to the command prompt? Say, I wanted it to open a CMD box and send ipconfig into that box, what would that be?
I'm trying to make a very simple Silverlight application.I want it to be full-screen, and I want to draw a line onto a Canvas.My problem is that the .Width and .Height of the canvas never seem to have a valid value. The website shows the canvas at 400x300 pixels or so, and when you click on it, it goes into Fullscreen mode.I want to use the Height and Width to find the usable space of the screen. I've tried adding events (thinking that the canvas wasn't yet ready to be used immediate after the full-screen line of code) but the LayoutChanged and Resized events don't seem to yield anything.
I would like to build a line chart which can redraw or change during a period of time with dynamic data. So that the x, y axis will change if out of range. The graph may be somehow similar to Matlab. I am using vs2005.
When writing gridview Event, We must write the Commit and Rollback in event. Can not run the Event if don't write Commit. I want to know what for writing commit and rollback???what a differences between commit and rollback?
I am having problem deleting my data on click event Private Sub btnDel_Click. Here is my code: Dim inc As Integer Dim cs As New SqlConnection("Data Source=ConnectSQLEXPRESS;Initial Catalog=ForumCrawl;Integrated Security=True") Dim dbSource As String Dim da As SqlDataAdapter '("SELECT * FROM search_result", cs) [Code] ..... The error I am getting isThere is no row at position 0.