Click here to Skip to main content
15,886,362 members
Home / Discussions / C#
   

C#

 
AnswerRe: Stretch to parent control Pin
LimitedAtonement18-Nov-09 7:44
LimitedAtonement18-Nov-09 7:44 
GeneralRe: Stretch to parent control Pin
Zaegra18-Nov-09 8:34
Zaegra18-Nov-09 8:34 
GeneralRe: Stretch to parent control Pin
Abhishek Sur18-Nov-09 9:49
professionalAbhishek Sur18-Nov-09 9:49 
GeneralRe: Stretch to parent control Pin
0x3c018-Nov-09 10:01
0x3c018-Nov-09 10:01 
AnswerRe: Stretch to parent control Pin
Abhishek Sur18-Nov-09 9:51
professionalAbhishek Sur18-Nov-09 9:51 
GeneralRe: Stretch to parent control Pin
Zaegra18-Nov-09 10:04
Zaegra18-Nov-09 10:04 
AnswerRe: Stretch to parent control Pin
Luc Pattyn18-Nov-09 10:08
sitebuilderLuc Pattyn18-Nov-09 10:08 
GeneralRe: Stretch to parent control Pin
Zaegra18-Nov-09 10:45
Zaegra18-Nov-09 10:45 
Well, the link provided below contains an AVI file with what I am trying to accomplish. It will definately clarify things.

[url=http://www1.zippyshare.com/v/64422131/file.html]example.avi[/url]

Even in the example you can see the flicker that occurs.
Below is the code that i'm using for the 'animation':
(PS: panel1 is the panel that contains the listview that needs to be stretched)

C#
public void Animate(Control Ctrl, int Steps)
        {
            Bitmap OriginalView = new Bitmap(Ctrl.Width, Ctrl.Height);
            Ctrl.DrawToBitmap(OriginalView, new Rectangle(0,0,Ctrl.Width,Ctrl.Height));
            int ParentWidth = (int)Ctrl.Parent.Width;
            int ParentHeight = (int)Ctrl.Parent.Height;
            int wGrowth = (int)(ParentWidth - Ctrl.Width)/Steps;
            int hGrowth = (int) (ParentHeight - Ctrl.Height)/Steps;
            panel1.BackgroundImage = OriginalView;
            Ctrl.Visible = false;

            for (int i = 0; i < Steps; i++)
            {
                Bitmap NewRender = new Bitmap(OriginalView, new Size(OriginalView.Size.Width + i*wGrowth, OriginalView.Size.Height + i*hGrowth));
                panel1.BackgroundImage = NewRender;
                panel1.Update(); 
            }
            GC.Collect();
            Ctrl.Visible = true;
            panel1.BackgroundImage = null;
            panel1.Update();
            

        }


And to end up: The dispose method won't work. If i do it throws me all sorts of error of which I still have to find out their sources...

Thanks again for your time and idea's,
Zaegra

Motivation is the key to software development.

GeneralRe: Stretch to parent control Pin
LimitedAtonement18-Nov-09 11:12
LimitedAtonement18-Nov-09 11:12 
GeneralRe: Stretch to parent control Pin
Luc Pattyn18-Nov-09 13:42
sitebuilderLuc Pattyn18-Nov-09 13:42 
GeneralRe: Stretch to parent control Pin
Zaegra18-Nov-09 19:23
Zaegra18-Nov-09 19:23 
NewsRe: Stretch to parent control Pin
LimitedAtonement20-Nov-09 6:20
LimitedAtonement20-Nov-09 6:20 
GeneralRe: Stretch to parent control Pin
Luc Pattyn20-Nov-09 7:29
sitebuilderLuc Pattyn20-Nov-09 7:29 
QuestionProgressBar like a ruler Pin
stancrm18-Nov-09 6:31
stancrm18-Nov-09 6:31 
AnswerRe: ProgressBar like a ruler Pin
musefan18-Nov-09 7:02
musefan18-Nov-09 7:02 
AnswerRe: ProgressBar like a ruler Pin
The Man from U.N.C.L.E.18-Nov-09 7:46
The Man from U.N.C.L.E.18-Nov-09 7:46 
QuestionHow to get Caller ID from Tapi3lib? Pin
grefu18-Nov-09 6:02
grefu18-Nov-09 6:02 
AnswerRe: How to get Caller ID from Tapi3lib? Pin
Richard MacCutchan18-Nov-09 11:52
mveRichard MacCutchan18-Nov-09 11:52 
GeneralRe: How to get Caller ID from Tapi3lib? [modified] Pin
grefu18-Nov-09 21:18
grefu18-Nov-09 21:18 
GeneralRe: How to get Caller ID from Tapi3lib? Pin
Richard MacCutchan18-Nov-09 21:45
mveRichard MacCutchan18-Nov-09 21:45 
GeneralRe: How to get Caller ID from Tapi3lib? Pin
grefu19-Nov-09 2:34
grefu19-Nov-09 2:34 
GeneralRe: How to get Caller ID from Tapi3lib? Pin
Richard MacCutchan19-Nov-09 6:28
mveRichard MacCutchan19-Nov-09 6:28 
Questiongraphs for compactframework Pin
benjamin yap18-Nov-09 5:44
benjamin yap18-Nov-09 5:44 
AnswerRe: graphs for compactframework Pin
cdpace18-Nov-09 11:02
cdpace18-Nov-09 11:02 
QuestionMouse Enter/Leave event (global) Pin
sodevrom18-Nov-09 5:32
sodevrom18-Nov-09 5:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.