Ok, having googled a bit more, the terminology is interpolate. I have, say, 5 colours that I need to interpolate across a Color[256].
bobsugar222
Posts
-
Color (Generics List) to Color[] -
Color (Generics List) to Color[]It's not as simple as it sounds List.Count != Color[].Length so I can't use List.ToArray() List will have n number of colours. I expect usually around 5-6. Color[] will probably have Length of 256. I want to dynamically blend the few colours from the List into Color[]. I'm trying to split the 256 into sections and blend 2 colours at a time. ie 256 / List.Count -1 My head's not in gear today so the Maths is escaping me... Any help appreciated. PS I'm playing with Fractals and I want to implement an editable colour palette. I did it a couple of years ago but I lost of the code and I'm trying to redo it...
-
Bitmap Outputing CharactersCan you clarify what you mean by 'return the result'. Are you using a
Bitmap
object?myBitmap.Save("bitmap.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
-
Collection EditorMy object has a
List<Color>
property that I want the user to be able to edit. I was presenting all the object's properties in aPropertyGrid
and this was working fine. I've since decided that I no longer need the user to see the other properties; only the List<Color>. So there's no longer a need for a propertygrid. Anyone have any ideas how I could perhaps use the Collection Editor at runtime, outside of the propertygrid, or some other method of presenting the color collection to the user for editing without having to implement my own dialog. Thanks -
C#.NET with Direct X -> a 3d game ? -
New Editorshow us the code.
-
Visual studio 2005 C#.Net1. Same way as Win Forms. Select the softkey menu in the designer. In Properties change to events view and double click the event you want to handle. 2. Only the
PictureBox
support BackgoundImage unless you overrideOnPaint
and paint it yourself. 3. That's just the way WM5 handles things. It's 'trying' to be clever. X = minimise not close. You can get apps that override this. I, for example, use sqb Pocket Plus for this. 4. Same way as WinForms. Choose an Icon from the properties of the Form in VS designer. -
New EditorOr just call
Environment.GetCommandLineArgs()
-
User Interface1. ? 2. You can't change the colour/ size of the tabs by default. There are some extended
TabControl
's about. Google it. 3. You'll want theNotifyIcon
control for this. -
Deleted records in a datasetAre changes being made to dataSet1 while changes are being made to dataSet2 in the other application?
-
Deleted records in a datasetYou don't need a second copy of the dataset to track the changes yourself. Each row has a RowState property which tracks this so you can validate / undo / whatever
-
[Message Deleted] -
Showing a record Set on WIndows C# formThe easiest and fastest way is to fill a
DataTable
with your data and bind that to theDataSource
property of aDataGridView
Control. -
Get parameters in Windows Forms AppYou don't need to do that, you can just call:
string[] args = Environment.GetCommandLineArgs();
FYI, args[0] is the app file name.
-
ListBox closeSorry, I that was from an earlier test of mine... I didn't think you were able to have the same class name as the parent namespace, so I renamed Form1 to WindowsApplication1... So it was the Form.Click event, yes. There is no reason for it not to work. If you click the form, the listBox is made invisible. I think the reason your original method didn't work was because you never explicitly set the focus to the ListBox like I did in my Button.Click event handler.
-
ListBox closeprivate void button1_Click(object sender, EventArgs e)
{
listBox1.Visible = true;
listBox1.Focus();
}private void listBox1_Leave(object sender, EventArgs e)
{
listBox1.Visible = false;
}private void WindowsApplication1_Click(object sender, EventArgs e)
{
listBox1.Visible = false;
} -
Creating windows application using C#private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Form2 form2 = new Form2();form2.Show(); //or form2.ShowDialog();
}
-
"Jumper" formThis is one way of doing it:
private void Form1_Load(object sender, EventArgs e)
{
TimeSpan startTime = new TimeSpan(13, 40, 0);
TimeSpan currentTime = DateTime.Now.TimeOfDay;
TimeSpan diff = startTime - currentTime;
if (diff.Ticks > 0)
{
timer1.Interval = (int)diff.TotalMilliseconds;
timer1.Start();
}
}private void timer1_Tick(object sender, EventArgs e)
{
timer1.Stop();
WindowState = FormWindowState.Normal;
ShowInTaskbar = true;
} -
Remove groupbox bordersNot really. But it would be simpler to use a
Panel
and override theOnpaint
to draw the label text. -
Errors with book example programI copy and pasted the class you posted into Excel and did a text to columns with : separator. I then copy and pasted column B into notepad then from notepad to a New Console application in VS. It did error with "A namespace does not directly contain members such as fields or methods" on compilation. I looked through the code and noticed Excel had inserted a '0' above the line "class CircleApp". I removed this and it works perfectly.