473,732 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

putting a line on my form

cj
Back in VB4 there was a line tool in my toolbox that allowed me to put a
decorative line on the form somewhere. Does VB.net 2003 offer this?
It's not in the toolbox and I can't find it in the list to add to the
toolbox.
Jun 22 '06 #1
16 4159
"cj" <cj@nospam.nosp am> schrieb:
Back in VB4 there was a line tool in my toolbox that allowed me to put a
decorative line on the form somewhere. Does VB.net 2003 offer this?


No, it doesn't.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Jun 22 '06 #2
guy
use a 1 pixel high label (horizontal line) or 1 pixel wide label (vertical
line)

hth guy

"cj" wrote:
Back in VB4 there was a line tool in my toolbox that allowed me to put a
decorative line on the form somewhere. Does VB.net 2003 offer this?
It's not in the toolbox and I can't find it in the list to add to the
toolbox.

Jun 22 '06 #3
cj
that sucks

Herfried K. Wagner [MVP] wrote:
"cj" <cj@nospam.nosp am> schrieb:
Back in VB4 there was a line tool in my toolbox that allowed me to put
a decorative line on the form somewhere. Does VB.net 2003 offer this?


No, it doesn't.

Jun 22 '06 #4
cj
I might do that, but I might use GDI graphics. It just seems overly
complicated to use GDI graphics for 1 horizontal line. I'm thinking
I'll need to put it in the form paint event too. I wonder which way
requires the least resources from the pc, a label 1 pixel high or a gdi
graphic generated line?

guy wrote:
use a 1 pixel high label (horizontal line) or 1 pixel wide label (vertical
line)

hth guy

"cj" wrote:
Back in VB4 there was a line tool in my toolbox that allowed me to put a
decorative line on the form somewhere. Does VB.net 2003 offer this?
It's not in the toolbox and I can't find it in the list to add to the
toolbox.

Jun 22 '06 #5
cj,

I would take the advice from guy, using GDI makes it slow.

Cor

"cj" <cj@nospam.nosp am> schreef in bericht
news:uy******** ******@TK2MSFTN GP04.phx.gbl...
I might do that, but I might use GDI graphics. It just seems overly
complicated to use GDI graphics for 1 horizontal line. I'm thinking I'll
need to put it in the form paint event too. I wonder which way requires
the least resources from the pc, a label 1 pixel high or a gdi graphic
generated line?

guy wrote:
use a 1 pixel high label (horizontal line) or 1 pixel wide label
(vertical line)

hth guy

"cj" wrote:
Back in VB4 there was a line tool in my toolbox that allowed me to put a
decorative line on the form somewhere. Does VB.net 2003 offer this?
It's not in the toolbox and I can't find it in the list to add to the
toolbox.

Jun 22 '06 #6
cj
Guy's advice looks and works nice. It's a shame we have to fool VB into
making a line using a label. I've been reading and GDI seems to be the
way they want us to make lines now.

Cor Ligthert [MVP] wrote:
cj,

I would take the advice from guy, using GDI makes it slow.

Cor

"cj" <cj@nospam.nosp am> schreef in bericht
news:uy******** ******@TK2MSFTN GP04.phx.gbl...
I might do that, but I might use GDI graphics. It just seems overly
complicated to use GDI graphics for 1 horizontal line. I'm thinking I'll
need to put it in the form paint event too. I wonder which way requires
the least resources from the pc, a label 1 pixel high or a gdi graphic
generated line?

guy wrote:
use a 1 pixel high label (horizontal line) or 1 pixel wide label
(vertical line)

hth guy

"cj" wrote:

Back in VB4 there was a line tool in my toolbox that allowed me to put a
decorative line on the form somewhere. Does VB.net 2003 offer this?
It's not in the toolbox and I can't find it in the list to add to the
toolbox.


Jun 22 '06 #7
cj,

I am glad you write that, I had already written this is a little bit other
way somewhere else.

Cor

"cj" <cj@nospam.nosp am> schreef in bericht
news:OM******** ******@TK2MSFTN GP05.phx.gbl...
Guy's advice looks and works nice. It's a shame we have to fool VB into
making a line using a label. I've been reading and GDI seems to be the
way they want us to make lines now.

Cor Ligthert [MVP] wrote:
cj,

I would take the advice from guy, using GDI makes it slow.

Cor

