Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Shape And Line Controls, Only A Little More Interactive?


Colleagues,

Are there controls for VB6 that have the visual properties of a shape and line controls, and also have better mouse support, so that they can be made more interactive?

Iím writing an application that displays a process diagram. Iíd like to add things like ToolTips and to make some elements on the diagram clickable.

I know that I can put a label on a shape and it would provide the mouse support that I need. It would work for square-ish shapes, but it doesnít work well for circles.

- Nick




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Shape And Line Controls, Only A Little More Interactive?
Colleagues,

Are there controls that have the visual properties of a shape and line controls, and also have better mouse support, so that they can be made more interactive?

Iím writing an application that has a process diagram. Iíd like to add things like ToolTips and to make some elements on the diagram clickable.

I know that I can put a label on a shape and it would provide the mouse support that I need. It would work for square-ish shapes, but it doesnít work well for circles.

- Nick

Grouping Several Line Or Shape Controls
hi,

I am creating a small application for my column design. I drew the column and some details using the shape and line controls. I 'd like to group the several line controls like grouping or ungrouping in MS word. So, moving the column around on the form will be a lot easier.

Thanks,

Edit/ Well, I temporarily put them on a frame and move it around. Then,evetually, I take them out of the frame but I don't want to use that way

Shape And Line Controls...etc In VB2005?
Hi All;

Why the shape and line controls does not appear in VB 2005, just like the VB6 ones. and how can I get them within the list of controls...?

Thank you

M C Benzerari

ActiveX Control To Combine Shape And Line Controls
I want to create an ActiveX control that will consist of 2 circles (Shape controls with Shape=Circle) and a Line control.

I want the 2 Circles to always be centered at the ends of the Line. The user must be able to drag each Circle independently of the other Circle and that end of the Line must move with the Circle.  The length of the Line must change as a Circle is dragged.  But if the Line is selected and dragged, all three object must move without changing size or orientation.  Let's call this new control a Link.

I have searched the Internet but I cannot find any guidance on how to do this.  I have found several tutorials but they all work with controls like Textboxes, Timers, Command buttons, etc - nothing on graphical objects.

Can someone suggest a site with a tutorial on this?  
Or give me a few pointers on how to go about this?

ActiveX Controls Vs. Shape Controls
I'm writing a program that allows a user to drag symbols (rectangles, lines and circles) from a stencil onto a drawing page. My symbols may also be labelled by the user - very similar to Microsoft Visio. I'm unsure as to what approach would be best. Should I create my own control with a label and a shape or do I just use the shape control provided and fit any labels within the boundaries of the shape.

Using active X controls provides me with the standard mouseup, click etc events that come with controls whilst using shapes would mean that I have to write my own algorithms for drawing, resizing, labelling and dragging.

Also how can I show the user that the control they've clicked on is ready for resizing or dragging. Vision does it with the use of several blue squares should I just change the border colour.

Please help I'm not asking for code or anything just the idea(s) (behind implementing my own visio)

Thanks
James.

Shape Controls
I need to loop through all the controls on my form and if the control is of the form ___Slot___ then i need to change the fillcolor to white.

This is what i got so far but it dont work


VB Code:
Private Sub resetLocations()    Dim shp As Shape    For Each shp In Controls        If shp.Name Like "*slot*" Then            shp.FillColor = vbWhite        End If    Next shpEnd Sub

Shape On Top Of A Line
Dear....

I'm creating a design piece of software and I now load a line and after that a shape

When the program runs, I see that the Shape is placed "behind" the Line, this should be vice versa so the Line must be behind the Shape.

How can I make this happen ?

Regards,
Antoine

[edit:]

I allready figured out it can be done with vbMoveToFront, but how is the syntax of it then ?

frmDesigner.Signal(Index).Visible = True
and the I need to get it on top
[/edit:]

Need To Know Everything About Line && Shape
Hi, Im new here. Weell I have to do a presentations on the line & shape procedures.
I have to know their methods, properties, event procedures, and examples of coding if possible. I need to know everything about them. I would also appreciate any ideas I could use them for examples. Thanks

