Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / January 2006

Tip: Looking for answers? Try searching our database.

Repainting UserControl

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dino Buljubasic - 11 Jan 2006 22:21 GMT
Hi,

I am using C# 2.0 (VS2005) to build my user control that contains a
number of dynamically loaded ListViews.  ListViewItems have their
ForeColor properties set to either black or blue to distinguish
between ListViewItems.

As long as no other application window (i.e. word or calculator, or
...) goes over my running form, ForeColor properties or each
ListViewItem stays black or blue as intended.

However, if another application window moves over my running form and
the ListViewItems, or if my form is maximized, the ListViewItems that
were covered by other window or  invisible change their ForeColor to
black (ForeColor changes to black).

I use protected overloaded OnSizeChanged  event to handle resizing my
user control as:

protected override void OnSizeChanged(EventArg e)
{
     base.OnSizeChanged(e);

     reloadUserControl();
}

 This event calls first base.OnSizeChanged(e) event, then handles
redrawing and reloading of my user control.  I have not identified any
other problems except this one.

Any Help Will Be Appreciated,
_dino_
Dino Buljubasic - 23 Jan 2006 20:39 GMT
For those interested, I have found out that this is rather an IDE
issue than coding issue.  When I run my application from IDE, this
repainting problem occurs, when I run it from compiled .exe, the
problem is gone.

_dino_

>Hi,
>
[quoted text clipped - 28 lines]
>Any Help Will Be Appreciated,
>_dino_

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.