473,386 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ControlPaint.Drawborder

First of all i know that this might be for the Drawing newsgroup but i
posted there and got no answers so.... let see if somebody here can help
me.
Hi , i got some problems using Paint event... the thing is that i got my
form divided in 2 using a splitter. the splitter divides 2 Panels that
are Docked to Fill
inside each panel i want to draw a small grey rectangle acting like
borders of the panel,it is working but if i move the Splitter sometimes
it does not refresh , or keeps drawing multiple lines without deleting
the previous ones.
Inside my Paint Event of my Panels i got the following code:

Private Sub PanMain_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles PanMain.Paint
ControlPaint.DrawBorder(e.Graphics, New Rectangle(1, 1,
PanMain.Width - 1, PanMain.Height - 1), Color.Gray,
ButtonBorderStyle.Solid)
End Sub

Private Sub PanScreen_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles PanScreen.Paint
e.Graphics.Flush()
ControlPaint.DrawBorder(e.Graphics, New Rectangle(1, 1,
PanScreen.Width - 1, PanScreen.Height - 1), Color.Gray,
ButtonBorderStyle.Solid)
End Sub

Thanks in advance for any kind of help.
Alex.

Nov 20 '05 #1
0 1282

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

Similar topics

4
by: Stuart Norris | last post by:
Dear Readers, I am attempting to draw box around some text using unicode on multiline label. The label is forty characters wide and 12 lines deep. I have been trying to draw a box around text...
1
by: Tomasz Kulig | last post by:
Hello... I've some annoying problem when I use DrawGrid method. It seems that it ignores nOffsetX and nOffsetY (refer to example code). Bounding rectangle can be moved, but points of grid are...
4
by: Joe Kasta | last post by:
Here's a tricky question..:) I have a a function in a webform that will draw a checkbox in a given area (note, this is an override of a PaintForeground function, not a drop / drag of a checkbox...
0
by: Charles Law | last post by:
The ControlPaint class looks like the ideal way to draw grab handles, a grid, and other designer-like stuff in a windows form, but I can't make it work. I realise I need to use SetStyle to set...
7
by: Maileen | last post by:
Hi, I asked few days ago about a flat button control under VB.NET but answer didn't satisfy me. I know that a such button existed under VB6 so it should exist under VB.NET also. Where can...
16
by: Geoff Jones | last post by:
Hiya Could anybody direct me to some examples of code to do the following: Display a bitmap on a form which can then be moved about i.e. dragged, using the left down button of the mouse. ...
8
by: pigeonrandle | last post by:
Hi, Please pity me, i am on a dial-up connection for the first time in 5 years :( ! Does anyone know how the resulting Graphics objects differ ...? What i really mean is can someone explain it...
2
by: =?Utf-8?B?SGFucyAtIERpYUdyYXBoSVQgLQ==?= | last post by:
Hi! I have a windowsform with an imagebox inside a groupbox. The imagebox shows a image of a man with joints (for medical purose - shoulder, ancle, wrist etc.). The user is able to mark the...
8
by: Rainer Queck | last post by:
Hello NG, I had/have a bad flicker Problem with my Application. On starting some applications, while my app was running, the whole Display started to flicker. Even the desktop Icons! Looking...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...

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.