Interface And Graphics :: Drawing Dynamic Connection Between Two Listview Controls?
Jul 4, 2010
I am need to drag drop listboxes with connection line in vb.net. If the listbox move then connection line should also move. I have attached picture as wel
View 1 Replies
ADVERTISEMENT
Apr 13, 2009
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.
View 2 Replies
Jul 17, 2008
Im using VB 2005 express edition. Im trying to draw rubber band lines and rectangles using controls like buttons in one form. My problem is, i did the rubberband lines and rectangles on diff forms.Here's the snippet code for rubberband rectangle:
Code:
Private Sub MyDrawReversibleRectangle(ByVal p1 As Point, ByVal p2 As Point, ByVal dashed As Boolean)
[code].....
View 14 Replies
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
Dec 18, 2011
I am drawing a bunch of shapes on a form and I want to relegate some of these to a subroutine other than Form1_Paint().The form has the DoubleBuffered property set to TRUE.All the shapes that are drawn by an external sub get overwritten:Code:
[Code]...
View 3 Replies
Feb 2, 2012
I have several picture boxes on a form (frmMain).My question is, how do I paint a point on a particular picture box at the location specified by the coordinates of the current mouse position? The snippet below shows defining some canvases and pens. But I'm not sure how to capture the mouse position when the mouse is over a particular picture box and how to paint the actual point at that location.[code]
View 3 Replies
Jan 18, 2011
IGraphics and drawing and invalidating thing.I have improved, that I can tell. I won't explain everything, so here's the essential:Technically, my application will let you draw a rectangle on the form. You click, drag, and boom, a red rectangle is there. This rectangle will disappear when you start drawing another.I got that working.But my problem is performance. You see, obviously I have to update, invalidate and paint my rectangle every time the mouse moves while it is in "drawing mode". I do that every time the mouse's position changes.And that is quite a big deal. Every time the mouse's position changes? That's a lot of invalidations and redraws for a decently-sized rectangle!I thought of skipping some mouse movement, like only update every 5 coordinates moved or something. But that would render my goal quite inaccurate.I already invalidate only the regions necessary, that I can tell.
View 5 Replies
Jul 25, 2009
I'm trying to make a custom combobox from scratch that multiple instances will share the listbox that holds the data on. I'm trying to draw the button face manually using GraphicsPaths and pens and brushes, but I'm having a few issues with it:
1. How do you draw that down arrow glyph in a way that doesn't look like a two-year-old sneezed on it? I'm having problems with the shape looking like the traditional one.
2. How do you position the listbox that contains the data in such a way that isn't bound by the containing form's render window?
3. I've tried to make the background look different when it has focus, but the OnPaint seems to think it always has focus and always makes the background the "focused control" background.
View 2 Replies
Feb 9, 2009
Well im just upgrading from VB6 and i was able to paint images to the background of a form. The same method does not seem to work in VB 2008. Is there a way i can draw/paint images to the background of my form?
View 7 Replies
Jun 8, 2010
I'm just getting started, and it's as simple as that: I need guidance to draw a rectangle or place a dot or a point on Form1, in VB 2008 Express. I knew how in VB6 -- let's build on that.
View 3 Replies
Jan 14, 2012
I am drawing a circle, of let's say 300 pixels diameter. I want to draw a triangle, with the top of it being at New Point(diameter / 2, 0). How could I get the other 2 points of the triangle? If possible, how could i get the 3 points of a triangle rotated by x degrees?
View 1 Replies
May 26, 2012
Problem1: I have a picturebox on a form. I have also managed to draw several PNG files with transparency onto the picturebox (see below). However, If I move the form outside the border and move it back, the image is gone. My source so far:
Dim k1 As New Bitmap(My.Resources.image1)
Dim k2 As New Bitmap(My.Resources.image2)
Dim drawMe As Graphics = PictureBox1.CreateGraphics
Dim bgcolor As Color = Color.FromArgb(128, 128, 128)
drawMe.Clear(bgcolor)
[Code]...
View 10 Replies
Jan 8, 2009
I created an application in VS2005 that draws text with a custom font and color. The images look great from my XP machine. But from another machine running Windows Vista, the graphics are messed up. It seems that the transparencies inherit the default black background so there's this gray'ish/black haze around the text...
View 1 Replies
Jan 7, 2009
I'm having a problem with the graphics portion of vb.net. As a school assignment, we are making "turtle graphics" applications. I have mine working perfectly, the problem that we are having (not even the teacher can fix it) is that when the window gets sent the command to be painted (ie minimized and maximized) the drawings in the picturebox I am using are completely erased. I am looking for a way to prevent this from happening. I have been trying to store the image as a bitmap in memory, which does not work. Is there another way to draw to a bitmap/image in memory and then output that to a picturebox?
View 2 Replies
Oct 21, 2010
I know this is probably not going to be simple, I tried searching around, but couldn't find anything. I am using some code to 'draw' text in a custom format to a panel with a custom bitmapped region (custom shape).Here is the code that writes the text inside a specified area:
g = LeftControlPanelV2.Panel1.CreateGraphics
Using fnt As New Font(New FontFamily("Arial"), 9, FontStyle.Regular, GraphicsUnit.Point)
Dim sf As StringFormat = StringFormat.GenericDefault
sf.Trimming = StringTrimming.EllipsisWord
[code]....
Obviously the text is not really located on the panel, but looks like it as it's drawn on top of the panel. So, when the panel or form that the panel is attached to moves, I lose the text. I though I could just call back to writing the text when the panel/form arrives at the correct place, while clunky, it works to a degree. I was hoping there was a better way of doing this, so that the text doesn't disappear when moving controls and I don't have to make repeated calls to the same drawing text over and over and over...
Edit: Should probably add that there will be 5 different panels each with their own custom drawn text, and all 5 need to move at the same time...
View 2 Replies
Jul 17, 2009
If I try to draw a circle by using e.g.
Code:
e.Graphics.DrawEllipse(Pens.Red, 50.133, 100.321, 0.1, 0.1)
I will get an error message. I tried something like
Code:
Public ObjectPoint As PointF
Dim cpoint As New PointF()
cpoint.ObjectPoint = New PointF(startX, startY)
e.Graphics.DrawEllipse(Pens.Blue, cpoint.ObjectPoint, 0.4, 0.4)
but it didn't work for the location and the circle size. How to draw a circle(and rectangle) by using floating point numbers?
View 6 Replies
Oct 14, 2009
How would you add a Dynamic Contextmenustrip to your form and how would you add the items to the contextmenustrip. Also when adding the items to the menustrip is it possible to give them names and text dynamically if so how?
View 5 Replies
Mar 9, 2010
i need plenty of textboxes in my program..i have already succeeded to create them easily
for y=1 to 9
for x=1 to 9
Dim square As New TextBox
[code].....
View 2 Replies
Sep 13, 2009
I have been looking through the code bank and i cant find anything that is helping me with my problem what i have is a print button that when clicked it goes to my print preview page, then i can print the file. i have got all the other controls on my page to display correctly using this example
e.Graphics.DrawString(sType, New Font("Arial", 10, FontStyle.Underline), Brushes.Black, 110, 650)
but how can i get my ListView header and content to preview on the page as well. my listView has 5 columns and i am using the PrintDocument control.
View 10 Replies
Aug 8, 2008
Is the ContextMenu control strictly to offer choices when the user right-clicks some object, or can it be used to offer choices in general?
In my situation, when a user opens a certain type of file, I want to offer a selection of specific subfiles (line ranges) within said file as choices. The presence of subfiles and their number is variable, so this would be a dynamic situation. (No subfiles: use the whole file; three subfiles: present three choices ...)Would ContextMenu be appropriate, or should I offer a list box or combo box or frame of radio buttons instead?
View 6 Replies
Mar 23, 2010
can we apply tone mapping algorithms in vb 2005?
View 1 Replies
Dec 31, 2009
I have inserted a form into my project that a friend sent over. The form works but if I add more controls to it they are not displaying.
The controls are all there in the <form>.designer.vb file but are simply not displaying when I run the form.
I have looked around the net but can find no reference to a similiar problem.
View 1 Replies
Oct 21, 2008
I'm having some problems with custom controls and anchors today. I made a custom control containing a picture box and a vertical scroll bar. When I adjust the form the custom control outer area (the blank part) will adjust to the size of the form but the picture box and scroll bar do not. I have the picture box anchored to all sides and the vertical scroll bar anchored to the right side. They just will not adjust with the control when it is resized on the form.
View 4 Replies
Sep 17, 2009
I have a project running in my old computer. It has panels,textboxes,labels etc. It occupies the full screen when running.I bought a new computer with a widescreen format. When I run this project it only occupies 2/3 of the screen.
What properties of the controls must I use so that I can run this program in any size computer and still occupy the full screen i.e the size is proportionately resized depending on screen size.
View 3 Replies
Aug 28, 2008
I don't know the best way to use multiple forms in VB, but I have created a problem and I'm not sure where it came from or how to fix it.
Background: I start the program at Sub Main. This is the main function:
Code:
Module modFunctions
Dim frmD As frmDAQ
Dim frmT As frmTrendView
[Code].....
it works, but I don't want to have to change the entire project.
View 1 Replies
Feb 5, 2010
The project I'm working on (the same one I'm always asking about) has tabs as the main navigation. I've made some User Controls to sit above the tabs in an attempt to reduce the number of overall controls that are being used (to great success). Now, however, there's one control that overlaps some controls on a tab that are obscured by my newest UControl and I want to make the background transparent.I've seen that AtmaWeapon keeps pointing people to this page detailing how to make the background transparent. That's great and it worked for me. All I did was create the
Code:Protected Overrides ReadOnly Property CreateParams() AsSystem.Windows.Forms.CreateParamsand it worked the way I wanted. Yay. I did write the rest of it too as well as part from a post I saw on the msdn forums, but they weren't needed to get the effect I wanted.However, I've got a number of PictureBoxes on this UControl that should have a BorderStyle of "Fixed3D". However, when this UControl is repainted the borderstyle doesn't reflect this (Note to self: don't .Refresh() a control inside its own .Paint() event ). This doesn't happen the FIRST time they become visible, but only when they've shown up and are made to redraw (like toggling visibility). If the border changes programmatically they look fine
View 1 Replies
Dec 7, 2010
I'm trying to figure out how to make dragable controls like the ones in paint.net. see the attachment. they look like forms kind of because they have the red x at the top like a form does, but it kind of looks like a custom control too. Is it possible to make these types of controls in VB.Net 2008.
View 2 Replies
Sep 26, 2010
I have a form containing two panels. In both panels there are two labels and textboxes. I set the 'Center In Form' property of the labels and textboxes to 'Horizontally' and 'Vertically' in design time respectively. But as the form is resizable, when the size of the form is increased or decreased at runtime the controls are no longer center aligned in the panels. How can I handle this problem (provided th
View 3 Replies
Apr 8, 2009
If I have a control, in this case a button, can I restrict the area it considers valid for text?
In the attached image, the left and right arrows are custom drawn in the paint even, I also have a scroll timer that scrolls the text if the length exceeds the buttons width as measured by Graphics.MeasureString.
I want to restrict the text from red line to red line so when the text scrolls it does not interfere with the arrow indicators, can the text area be overridden to some custom region?
View 4 Replies
Jan 15, 2010
Is there a way to make custom scollbars in listview? And could someone please show me how, step by step. I'm completely new at this
View 2 Replies