Click here to Skip to main content
15,887,477 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do I take datatable values into postgresql Pin
Member 141039873-Feb-23 21:33
Member 141039873-Feb-23 21:33 
GeneralRe: How do I take datatable values into postgresql Pin
Dave Kreskowiak4-Feb-23 5:40
mveDave Kreskowiak4-Feb-23 5:40 
AnswerRe: How do I take datatable values into postgresql Pin
Richard Deeming5-Feb-23 22:52
mveRichard Deeming5-Feb-23 22:52 
Question18 Errors Needs to be Fixed Pin
Michael Afolayan30-Jan-23 21:46
Michael Afolayan30-Jan-23 21:46 
AnswerRe: 18 Errors Needs to be Fixed Pin
Richard Deeming30-Jan-23 21:49
mveRichard Deeming30-Jan-23 21:49 
GeneralRe: 18 Errors Needs to be Fixed Pin
Michael Afolayan30-Jan-23 22:58
Michael Afolayan30-Jan-23 22:58 
GeneralRe: 18 Errors Needs to be Fixed Pin
Richard Deeming30-Jan-23 23:09
mveRichard Deeming30-Jan-23 23:09 
GeneralRe: 18 Errors Needs to be Fixed Pin
Richard MacCutchan30-Jan-23 23:11
mveRichard MacCutchan30-Jan-23 23:11 
GeneralRe: 18 Errors Needs to be Fixed Pin
Michael Afolayan30-Jan-23 23:23
Michael Afolayan30-Jan-23 23:23 
GeneralRe: 18 Errors Needs to be Fixed Pin
Richard MacCutchan30-Jan-23 23:09
mveRichard MacCutchan30-Jan-23 23:09 
GeneralRe: 18 Errors Needs to be Fixed Pin
Calin Negru1-Feb-23 1:00
Calin Negru1-Feb-23 1:00 
AnswerRe: 18 Errors Needs to be Fixed Pin
OriginalGriff30-Jan-23 22:09
mveOriginalGriff30-Jan-23 22:09 
GeneralRe: 18 Errors Needs to be Fixed Pin
Michael Afolayan30-Jan-23 23:15
Michael Afolayan30-Jan-23 23:15 
GeneralRe: 18 Errors Needs to be Fixed Pin
OriginalGriff31-Jan-23 2:06
mveOriginalGriff31-Jan-23 2:06 
GeneralRe: 18 Errors Needs to be Fixed Pin
CHill601-Feb-23 3:58
mveCHill601-Feb-23 3:58 
QuestionWhat's up with displaying transparent pixel? Closed Pin
mo149229-Jan-23 0:13
mo149229-Jan-23 0:13 
Still don't know why this happens but it doesn't matter. I found that setting my control
to DoubleBuffered = true, the display time goes to 0.
Sorry for the post.


Can some tell me why displaying the transparent pixel takes so much time?
See bottom of sample for time comparison.


public class CellColor
{
public Rectangle Rect;
public Color Color;
public CellColor(Rectangle rect, Color clr)
{
Rect = rect;
Color = clr;
}
}

// At form load time, this array is loaded with pixel data from a 32 x 32 Icon.
// About half of the pixels in the sample icon are transparent (A=0,R=255,G=255,B=255).
private CellColor[,]? _CellBounds;

protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
DrawCells(e.Graphics);
}

private void DrawCells(Graphics gr)
{
int iWd = this._CellBounds!.GetUpperBound(0) + 1;
int iHt = this._CellBounds.GetUpperBound(1) + 1;

Stopwatch sw = new();
sw.Start();

for (int iRow = 0; iRow < iHt; iRow++)
{
for (int iCol = 0; iCol < iWd; iCol++)
{
CellColor cc = this._CellBounds[iRow, iCol];

using(SolidBrush br = new(cc.Color))
{
gr.FillRectangle(br, cc.Rect);
}
}
}
sw.Stop();

// Displaying the data without pixel modification takes about 60 milliseconds.
// When loading _CellBounds, if I replace the transparent pixel with a real color like Color.White,
// this loop takes 4 milliseconds.
DebugClass.WriteLine(string.Format("{0}", sw.ElapsedMilliseconds));

}

-- modified 29-Jan-23 8:08am.
AnswerRe: What's up with displaying transparent pixel? Closed Pin
lmoelleb30-Jan-23 1:52
lmoelleb30-Jan-23 1:52 
QuestionWhy is my AlphaPanel approach to disable the entire GUI so slow? Pin
arnold_w25-Jan-23 4:45
arnold_w25-Jan-23 4:45 
AnswerRe: Why is my AlphaPanel approach to disable the entire GUI so slow? Pin
Gerry Schmitz25-Jan-23 6:09
mveGerry Schmitz25-Jan-23 6:09 
GeneralRe: Why is my AlphaPanel approach to disable the entire GUI so slow? Pin
arnold_w27-Jan-23 0:23
arnold_w27-Jan-23 0:23 
GeneralRe: Why is my AlphaPanel approach to disable the entire GUI so slow? Pin
Gerry Schmitz27-Jan-23 6:24
mveGerry Schmitz27-Jan-23 6:24 
GeneralRe: Why is my AlphaPanel approach to disable the entire GUI so slow? Pin
Member 1590788429-Jan-23 8:05
Member 1590788429-Jan-23 8:05 
QuestionAn appraisal application with c# Pin
Emmanuel Bullem23-Jan-23 22:46
Emmanuel Bullem23-Jan-23 22:46 
AnswerRe: An appraisal application with c# Pin
OriginalGriff23-Jan-23 22:53
mveOriginalGriff23-Jan-23 22:53 
AnswerRe: An appraisal application with c# Pin
Pete O'Hanlon24-Jan-23 2:04
mvePete O'Hanlon24-Jan-23 2:04 

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.