|
Why don't you ask the same person who did all your work that got you into your final year? Has you doctor made you cut back on salty intake?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Abdaqader wrote: helping me in making project
I've got the answer to your problem! Bunnies! I like bunnies and lets face it who doesn't!
You could write an AI bunny, maybe call it a Rabbot (my little joke there). Just start out simple with the Rabbots hoping about. Then you could add in boy bunnies with blue bow ties, and girl bunnies with pink bonnets. A little bit of inheritance never hurt; unless your mom and sister are one and the same.
Once you've got your different bunny rabbots working you could then try and make them interact and see how long it takes for them to tell you to feck off and do something useful instead of creating lots of dirty bunny pron!
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
, but you may get accused of being over flippant.
|
|
|
|
|
Richard MacCutchan wrote: over flippant
Bunny pron does that...
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Hi,
I need to use Redemption.RDOSession class in my code to get internetHeaders of emails..I don't know what reference to be added in my project to use this Redemption namespace..Can anyone help me with this..
Thanks..
|
|
|
|
|
nirmalsat wrote: I need to use Redemption.RDOSession class in my code to get internetHeaders of emails
Do you think maybe Outlook Redemption[^] could help?
|
|
|
|
|
hello sir
i have one raw image file ...how to add 16 bit bitmap header to this raw image file ...please respond me
thanks
|
|
|
|
|
Do you mean how to save it as a 16 bit image ? How raw is raw ? Your best bet is to load it into a Bitmap and save it to a stream as a 16 bit BMP.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks for your replay sir ..
FileStream reader = null;
FileStream writer = null;
writer = new FileStream(OutputFileName, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Write);
byte[] data = new byte[reader.Length - position];
reader.Position = position;
reader.Read(data, 0, data.Length);
writer.Write(data, 0, data.Length);
writer.Close();
the output of raw image data are in FileStream writer.. but how to add bit map header in this raw data ..
thanks
|
|
|
|
|
I'm not sure that you've added any info that I can use.
1 - what do you mean by 'raw', where did it come from ?
2 - why can't you just use the bitmap class to do this for you ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
1 - what do you mean by 'raw', where did it come from ?
2 - why can't you just use the bitmap class to do this for you ?
raw means its unknown file format its not standard ..its coming from DICOM (dcm ) medical image file
|
|
|
|
|
OK - well, adding a header won't remotely help you, why would you want to do that, you'd basically break the file.
The DICOM format does support raw data, but it also supports about 20 different types of compression, including JPEG. You should do one of two things
1 - pass the file into a Bitmap to see if it can work it out, and if not, forget about being able to view it. Adding a 16 bit header sure as hell won't turn the data into a 16 bit bitnmap
2 - buy the Atalasoft DICIOM library, it will decode DICOM images for you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have 2 forms, Form1 and Form2.
When I select the item from listbox in Form2 and press 'OK', I would like to show the selected item in the textbox in Form1.
Thank you very much in advance.
|
|
|
|
|
Form2 should expose a delegate on which Form1 will subscribe. When item is selected in list box, you call this delegate instance.
Best wishes,
Navaneeth
|
|
|
|
|
Thank you for your fast response Navaneeth. Really appreciate that.
But care to explain about the delegation? I am a programming noob. Just became a programmer last week.
Thank you..
|
|
|
|
|
You'd do something like:
delegate void ListItemChangedHandler(string newItemText);
class Form2 : Form
{
public ListItemChangedHandler ListItemChanged = null;
void onListItemChange(object sender,...)
{
if(ListItemChanged != null)
ListItemChanged(listbox1.Text);
}
}
class Form1 : Form
{
void ShowForm2()
{
Form2 frm2 = new Form2();
frm2.ListItemChanged += ListBoxValueChanged;
}
void ListBoxValueChanged(string text)
{
yourTextBox.Text = text;
}
} A good book will help you to get started.
Best wishes,
Navaneeth
|
|
|
|
|
ok..thank you again..
|
|
|
|
|
I am tryng to access a comboBox control from a different Thread of the Main Thread (in which it is created), how can access it´s propertys like Text, SelectedItem... not only for setting but also for recover it`s contain.
I know that I need to use delegates and Invoke Methods, but I don´t know the logic of the creation of the methods and I don´t get the correct one.
Best Regards
|
|
|
|
|
So you should read up on the topic. This[^] explains it.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Your recomended page give me a solution for the set property but not when I Try to get the value contained by any property ofthe control so I've created the following code which give me an error, could you please check it ?
public delegate string DelegadoTexto2(Control ct);
string getText(Control C)
{
if (!InvokeRequired)
return C.Text;
else
return (string)Invoke(new DelegadoTexto2(getText), C.Text);
}
I still receive the error telling that I'm using the control from other Thread different of the creation Thread.
Best Regards
|
|
|
|
|
it is the same principle:
public delegate string stringGetter(Control c);
public string GetText(Control c) {
if (c.InvokeRequired) {
return (string)c.Invoke(new stringGetter(GetText), new object[] { c });
} else {
return c.Text;
}
}
And please do use PRE tags to show code.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
AFAIK, you don't need Invoke /BeginInvoke always just for reading a control's properties from a worker thread. I believe it is only required when the call accesses control's handle. It is required in the case of ComboBox .
Thread worker = new Thread((ThreadStart)delegate
{
string str = button1.Text;
string str1 = comboBox1.Text;
});
worker.Start(); Do you think Invoke /BeginInvoke should be used always when reading properties of a control from a worker thread or use it only when it requires?
Any thoughts?
Best wishes,
Navaneeth
|
|
|
|
|
N a v a n e e t h wrote: only required when the call accesses control's handle
I don't know. If all the property does is return the value of a class member, then that would make sense. However, AFAIK the documentation doesn't say which control properties do or don't access Handle? So should I gamble on this?
[ADDED]A little experiment confirms a thread can get a button's text without a cross-thread exception being thrown, but not a combobox text. [/ADDED]
If the rule were "reading a property is always fine, independent of handles", that would be nice. But it isn't.
Any references that shed a light?
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
modified on Monday, October 26, 2009 7:51 AM
|
|
|
|
|
Luc Pattyn wrote: [ADDED]A little experiment confirms a thread can get a button's text without a cross-thread exception being thrown, but not a combobox text. [/ADDED]
That was my point. ComboBox.Text is using the handle. Watch the stack trace and you will see error thrown at the point where it touches handle.
But after investigating further, I too think that its kind of gambling. As you said using Invoke/BeginInvoke would be safe as the documentation doesn't say anything about how the properties are implemented.
Best wishes,
Navaneeth
|
|
|
|
|
I now have extended my article[^] accordingly.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|