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(B yVal sender As Object, ByVal e As
System.Windows. Forms.PaintEven tArgs) Handles PanMain.Paint
ControlPaint.Dr awBorder(e.Grap hics, New Rectangle(1, 1,
PanMain.Width - 1, PanMain.Height - 1), Color.Gray,
ButtonBorderSty le.Solid)
End Sub
Private Sub PanScreen_Paint (ByVal sender As Object, ByVal e As
System.Windows. Forms.PaintEven tArgs) Handles PanScreen.Paint
e.Graphics.Flus h()
ControlPaint.Dr awBorder(e.Grap hics, New Rectangle(1, 1,
PanScreen.Width - 1, PanScreen.Heigh t - 1), Color.Gray,
ButtonBorderSty le.Solid)
End Sub
Thanks in advance for any kind of help.
Alex. 0 1305 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 (centered in the label)
on this label.
My font on this label is Courier new - hence fixed width character
cells.
|
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 being drawn
always in the same positions of screen.
Do you have some idea how to fix it? I want to see dots exactly drawn
from specified point.
|
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 from the toolbar).
System.Windows.Forms.ControlPaint.DrawCheckBox(e.Graphics, tempRectangle,
Windows.Forms.ButtonState.Checked)
It's draw in a cell within a grid. I use an AddHandler function to call a
function (Call it Function X) when the...
|
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 the UserPaint bit, but the method is
protected on a textbox, for example, so I can't call it.
If I call it for the form, and use DrawGrid, I get nothing. For example, in
the form Load event
|
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 i find this Flat button control ? COM, ActiveX ?
| |
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.
Thanks in advance
Geoff
|
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 to me please?
A)
protected static extern IntPtr GetWindowDC
(IntPtr hWnd );
|
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 jonts by clicking on the spesific joint.
I solved this by using checkbox (with button-appearance) upon each joint.
I know wish to further develop my windows-application. How can I make my
button-appearance checkboxs to be transparent? I wish to...
|
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 for help on this issue, I ran over a anser Linda Liu at :
http://groups.google.de/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/39e9f7d0b96b048f?hl=de
where I found the following (quick and dirty )solution to the flicker
|
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,...
|
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...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |