|
There's a SetPixel method.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
On Bitmap yes, but I can't find a way through the graphics class. Just seems strange to me that they didn't include a way to do it there.
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
What about calling DrawRectangle on a rect that is 1x1 ?
:josh:
My WPF Blog[^]
|
|
|
|
|
Don't remember if I tried that, but I know you can't draw a line that's one pixel long. I assume rectangle will fail too. I'll try it out though.
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
Try to draw small dotted line.
Try to draw circle with rect 1x1.
Or finally, set cliprect with size 1x1, and draw line (very bad solution, if upper methods does't work).
Best regards, Alexey.
|
|
|
|
|
Hi all
i want to use Console.Beep() in vs.net 2003 as it is new in 2005
what can i do?
haitham
|
|
|
|
|
You can't. That is a .NET 2.0 feature, so you cannot use it from .NET 1.x code.
:josh:
My WPF Blog[^]
|
|
|
|
|
I think you will have to use P/Invoke code to get to the Win32 Beep call.
PInvoke.net[^]
Steve Maier, MCSD MCAD MCTS
|
|
|
|
|
Do it the old-fashioned way:
Console.WriteLine("\a");
Logifusion[^]
|
|
|
|
|
That didn't work for me, in a WinForms app. Does that require some system volume setting to be non-muted?
:josh:
My WPF Blog[^]
|
|
|
|
|
Put it in a console app. It's a standard PC speaker beep, not a windows beep.
Logifusion[^]
|
|
|
|
|
Hi All
when I am trying to discover visual studio 2005, I got a strange behavior when I am trying to put about 50 button on the form and run the application it makes some flicking in the startup
I don't know why?
|
|
|
|
|
This is due to progressive redrawing of parts of a displayed surface. u can use buffering to avoid this flickering.
see Control.DoubleBuffered Property. set this one into true.
|
|
|
|
|
Thx, I tried this , DoubleBuffered is protected property and should be used in the sub class
I made an inherited class from class button and used it in my form instead of class Button
see this
class InheritedButton:Button
{
public InheritedButton()
{
this.DoubleBuffered = true;
}
}
but it is still flickers????
|
|
|
|
|
Use SetStyle(); and set it in the control that the buttons are getting added to. Also, if you are doing the adding of buttons, instead of the designer, then you should do the following:
public void LoadButtons(string[] buttontext)
{
this.SuspendLayout();
...
this.ResumeLayout();
}
-- modified at 10:03 Thursday 13th July, 2006
|
|
|
|
|
i did but still got the problem
public frmMain()
{
InitializeComponent();
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
LoadButtons();
}
private void LoadButtons()
{
panContainer.SuspendLayout();
this.SuspendLayout();
for (int j = 0; j < 50; j++)
{
InheritedButton TempButton = new InheritedButton();
TempButton.Cursor = System.Windows.Forms.Cursors.Hand;
TempButton.Size = CellSize;
TempButton.TabStop = false;
TempButton.Text = "?";
TempButton.UseVisualStyleBackColor = true;
TempButton.Click += new System.EventHandler(this.button_ClickGenralHandler);
//TempButton.Location //Coding For locations
panContainer.Controls.Add(TempButton);
}
panContainer.ResumeLayout(false);
this.ResumeLayout(false);
}
and this the code of the Inhireted Controls
class InheritedButton:Button
{
public InheritedButton()
{
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
}
}
class InheritedPanel : Panel
{
public InheritedPanel()
{
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
}
}
i still got the problem
|
|
|
|
|
IP-GATES OFFERS MCSE CCNA BOOT CAMP TRAINING IN INDIA/GOA
MCSE CCNA CCNP MCSD VB.NET RHCE CHECKPOINT CCSE CCSP
COST EFFECTIVE .A STUDY AND HOLIDAY EXPERIENCE
IP-GATES (IT TRAINING TRUSTED GLOBALLY)
http://www.ipgates.com[^]
IP-GATES (IT TRAINING TRUSTED GLOBALLY)
http://www.ipgates.com
|
|
|
|
|
Too cheap to buy an ad on CodeProject, huh?
What part of "Do not posts ads in the programming forums" do you not understand?
ipgates wrote: IP-GATES (IT TRAINING TRUSTED GLOBALLY)
Except at the CodeProject, and any other site you spammed with this garbage.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
Anybody interested in CCNA, CCNP ,CCVP,CCSP,CCIE and CISSP Boot Camp. Please click here to register or to know more.http://www.logicindia.net
|
|
|
|
|
I have a table with one column. This table has more than 1500 rows.
I want to print those 1500 rows of one column using 4 columns in the report(rdlc).
How is it possible?
|
|
|
|
|
Is there a way to get a the name of the logical drive? Not the drive letter, but the name. For example, the drive C: usually appears in under My Computer as "Local Disk ( C: )". How would I obtain the "Local Disk" text?
I love to program!
|
|
|
|
|
Give a try to WMI. There are some CP articles about WMI in C#: start here.
Best,
Jun
|
|
|
|
|
If your using C# 2005, you can get this from the DriveInfo[^] class.
"Local Disk" is the drive Type, and is used only because the drive doesn't have a volume label.
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 14:06 Wednesday 12th July, 2006
|
|
|
|
|
All very good answers, however the codeproject reference gets the drive letter, as does the DriveInfo class for C# 2005. Lets say you plug in an external hard-drive and assign it the drive letter (which is the Name property of the DriveInfo class and the ManagementObject["name"] property for WMI) "V:", and you also name it "External hard-drive". How would I get the "External hard-drive" text?
I love to program!
|
|
|
|