473,654 Members | 3,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTML Style Borders

Hello,

Anyone know how to draw HMTL style borders, such as ridge and groove,
on a VB.NET control.
I want to be able to draw borders of various styles, colours and sizes
on a picture box or similar control.

Thanks in advance.

Ian Kevan

Nov 21 '05 #1
1 1693
> Anyone know how to draw HMTL style borders, such as ridge
and groove, on a VB.NET control.
I want to be able to draw borders of various styles, colours
and sizes on a picture box or similar control.


I have a great routine for painting borders of several styles, but
unfortunately I haven't translated it to .NET yet--it's in VB6. But I can
post it if you want it.

Basically it's just a matter of lines of two or four colors. Windows assumes
a light source from the upper right corner of the screen. To draw a sunken
box, use dark colors on the top and left of the box, and light colors on the
bottom and right. The light source doesn't "shine" on the upper-left side,
which is not facing it, but does hit the lower-right side, which is facing
it. A raised box would be the opposite. A grooved border can be achieved
with a dark line on the outside top/left, a light line on the inside
top/left, a dark line on the inside bottom/right, a light line on the
outside bottom/right. And so on.

You can see how it's done by looking closely at any window. Even take a
screenshot (Ctrl-PrintScrn) and paste it into Paint, and zoom in to see it
clearly. There are system color constants defined for each shade of
shadowing/highlighting you need.

Brian

--
Brian Schwartz
FishNet Components
http://www.fishnetcomponents.com
Building better tools for developers - Be part of it!
Nov 21 '05 #2

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

Similar topics

2
4114
by: Mike Labman | last post by:
This is more of an HTML/CSS question, but I figure someone in here might know. I'm using in the stylesheet: BORDER-RIGHT: none; BORDER-TOP: none; BORDER-LEFT: none; BORDER-BOTTOM: none; OVERFLOW: hidden;
2
4572
by: Csaba2000 | last post by:
The following code has me so confused, I don't even know the right questions to ask. Opera 7.01 and IE 5.5 both exhibit behaviours I don't understand while NN 6.1 seems to ignore me altogether. The upshot: .style.cursor seems to be ignored under certain circumstances. Let's take something that's mostly repeatable and maybe someone can explain to me what's happening. In Opera 7.01
3
29016
by: Frostillicus | last post by:
I work with Interwoven TeamSite in an environment where I do not have access to customise the default stylesheet, so the only option available to me is to specify an additional stylesheet wherein I can add further customisations. My problem is that the master stylesheet, which I can not edit or remove, includes a CSS selector for all input elements such that the border is thus: border: 1px #cccccc solid;
0
2764
by: Maileen | last post by:
Hi, I try to add/modify some style in Word 2002 and 2003 using VB, but I have such error : System.runtime.interopServces.COMException(0x800A1735) : Given Items does not exist. at word.Styles.get_item(Object& Index) i don't have any number of code line where is the mistake.. i only know that my code is the following one :
3
2527
by: Peter Kellner | last post by:
I've got my problem down to a very simple example that shows it. Basically, I have an html table in a header file, and an html in my body. Both have the same width, and the same number of columns. One table has 2 actual columns (that span 3 columns each) and the other has 6 columns (no spanning). Problem is the two tables don't line up. What am I not understanding or setting? I'm thinking they should line up. They don't in IE or...
8
3884
by: Warren Sarle | last post by:
Here are two screen captures: http://www.warrensarle.com/borders.gif of this one web page: http://www.warrensarle.com/borders.php in IE and Firefox. A border-style of solid is rendered the same in both browsers. Border-styles of outset and ridge produce radically different colors (grays in this case; saturated colors produce even more dramatic differences) in the two browsers. In particular, a border color of #000000 is rendered as black...
69
13420
by: RC | last post by:
I know how to do this in JavaScript by window.open("newFile.html", "newTarget", "scrollbars=no,resizable=0,width=200,height=200"); The browser will open a new window size 200x200, not allow resize and no auto horizontal, vertical scrolling bars. I am wonder can I do the similar inside a HTML file like
17
5836
by: Grant Kelly | last post by:
I'm wondering if it's possible within HTML markup (or possibly CSS) to specify that an HTML table's headers should be placed 'over' the cell borders rather than 'within' the cells. For example (requires monospace font): Default: +--------------------+ | H1 H2 H3 | +--------------------+
18
3461
by: coachjerry | last post by:
I'm a senior citizen with a tech background, though a newbie to programming and style sheets. I'm usually able to make HTML and css changes to existing designs, but I'm stuck on this one and would like some help. I'm using Amaya as an HTML/XTML editor and my pages comply with the XML standards. The web pages display perfectly on my Windows XP, service pack 3, home pc, with either Firefox 3 or IE 7 (I think). However, when I move the pages to...
0
8290
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
8815
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
8708
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8594
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
7307
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...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
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
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2716
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

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.