Draw A Line Grid On A Windows Form?
Dec 26, 2009I need to draw a line grid on a windows form that contains 4 rows and 4 columns.
View 2 RepliesI need to draw a line grid on a windows form that contains 4 rows and 4 columns.
View 2 Repliesi know vb6 but i am currently trying to teach my self vb.net how to draw grid line onto a picbox ie both horizontal and vertical lines so i end up with a grid affect
View 1 RepliesI am creating a program that will allow you to sketch out a house-floor-plan... I am using Snap-To-Grid code. The snap to grid works fine but i need a label that appears in the middle of the lines that are being drawn that represents the length of the line in feet. This will be saved as a bitmap image, so i need the length to stay visible after the lines are drawn. I have found code for a "symbiote-line", but it displays the text in a caption and the caption dissappears as soon as a line is drawn. I need the text to still be visible after the mouse-up event is fired. This is similar to the way i need the line to look.
[Code]...
How can I do the same thing with other shaped like rectangle?
I know that I need x,y,widht,height but it still don't do my rec.
in vb.net i would like to draw a regular line on a form. is there a control to do this?
View 2 RepliesI want to move cursor with visual basic and it seems I found way how to do that. It is possible even click with Visual Basic whereever on screen. But I cannot check out where on the screen the click was done and so I want to draw two short crossing lines on that point as marker where Visual Basic clicked on screen. If it is possible to move cursor to that position and show it then it is as good as drawing marker.
View 4 RepliesI have an Idea but im not sure how to get started... Its a map maker... There will be a panel on the side for items and it will draw a grid and you can make a map using the items on the grid.
View 5 RepliesI see that the Line method is replaced with DrawLine, however; it seems like DrawLine must treated as an object as follows:
Private Sub Form1_Paint(ByVal sender As Object, ByVal e _
As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Draw a solid black line 25 pixels from the top of the form.[code].....
When I attempt to use this code (call it), I must somehow bring about an event, but I haven't found how to do that.How do I "call" this sub?
I have a picture in my picturebox. In that picture, I need to draw a straight line between two points and calculate the length of that line (probably in pixels). Is there any suggestion how to do it?
View 2 RepliesAlright, im trying to make a map editor for a game engine. I already have the whole form planned out but I just can't figure out on how to draw a grid. I dont mean a data grid. I mean like tiles. X and Y positions and stuff like that. I have looked all over the internet for tutorials. There are very few and most are out-dated. Can anyone help?
View 6 RepliesHow would i draw a grid on a form in the forms paint event?Say start at coordinate (50,50 then 50,me.height) and then draw as line every 50 pixels. once that is done then draw the same grid horizontal to get a result similar to this
View 4 RepliesI am graphing using Visual Basic graphics and it works. I would like to know how to draw a DASHED line instead of a solid line. Could someone help me with this?gphFormGraphics.DrawLine(Pens.Green, pt2, pt1)
View 4 RepliesI'm trying to draw a grid using vertical and horizontal lines.Both For..To statements work fine when one of them is commented out otherwise, they won't work together. At run, only the first For..To statement is executed.[code]
View 6 RepliesI have a form that uses a button to draw a line and a second button to draw a rectangle. I have a third button to clear the form but can't find a code example to code the Clear button.
View 4 Repliesusing vs2008 I am trying to create a line graph using vb in a windows form. I have dragged a chart onto the form, and via the properties window, through the series option have changed the type to the graph that I want, which is line. But all the time the data is displayed as a simple bar chart. How do I remedy this please to get the type of chart that I want.
View 1 RepliesIs it possible to use command line event args with a windows form application with the application framework enabled? if so Please could you direct me to a tutorial that I can follow.
View 4 RepliesI have written a windows application, that can take in some command line arguments and can be ran from the command line as a scheduled task. It all works fine, but i am trying to give the user some feedback on the console if they launch it from thee.I have used the info described here, and have got some output on the command line, but when the application finishes it does not drop back to the command prompt unless you hit enter it just sits there waiting.
View 2 RepliesI am working on an application and I want the user to be able to enter commands into a textbox, and when they press enter, the command is printed in a rich text box, executed, and the output is printed. For instance: the user types move{file1}, {location} into the text box and this happens:
>command: move{file1}, {location}
>$ moving file1 to location
>job completed
How would I write lines to the rtb and execute commands when the enter key is pressed?
This works, partly.
Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles command.KeyPress
If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Return) Then
RichTextBox2.Text = Environment.NewLine + command.Text
End If
End Sub
it erases everything in the textbox before adding the line... I would also like to be able to make a database of commands, maybe a .dll or something, so that when the user types in something, it checks that database to see if the command exists, if it does it executes, if not, error.
Hey Overflow, I have an application which serves as a user interface for a spartan/command line program.
I have the program running on a separate process, and my application monitors it to see if it is responding and how mush CPU it is utilising.
Now I have a list of files in my program (listbox) which are to be sent to the application, which happens fine. But I want to be able to read text from the com-line so as to determine when the first file has been processed.
Com-line says one of "selecting settings", "unsupported format" and "cannot be fixed". What I want to be able to do is when it says one of these three things, remove item(0) in listbox1.
I thought of programming an event which handles com_exe.print or something or other, if possible.
Is there any way to add command line arguments to a vb express Windows form application?
View 9 RepliesWhat this line means? Inherits System.Windows.Forms.Form
View 3 RepliesFor class, I am creating a Tic Tac Toe game. When there is a win I would like to draw a line over the 3-in-a-row. Not sure if this is possible because I used an array of buttons to represent the X's and O's. If this is not possible I would like to highlight the winning buttons.
View 14 RepliesSurely its possible to draw a line in Visual Studio without writing a dozen lines of code?
Is there a drawing toolbox that's hiding from me?
How come this doesn't work...
Private Sub ColorKeyForm_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
'Draws diagonal line of dot and dash on form
[Code]....
... the top part draws a line on the form but the second part does nothing. The picColorKey is a picture box on the form.
How would I draw a Direct 3D Line in VB?
View 1 RepliesI searched this forum for the answer before posting this and from what i have noticed there is no "simple" way ofcourse "simple" definition varies from one person to another
my definition of simple is something like this Line(x1,y1,x2,y2,color) or something like that.[code]...
I am building a basic program for kg students,,I have a form with two sets of picture, 5 pictures at left and 5 pictures at right
names of pictures at left are
picEyeLeft
PicListenLeft
PicNoseLeft
PicHandLeft
[Code].....
I need to draw a line on a series of pictures: I have decompiled a movie file to 1200 pictures. I also have 1200 samples of vector data (coordinates of the line: beginning point, ending point , size of vector (length) and direction (angle)... anything). With these data I want for each corresponding picture to draw a line corresponding to this vector data for instance: picture 550 needs to get a line drawn from point (5,95) ... these are (x,y) coordinates. in direction of 5 degrees from a vertical line and length 55. Visual Basic do that? I understand there will be some work in locating the origin of the x,y coordinate system and telling the program what 'size 1' means...
View 4 RepliesI'm new to Visual Studio.Net. Having trouble learning how to draw a simple line on a Windows Form.
View 4 RepliesI have a button with flat appearance and with border size=0.I want to draw lines on the top of the button, but it doesn't work. Why?
Public Class gomb
Inherits Windows.Forms.Button
Const hatterszin = 11395569
Const vonalszin = 5924448
Dim pen As Pen
[Code]...