How To Shape Forms And Controls?
Can Anyone help regarding how to shape controls ?
I want to make a user interface (eg. remote control, or cell phone) with having round buttons. How can i change shapes of these controls.

How can i shap my Form? like if i want eclipse form?

Dynamic Controls Over Shape
Hello all,

I have created a set of labels dynamically during runtime, and I want to place them over a shape. The problem is that the shape is always brought to the front and the labels can't be shown, how can I tackle this problem?

Shape Follow Line
I have a picture box with line1 and shape1 inside. some code below:

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

Line1.X2 = X
Line1.Y2 = Y

Dim centerx, centery
centerx = Shape1.Width / 2
centery = Shape1.Height / 2

With Shape1
.Left = Line1.X1 - centerx
.Top = Line1.Y1 - centery
End With

End Sub

Now what I want to happen is for the shape to move along the line to X2, Y2 and then stop when it gets there. The shape should move at a decent rate (adjustable with a timer interval). I have tried various things but nothing seems to work. Can anyone help?

Shape Command Many Line
Is there a way to write a ms shape command on many lines? I tried with the _ at then end of the line but it doesnt work!

thanks

Richard

Right Click Menus And Shape Controls
I have created a right click menu and would now like to add a shape control. I had a shape control already coded using a combo box and a circle but I need help in what to do to make this work with my menu

I have this code

For the menu

Option Explicit
Private Sub Label1_Click()
PopupMenu mnuStatus
End Sub

For the shape control

Select Case CboStatus.Text
Case "Free"
ShpStatus.FillColor = vbGreen
Case "Occupied"
ShpStatus.FillColor = vbRed
Case "Cleaning"
ShpStatus.FillColor = vbBlue
Case "Unserviced"
ShpStatus.FillColor = vbYellow
End Select
End Sub

I don't know if this is making sense to anyone but do you know how I can combine the two and make it work??

Picture Controls && Shape Control
hello everyone !!

i've two picure controls, only one is visible at a tme. i've two shape controls on picture1. i want to use the same shape controls on picture2 aslo.. because i've written some common routines for these picture controls.

currently the shape controls go behind the pictureboxes at runtime. and i'm not able to see them..... what is the best way to do this ...


anyone .....i'm just stuck up due to this small problem ...

awaiting for a prompt reply

shruti !

Drawing A Line,shape Using Vb Code
I want know How to draw a line/shape using vb code
in a *.txt file along with data and othe calculations

Working With Shape Controls && Drawing Shapes
Hi...as some may know, I'm still working on my MS Paint-like program. What I'm trying to do is allow the user to click to create the center of a circle, move the mouse to where the edge of the circle will be, and click to create the circle.

I've done it with a rectangle, but I'm having trouble doing it with the circle. Here's my code for the rectangle. Shape1 is a rectangle. You can click and drag and Shape1 is essentially a preview of the rectangle that will be drawn, then when you release the mouse, the rectangle is drawn. Similar to what I want to do with a circle.


Code:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
CurrentX = X
CurrentY = Y

Shape1.Visible = True
Shape1.Height = 0
Shape1.Width = 0
Shape1.Left = X
Shape1.Top = Y
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
If X > CurrentX And Y > CurrentY Then
Shape1.Width = X - CurrentX
Shape1.Height = Y - CurrentY
End If
End If
End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Shape1.Visible = False
Me.Line (CurrentX, CurrentY)-(X, Y), selectedColor, B
End Sub


Also - Didn't want to start a thread about this cuz It's a pretty lame question, but how do you clear a Picturebox's picture?

Making A Circle SHAPE Follow A Line
ok - i've got it set so that when i press a button a line locks onto a specific part of the form - and the other locks onto where the puck(circle) is (which could be anywhere)

now i'm wondering how i could make the puck then follow that line until the end of the line

right now i have it set so that the line Begins at the specific part of the form - and the end (X2,Y2) start at the puck - but i could easily change it around if it's easier

Creating Line And/or Shape Object During Runtime
Hello,

I want to make it possible to place line and/or shapes on my form (in a specific frame) during runtime.

How can I make this happen ?

Hopefully someone can help me !

Regards,
Antoine

Problem: Assigning Name To Shape/circle/line
I am new to Vb6 but need to create lines/circles rectangles on a form.
I want to be able to reference each these lines/circles later so I can
change dimensions relative to textbox entries. I am at a loss as to how

to set a name for each line create after creating it eg.with.circle
(x,y) r . how do I define this as eg: "circle1"
Any help would be appreciated ..thanks Stevebriz

Make A Shape Move At Angle Of Line
Hello,


I've been working on this program frantically for a while and can't come up with any solutions towards making a shape of a ball called shape1 move at the angle of a line, called line1. I tried the code below to almost success. Does anyone know how? I know the angle of the line, but don't know how to do this.

VB Code:
shell.Move shell.left + velocity, shell.top - angle

Count Exact Line In Textbox Shape
I'm using word Automation through my vb6.
I use the textbox shapes and want to check the number of textlines existing in the active textbox shape.

I know how to to this when wordwrap is off (by counting vbCR)
, but is'nt correct when wordwrap is ON. How to solve this

I can get the active text from the textboxShape:

Code:Set TBox = AppWord.Selection.ShapeRange
tk = Tbox.TextFrame.TextRange.Text

Maybe there is a count prop or something. Any idea's?

Draw A Line Or Shape Manually At Runtime
Is there a way to do this
Thx, Chris



Edited by - AbbydonKrafts on 3/13/2007 12:00:43 PM

How To Save A Drawing Drwan Using The Shape Controls As A File
i need to know how to save a shape object as a file (bmp, jpeg etc)

i have created a drawing using the shape controls and need to save it

i tried laying it on the picture control and use the savepicture routine but it only save the blank picture control without the drawing on top.

please help

Changing The Default Tool Tips' Shape On Controls.
Is it possible to change the standard VB6 controls' tool-tip shape (a one-line, very long, text string) to say, something more elegant like a balloon?

|
+--JDMils
|
+--VB6
+--VB Dot Net
|
+-- Navman GPS Forums @ http://forum.jdmils.com
|

Need Help On Creating Shape Controls Similar To Word, Or If Unable Paint
I am currently creating a graph and shape program to an old Acorn program for my school project. However im finding it difficult to implement shape controls, which would preferably be similar to those in word, or to a lesser exten paint. I dont know where to begin so id be helpful for all help

Shape And Line Objects "events"
Hello,

Why in the world shape and line objects do not respond to any event?!?

I need the make them respond to mouseclick,at least...
Is there any way to do so ?! If so,could you please post the code (I'm a beginner).

I am trying to make a program (a game for kids:firstgraders) that moves lines and shapes around the screen and I want them to be selectable with the mouse.

Thanks.
Horazio.

One Line, All Controls
Hi!

Is it possible to do something like this:

Code:
AllControlsOnThisForm.enabled = False
?

Shape Objects Orbiting Around Single Shape Object
Im trying to create a program that has many circle shape controls that orbit around a single circle shape (Sun), im trying to create our solar system using BitBlt, i just need to know how to generate the shapes to orbit around 1 shape, all help would be appreciated - Cheers

Clicking Line Controls
I'm wondering if there is a way to determine when a user clicks on a line control or moves their mouse over it? Line controls don't support either of these events. I also wanted ToolTips, but they dont support that property either. Is there anything I can do?

Richtextbox Line Controls
Anyone know how i can control a certain no. of lines in the rich text box controls? just like the telnet window for Windows.

Creating An Array Of Line Controls
This problem is driving me crazy!

I am trying to create an array of Line controls in an ActiveX Control in Visual Basic 6. Here's the code of my control:


Code:
Option Explicit

Private lines() As Line


Private Sub UserControl_Resize()
ReDim lines(0 To 10)

Set lines(0) = New Line
lines(0).X1 = 10
lines(0).Y1 = 10
End Sub
But whenever this runs, I get an error "Illegal use of the keyword New"!

Any help is greatly appreciated.

Thanks!

VB6.0: Adding Events To Line Controls?
What is the best way to add events to the Line control? Or is there another vershion of the Line control that already has events added to it?
I need to be able to use the Click, Mouse Move, and possably a Mouse Over events.

Multi Line Tree Controls?
Is there anyway that I can get the text portion of a tree control to span multiple lines?

How To Stop The Shape From Flickering(A Shape Control Is Used)
Hello Every1,
I have a peuliar problem for u guys. Follow closely the code given below......

Dim x1 As Single, y1 As Single
Dim draw As Boolean
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
x1 = X
y1 = Y
draw = True
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If draw = True Then
Shape1.Left = x1
Shape1.Top = y1
Shape1.Width = X - x1
Shape1.Height = Y - y1
End If
End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
draw = False
End Sub

The shape sizes according to our mouse, the only problem is the shape flickers. Can any1 stop that flickering. I'll be really happy if any1 can do it for me. Thank u...

PS: I have tried changing the AutoRedraw & ClipControl options on & off. They dont help...

How Can I Change My Form Shape To Custom Shape
How Can I Change My Form's Shape To Custom Shape when This Shape Is Not Circle,Rectangle Or Othere Standard Shape
For Example One Shape Like "Wndows Media Player XP" When Mouse Is Not On It

please Help Me And Send Answer To This email
Banifatemi@Nicico.com

Draw A Line To Select Controls In A Picture Box
This seems easy, but I am trying to figure out the best way to do this. I have a picture box in which I have drawn controls. I would like to provide the ability to 'select' the controls (just like the VB ide) by drawing a box with the mouse. When I use the .Line method on the picture box, the line shows up behind the other controls. Other suggestions?

Thanks ...

Optimize 100s Of Img/Line Controls/URGENT
Hi

My program uses 100s (maybe 1000s soon) of Image controls and Line controls - in control arrays to depict a city Map. All are placed on a Picturebox.

All The controls are initiazled from the database at startup.

The reason I use controls, is because I need the On mouseover events, etc that can be used with my own drawing on the picturebox only if I use regions api.

Please tell me any optimization tips - would it be better to drwa the map - then define Regions, and then on picbox's mouseclick events , use the api to check if x,y is within a particular region OR is it fine to use the control arrays?

Also, I don't display the entire Map in one time, the user can scroll - so is there any way to optimize the mem usage for controls that represent areas on the map not currently visible?

Plz visit : www.Lyracomputing.com and let me have your comments!

Printer && PictureBox Controls Line, Pset Currentx,y
The line & pset controls evidently return a short integer because, for example when I attempt to draw a line longer than 327.... inches the line goes crazy. Does any one have these functions that return a long integer so I can resolve this problem, or in any case know of a workaround that would overcome this problem. Any help would be greatly appreciated..

Help, Draw A Line Betewwn 2 Controls And Move Dynamically
Dear All

I need to draw lines between controls (Listboxes) in runtime
to link items from one listbox to another graphically.

Please see the example pic I have included.

The lines would need to redraw as the user moved the listbox
and also as the user scrolled the listbox.

This is exactly like the query builder in Access.

Can anyone please help me in the right direction as to how to achieve this.

Many thanks

GT

Involves Creating Random Line Controls At Run-time
Hi,

The code below creates 4 line controls at run-time.

The problem is, I want to create from only 1 to 4 of these controls at run-time (not always 4).


Does anybody have an idea how to do this? Thanks for any help.

Private Sub Form_Load()

Formdiagram.Controls.Add "VB.line", "Line1"
Formdiagram!line1.X1 = 2400
Formdiagram!line1.X2 = 2410
Formdiagram!line1.Y1 = 2400
Formdiagram!line1.Y2 = 2410
Formdiagram!line1.Visible = True
Formdiagram!line1.BorderColor = vbRed
Formdiagram!line1.BorderWidth = 6


Formdiagram.Controls.Add "VB.line", "Line2"
Formdiagram!line2.X1 = 2800
Formdiagram!line2.X2 = 2810
Formdiagram!line2.Y1 = 2800
Formdiagram!line2.Y2 = 2810
Formdiagram!line2.Visible = True
Formdiagram!line2.BorderColor = vbRed
Formdiagram!line2.BorderWidth = 6


Formdiagram.Controls.Add "VB.line", "Line3"
Formdiagram!line3.X1 = 1800
Formdiagram!line3.X2 = 1810
Formdiagram!line3.Y1 = 1800
Formdiagram!line3.Y2 = 1810
Formdiagram!line3.Visible = True
Formdiagram!line3.BorderColor = vbRed
Formdiagram!line3.BorderWidth = 6

Formdiagram.Controls.Add "VB.line", "Line4"
Formdiagram!line4.X1 = 1300
Formdiagram!line4.X2 = 1310
Formdiagram!line4.Y1 = 1300
Formdiagram!line4.Y2 = 1310
Formdiagram!line4.Visible = True
Formdiagram!line4.BorderColor = vbRed
Formdiagram!line4.BorderWidth = 6

End Sub

Interactive Pop-ups
Does anyone have any basic code for pop-ups in VB that ask a question and prompt a user for a response - say, by clicking a 'YES' or 'NO' on the pop-up? Is this even possible?

Non-interactive Install
When I use package & deployment wizard it always generates a cab file and a setup.exe.
When running this setup, user must always select the directory where VB program will be installed.

But how to make it, so that user doesn't have to click or select anything during install? The target directory is hard-coded so to speak, for instance, to C:VBApp.

I checked the setup.lst file, which is also generated by package & deployment wizard. In there, in [Setup] section, I added line

ForceUseDefDir=1

which makes it so, that the setup program doesn't ask the user to select the target directory (default one is used instead), but the user still needs to click "OK" button. How to make setup, so that the user doesn't have to do anything, not even clicking this OK button? Only the window should open, then it installs the application and closes itself.

I suppose there must be some line added to setup.lst, that could make setup completely non-interactive for user, but I don't know what line.

Or are there any other solutions to this? I need to make such a setup, that will cause non-interactive install off the shared disk to the user work-station.

Any help already deeply appreciated.

Deckard

How Do I Make An Interactive Map
Iam a old business app programmer who's got some good idea for a game project. Problem is, this is my first attempt in game developement and I am stepping into unfamiliar territory (graphics!).

How can I load a map (say the world map) and get the area (the country) under the cursor change color? Do I make an image map like in html and replace the graphics of the required portion? Do I use one large picturebox or multiple small pictureboxes to hold my graphics?

Maybe you guys can point me to some resources and links that I can use. The game is political in nature and about combatting terrorism in a global scale.

Help Please, How To Develop An Interactive Map!?
Hi..I want to develop an interactive map using VB but I have no clue on how to begin. This interactive map im talking about is an program where user can type a specific address and then the program will show the particular location according to the address of a map. I need to know what tools is needed, do I need database and more. I need to get something started for this program. I've tried surfing around the Internet and books but i still can't manage to finsh any resources. Please help!

Interactive Mode
Hi
1) Newbie again, I need to turn off the interactive mode in order to run "mget " to download multiples files from an FTP, I got help here at this forum on what to use "prompt command" how do I go using this command on my ftp code ,also how do you turn it back on once the session is close
2) once the interactive mode is turned off , how is my inet.execute command looks like
.execute,"mget *.*" & remotelocation & " " & locallocation ( is this the way to go)

does this sound ok

Thanks a bunch gurus

Interactive Powerpoint
wanna ask how to make an interactive powerpoint using option buttons, such that when you click an option button you will be transferred to another slide.This will be used for an interactive multiple-choice question.
please help me regarding this. my problem is how to code it in Visual Basic when that button is clicked.

Interactive Project...
Hello Xtreme members,
just joined right now.
Now i have a problem, I heard about this board, so I pop in.
I am making this interactive tutorial for a science subject.
Its kinda like a powerpoint, I have a statement in every label.
but the thing is I dont want all labels to appear in the forum at the same time. I want it one by one, the user will press the next or previous buttons and direct him tp the next or previous label. Can anyone help.. I hate sounding like a newb, its because vb is new to me. I am waiting..
thanks,

Web Interactive VB Program
Im trying to create an online scheduling program for my company and i need it to be live on the internet so when I make a change it is atomaticlly shown on the web. Is it possible to do this with Visual Basic 98?

Interactive Windows
Is there a way to be able to click a button, and the button (when clicked) would display a letter on the next highest window and to keep the form on top? Its for a small on-screen keyboard.

Copyright © 2005-08 www.BigResource.com, All rights reserved