Click here to Skip to main content
15,914,447 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: VSTS - fill in the blanks Pin
The Man from U.N.C.L.E.23-Sep-10 3:20
The Man from U.N.C.L.E.23-Sep-10 3:20 
AnswerRe: VSTS - fill in the blanks Pin
Pete O'Hanlon23-Sep-10 3:01
mvePete O'Hanlon23-Sep-10 3:01 
GeneralRe: VSTS - fill in the blanks Pin
NetQuestions23-Sep-10 3:10
NetQuestions23-Sep-10 3:10 
Questionadding a panel to a form. Pin
bimbambumbum22-Sep-10 13:53
bimbambumbum22-Sep-10 13:53 
AnswerRe: adding a panel to a form. Pin
bimbambumbum22-Sep-10 14:03
bimbambumbum22-Sep-10 14:03 
AnswerRe: adding a panel to a form. Pin
Luc Pattyn22-Sep-10 14:04
sitebuilderLuc Pattyn22-Sep-10 14:04 
GeneralRe: adding a panel to a form. [modified] Pin
bimbambumbum22-Sep-10 14:42
bimbambumbum22-Sep-10 14:42 
AnswerRe: adding a panel to a form. Pin
Luc Pattyn22-Sep-10 15:28
sitebuilderLuc Pattyn22-Sep-10 15:28 
In my simple test I plotted a black sine wave on a yellow background; I did not use BitmapData, I kept a Graphics open on the Bitmap, and just did (plot is the double-buffered Panel):
private void AddNewData() {
	int w=plot.Width;
	int h=plot.Height;
	int x=dataCount%w;
	bmg.DrawLine(Pens.Yellow, x, 0, x, h);
	int y=(int)(h*(0.5+0.45*Math.Sin(dataCount*0.07)));
	if (oldy<0) oldy=y;
	bmg.DrawLine(Pens.Black, x, oldy, x, y);
	oldy=y;
        dataCount++;
}


When you need fast access to the individual pixels of one column, you would not use SetPixel; instead enable unsafe code, do LockBits/UnlockBits, use a byte pointer, and advance it by Bitmap.Stride to go to another row. Examples are plenty, Bob Powell (Google!) has good ones.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: adding a panel to a form. Pin
bimbambumbum22-Sep-10 17:04
bimbambumbum22-Sep-10 17:04 
AnswerRe: adding a panel to a form. Pin
Luc Pattyn22-Sep-10 17:13
sitebuilderLuc Pattyn22-Sep-10 17:13 
GeneralRe: adding a panel to a form. Pin
bimbambumbum25-Sep-10 4:46
bimbambumbum25-Sep-10 4:46 
GeneralRe: adding a panel to a form. Pin
Luc Pattyn25-Sep-10 5:21
sitebuilderLuc Pattyn25-Sep-10 5:21 
GeneralRe: adding a panel to a form. [modified] Pin
bimbambumbum25-Sep-10 5:31
bimbambumbum25-Sep-10 5:31 
GeneralRe: adding a panel to a form. Pin
Luc Pattyn25-Sep-10 6:08
sitebuilderLuc Pattyn25-Sep-10 6:08 
GeneralRe: adding a panel to a form. [modified] Pin
bimbambumbum25-Sep-10 11:20
bimbambumbum25-Sep-10 11:20 
GeneralRe: adding a panel to a form. Pin
Luc Pattyn25-Sep-10 12:02
sitebuilderLuc Pattyn25-Sep-10 12:02 
QuestionsqlDataAdapter doest not refresh the query Pin
akosidandan22-Sep-10 5:20
akosidandan22-Sep-10 5:20 
AnswerRe: sqlDataAdapter doest not refresh the query Pin
Not Active22-Sep-10 7:42
mentorNot Active22-Sep-10 7:42 
GeneralRe: sqlDataAdapter doest not refresh the query Pin
akosidandan22-Sep-10 22:40
akosidandan22-Sep-10 22:40 
GeneralRe: sqlDataAdapter doest not refresh the query Pin
Not Active23-Sep-10 1:08
mentorNot Active23-Sep-10 1:08 
QuestionHow to Show Specific Records in listview Pin
akosidandan22-Sep-10 1:38
akosidandan22-Sep-10 1:38 
AnswerRe: How to Show Specific Records in listview Pin
Luc Pattyn22-Sep-10 2:23
sitebuilderLuc Pattyn22-Sep-10 2:23 
GeneralRe: How to Show Specific Records in listview Pin
akosidandan22-Sep-10 2:29
akosidandan22-Sep-10 2:29 
GeneralRe: How to Show Specific Records in listview Pin
Luc Pattyn22-Sep-10 2:47
sitebuilderLuc Pattyn22-Sep-10 2:47 
QuestionFile recovery Pin
hammerstein0522-Sep-10 0:57
hammerstein0522-Sep-10 0:57 

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.