|
y eah ....
but nw i did
N i need HELP badly... (
|
|
|
|
|
Hello Everybody.
I've created a control (MultiColumnToolbar) which contains 3 columns(ToolbarColumn | Left,Center,Right). Those columns contain my buttons and render a background. I've created 3 designers (MultiColumnToolbar, ToolbarColumnDesigner, ToolbarItemDesigner) which provide some DesignerVerbs for adjusting properties and creating elements.
My problem is that ToolbarColumns are set into designmode. Only if I open the MultiColumnToolbar.cs in designmode (control) and place a ToolBarColumn on the surface the ToolbarColumnDesigneris activated. It seems it's because the columns are created in the Toolbar and are not part of the target form.
The ControlDesigner provides a method EnableDesignMode to solve the described problem for sub-controls. Is there a way to enable the DesignMode for those sub-components?
- Daniel
|
|
|
|
|
Hi,
I am having problems with the background of the image after it has been rotated and then saved.
It saves the rotated image fine but it has a black background but i would like it to be transparent, similar to what occurs under Windows Operating System.
I tried using MakeTransparent method before but doesnt seem to work.
Here is the code:
Bitmap temp = (Bitmap)ActualImage;
Color c = temp.GetPixel(1,1);
temp.MakeTransparent(c);
.......
sfdlg.SaveImage(sfdlg.FileName,temp,80);
Could anybody assist me with this please?
Thanks
|
|
|
|
|
I don't know what method you use there to save your file, but my guess is you save it as a bitmap (bmp).
If so, then I must inform you that bitmaps (bmp files) do not support transparency... the gif and png file format on the other hand supports transparency.
I have no smart signature yet...
|
|
|
|
|
Hi,
I am saving the images as JPEGs and i am using the following code:
credit goes to microsoft
private static ImageCodecInfo GetEncoderInfo(String mimeType)
{
int j;
ImageCodecInfo[] encoders;
encoders = ImageCodecInfo.GetImageEncoders();
for(j = 0; j < encoders.Length; ++j)
{
if(encoders[j].MimeType == mimeType)
return encoders[j];
}
return null;
}
private void SaveJPGWithCompressionSetting( Image image, string szFileName, long lCompression )
{
EncoderParameters eps = new EncoderParameters(1);
eps.Param[0] = new EncoderParameter( Encoder.Quality, lCompression );
ImageCodecInfo ici = GetEncoderInfo("image/jpeg");
image.Save( szFileName, ici, eps );
}
|
|
|
|
|
|
How can i pass Data from data grid to text box while the record in the data grid is highlighted.
TEXT BOX in Form1 & DataGrid in Form2
How Can?
|
|
|
|
|
So what exactly is the problem?
Getting the highlighted cell text or passing it to the other form?
If problem is passing then use a delegate or (and I really don't recomend this one)
a simple static method in the form1 that sets the text of thexbox 1.
The delegate is the way I would go.
|
|
|
|
|
This[^] will give you the basic idea
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
I have a project (Windows Application) where I have a DataGridView control, inside of this I have a DataGridViewComboBoxColumn field, and I need when i open that DataGridViewComboBoxColumn to have another DataGridView inside it(something like we have dateTimepicker in datagridviewcomboboxColumn).
So Plz HELP!
|
|
|
|
|
This may be of some help.
|
|
|
|
|
Thanks for your ans !
But not use for me!
|
|
|
|
|
Hi,
Please reply to proper message. You are replying your own message.
While replying please make sure your are replying to proper person/message, which will help you get answer as early as possible.
Cheers !
Abhijit
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Sorry !
I will pay attention to your Advise !
|
|
|
|
|
lol AGAIN
Hey the message u want reply see the Reply link on that message. Every message got that link, you might wanna wonder why ?
|
|
|
|
|
I was mistake !
Thanks for alerting me !
Now plz ans my question and give me a great HELP!
|
|
|
|
|
jojoba2011 wrote: I was mistake !
Now you are ABSOLUTE TRUTH
|
|
|
|
|
Very Shame for CodeProject Users that nobody can solve this problem!
Plz HELP!
|
|
|
|
|
Hy,
It's not that they can't it's just a lot of work.
Look at Luc's answer bellow.
You have to implement/draw a custom datagridview => a lot of work.
modified on Sunday, April 11, 2010 10:34 PM
|
|
|
|
|
Unless the state of the art has evolved since two days ago, this[^] must be the answer to your question.
|
|
|
|
|
Plz give me more options and helps!
|
|
|
|
|
OK Just to help with what exactly you need to do is to develop classes just like CheckboxColumn
1. DataGridViewCheckBoxColumn
2. DataGridViewCheckBoxCell
3. DataGridViewCheckBoxCell.DataGridViewCheckBoxCellAccessibleObject
OR
You might achieve it by inheriting these classes to support your need
And Yes its a lot of work !!! Sorry it doesn't mean no one here on CodeProject want to help you.
BTW I think you already has an answer when you said "something like we have dateTimepicker in datagridviewcomboboxColumn" in you first post. Try to learn from that and implement DatagridView in place of datatimepicker
Makes sense ?
|
|
|
|
|
Hi,
I've written the following code for batch renaming.
Is it Horror ? if so, how should I fix it?
private void rename_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("Are you sure ?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result == DialogResult.Yes)
{
Thread tr = new Thread(new ThreadStart(chnTarget));
tr.Start();
}
}
private void chnTarget()
{
this.Invoke(new ThreadStart(ChangeName));
}
bool cancel = false;
private void ChangeName()
{
Random rand = new Random(DateTime.Now.Second);
string folder_path = SelectedPathText.Text;
long progress_value = 0;
string new_filename = "";
cancel = false;
progressBar1.Minimum = 0;
progressBar1.Value = 0;
try
{
string[] FullPathFileNames = System.IO.Directory.GetFiles(folder_path);
progressBar1.Maximum = FullPathFileNames.Length;
if (FullPathFileNames.Length == 0) throw new Exception("No File Found \n");
foreach (string filename in FullPathFileNames)
{
if (cancel)
{
labelResult.Text = "Canceled";
break;
}
progress_value++;
try
{
if (!radioRandom.Checked)
{
new_filename = folder_path + "\\" + textBoxTemplate.Text + progress_value + Path.GetExtension(filename);
}
else
{
if (checkBoxOmitExtension.Checked)
new_filename = folder_path + "\\" + rand.Next();
else
new_filename = folder_path + "\\" + rand.Next() + Path.GetExtension(filename);
}
File.Move(filename, new_filename);
Application.DoEvents();
}
catch { }
progressBar1.Value = (int)progress_value;
progressBar1.Update();
}
labelResult.Text = "Complete";
cancel = false;
}
catch (Exception ex)
{
labelResult.Text = ex.Message;
}
}
The Project of above snippet code:
Batch Renamer in C#[^]
|
|
|
|
|
yes.
Seishin# is correct all the way.
|
|
|
|
|
Well, How should I fix it?
Where is the problem ?
|
|
|
|