"cj" <cj@nospam.nosp am> schreef in bericht
news:uy******** ******@TK2MSFTN GP04.phx.gbl...
I might do that, but I might use GDI graphics. It just seems overly
complicated to use GDI graphics for 1 horizontal line. I'm thinking
I'll need to put it in the form paint event too. I wonder which way
requires the least resources from the pc, a label 1 pixel high or a gdi
graphic generated line?

guy wrote:
use a 1 pixel high label (horizontal line) or 1 pixel wide label
(vertical line)

hth guy

"cj" wrote:

> Back in VB4 there was a line tool in my toolbox that allowed me to put
> a decorative line on the form somewhere. Does VB.net 2003 offer this?
> It's not in the toolbox and I can't find it in the list to add to the
> toolbox.
>


Jun 22 '06 #8

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:ea******** ******@TK2MSFTN GP02.phx.gbl...
cj,

I would take the advice from guy, using GDI makes it slow.

Cor


How so? I see adding a label to the form would be slower because the label
uses GDI to draw all 4 borders, while using GDI, you just draw one line...

Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
MyBase.OnPaint( e)

e.Graphics.Draw Line(Me.ForeCol or, 100, 100, 300, 100)
End Sub

Code not tested :)

HTH,
Mythran

Jun 22 '06 #9
cj
Mythran,

How about giving me that line in a manner that can be pasted into
Form1_Load or Form1_Paint event? I'd like to play with it.
Mythran wrote:

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:ea******** ******@TK2MSFTN GP02.phx.gbl...
cj,

I would take the advice from guy, using GDI makes it slow.

Cor


How so? I see adding a label to the form would be slower because the
label uses GDI to draw all 4 borders, while using GDI, you just draw one
line...

Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
MyBase.OnPaint( e)

e.Graphics.Draw Line(Me.ForeCol or, 100, 100, 300, 100)
End Sub

Code not tested :)

HTH,
Mythran

Jun 22 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8486
by: Rich N | last post by:
When I open my form, I want the records already in it to be in Ascending Order based on one field. Though I keep putting them in Ascending order and then saving the form, each time I re-open the form, they're out of order. What am I missing here?
7
1902
by: xtra | last post by:
Hi Folk I am wondering if it is possible to put a form in the middle of the screen. That is, my form is about 20cms wide by 11 cms high, but my screen is much wider and higher, so I was wondering if it possible to put it in the middle of my screen. Any ideas?
2
1255
by: tony collier | last post by:
I have the following in one of my .aspx pages: ..... <script runat="server"> enum bookstores { Amazon,
0
2194
by: Anish G | last post by:
Hi, I have an issue with reading CSV files. I am to reading CSV file and putting it in a Datatable in C#. I am using a regular expression to read the values. Below is the code. Now, it reads CSV file without any issues only if all the fields are not null. If any field is blank, it moves the values to the left and displays the value under invalid column. Example is shown below: A part of CSV file. I am reading the first row as...
0
2408
by: drawing in aspnet | last post by:
Question about putting the data layer in a separate class library. I keep reading that the data layer should be separated from the presentation layer and put in its own class library. I am trying to do this but running into a problem. I'm hoping someone can point me in the right direction. I first create a class library (all code in C#) and within this class library create a very simple Sql Server Express database (.mdb) file. It's...
2
1464
by: mark r | last post by:
Hi there, im making a simple site where people can add comments into a shoutbox. only ive had experience of people adding in html tags and javascript to redirect people away from my site and display images etc which im not interested in. how do i stop this from happening? is there a way to intercept the form contents and kick out the code leaving plain text? or changing the code so it displays the real code using &lt; and &gt; ?
4
1530
by: Vernon Wenberg III | last post by:
I'm not really sure how readline() works. Is there a way to iterate through a file with multiple lines and then putting each line in a variable in a loop?
0
940
by: bl0ndiegurl14 | last post by:
I want to put my myspace comment box beside my dizzler music player my comment box keeps going underneath it. this is the codes to both the objects if somone could make a code where they go side byside i would very much appreciat it. i would like the music player on the left. comment box: <form method="post" action="http://comments.myspace.com/index.cfm?fuseaction=user.ConfirmComment"><input type="hidden" name="friendID"...
11
4212
by: JWest46088 | last post by:
I'm having difficulty trying to figure out how to print a text file from a hash table one line at a time. I have the text file read into the hash table and can print the text file all at once, but I can't seem to figure out how to do it one line at a time. Here is what I'm trying to do: I want the user to be able to print the text file one line at a time by clicking a button to see the next line. Example: If text_file1 first line is...
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8774
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9447
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9181
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.