Click here to Skip to main content
15,913,487 members
Home / Discussions / C#
   

C#

 
AnswerRe: synchronization with serialport ? Pin
Muammar©26-May-07 19:39
Muammar©26-May-07 19:39 
Questionread data from excel Pin
Mujz.........26-May-07 8:59
Mujz.........26-May-07 8:59 
QuestionHow to use code templates for entity properties Pin
AndrusM26-May-07 8:54
AndrusM26-May-07 8:54 
QuestionShow combobox list opening control only in current row Pin
AndrusM26-May-07 8:53
AndrusM26-May-07 8:53 
QuestionDropDownWidth ignored in DataGridViewComboBoxColumn Pin
AndrusM26-May-07 8:51
AndrusM26-May-07 8:51 
Questionhow to tell to regex (regular expression) that ignore some charachters ? Pin
hdv21226-May-07 8:40
hdv21226-May-07 8:40 
AnswerRe: how to tell to regex (regular expression) that ignore some charachters ? Pin
mav.northwind26-May-07 21:59
mav.northwind26-May-07 21:59 
QuestionSetStyle( ) to eliminate flicker causes problem. Pin
Ylno26-May-07 7:56
Ylno26-May-07 7:56 
Hello all,

i've written some code that displays a ball bouncing around inside a windows
form. In an attempt to eliminate the flickering of the ball i copy-pasted this
into the the Form's constructor:

<br />
        this.SetStyle(<br />
            ControlStyles.UserPaint |<br />
            ControlStyles.AllPaintingInWmPaint |<br />
            ControlStyles.DoubleBuffer, true);<br />


Now when I try to run the code I get this error message. Does anyone know why? or know another way to stop this flickering. Thanks

Error msg:
********************************************************************************************
System.ArgumentException: Parameter is not valid.
at System.Drawing.Graphics.GetHdc()
at System.Drawing.BufferedGraphics.RenderInternal(HandleRef refTargetDC, BufferedGraphics buffer)
at System.Drawing.BufferedGraphics.Render()
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsApplication1.Program.Main() in C:\Documents and Settings\Gareth\My Documents\C#\Working_Programs\Bouncing_Ball_With_Gravity\Bouncing_Ball_With_Gravity\Program.cs:line 19
***************************************************************************************************
Questionclearing table or dataGrid and make the table selected fit in my dataGrid Pin
spawn_ro198526-May-07 6:16
spawn_ro198526-May-07 6:16 
QuestionDirectoryInfo Problem Pin
Mohammed Elkholy26-May-07 5:20
Mohammed Elkholy26-May-07 5:20 
AnswerRe: DirectoryInfo Problem Pin
kubben26-May-07 7:14
kubben26-May-07 7:14 
AnswerRe: DirectoryInfo Problem Pin
Luc Pattyn26-May-07 8:28
sitebuilderLuc Pattyn26-May-07 8:28 
Questionexport from grid to excel,word Pin
praveenanand26-May-07 3:18
praveenanand26-May-07 3:18 
AnswerRe: export from grid to excel,word Pin
Manoj Kumar Rai26-May-07 7:02
professionalManoj Kumar Rai26-May-07 7:02 
QuestionOpen File Dialog again Pin
mihksoft26-May-07 3:02
mihksoft26-May-07 3:02 
QuestionHashtable Pin
pranu_1326-May-07 2:55
pranu_1326-May-07 2:55 
AnswerRe: Hashtable Pin
Dave Herren26-May-07 5:00
Dave Herren26-May-07 5:00 
AnswerRe: Hashtable Pin
Kevin McFarlane26-May-07 5:25
Kevin McFarlane26-May-07 5:25 
AnswerRe: Hashtable Pin
Kevin McFarlane26-May-07 5:30
Kevin McFarlane26-May-07 5:30 
QuestionPicture box and drawing Pin
Anka_Ame26-May-07 0:44
Anka_Ame26-May-07 0:44 
QuestionGet "current playing" movie/song in WMP Pin
mulybenj26-May-07 0:22
mulybenj26-May-07 0:22 
AnswerRe: Get "current playing" movie/song in WMP Pin
henur26-May-07 21:38
henur26-May-07 21:38 
GeneralRe: Get "current playing" movie/song in WMP Pin
mulybenj27-May-07 1:09
mulybenj27-May-07 1:09 
GeneralRe: Get "current playing" movie/song in WMP Pin
henur27-May-07 4:54
henur27-May-07 4:54 
QuestionExecuting an exe file from a Windows Service Pin
M. J. Jaya Chitra25-May-07 23:10
M. J. Jaya Chitra25-May-07 23:10 

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.