|
um...view->field explorer? it could be a tab on the side mabye...i dont know what your in or how it was set up before...i cant really help with that.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hello!
I have a question about retrieveing a toolstripmenuitem from a contextmenustrip.
In a certain function I do the following:
contextmenustrip.Show();
After that I would like the function to be halted until one of the toolstripmenuitems is clicked and this item is the returned into the funtion.
So I don't want to use an event but rather something like one can do with forms:
if (this.TestForm.ShowDialog(this) == DialogResult.OK)
Is something similar possible with contextmenustrips?
|
|
|
|
|
As far as I am aware their is no way to emulate a ShowDialog method for a menu. If their is a such a way you would have to work with Windows API or advanced menu events.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
I have to read a large quantity of bianry data from a file and then store this data in an XML tag. There is approximately 8 MB of data.
This can be slow just to read the 8MB into memory using StreamReader.
I tried reading sayy 500k at a time. But i still have the issue of storing 8MB into memory.
If i would have just read 500k and then write 500k, i would be ok. But i am using XMLTextWriter that does not allow me to write tag data piece by piece. I have to have all the data and then write it to tag.
Any suggestions on how to handle this effectively will be appreciated.
Thanks,
cw
|
|
|
|
|
if you are just saving binary to XML you'll double the size of your data. If you encode it to base64 it'll only be about 4/3 the orginal size, but with conversion overhead.
Why do you need 8MB of binary data in XML anyway? To me it sounds like a design flaw not a memory issue.
-Spacix
All your skynet questions[ ^] belong to solved
I dislike the black-and-white voting system on questions/answers.
|
|
|
|
|
I actually do encode to base64. It does not even get that far as it is stuck reading all the data from the file.
The reason i need to do it this way is because another application creates this data(video) and dumps it to a folder.
My application has to read it in, and put in an XML tag along with other data pertaining to it.
Any ideas to make this process better from a bandwidth perspective?
|
|
|
|
|
|
I have an app that uses filewatcher to monitor a directory. When a file gets in the directory it reads it, pulss out the jpeg and other data perfectly. Now i would like to display this data on the screen. I have created a picture control and some text controls to dsiplay this data. Anyone have some guidance or good source examples on how to do this?
|
|
|
|
|
You can use a WebBrowser control to show both images and text.
Best regards,
Jaime.
|
|
|
|
|
Any documentation or quick examples on how i would use this control?
I am sort of new to this.
Thanks,
cw
|
|
|
|
|
|
a web browser is not a good fit b/c it shows stuff in a pretty defined way. Just use labels to show text, and pictureboxes to show a picture. Bitmap.FromFile will load the image from that file for you
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all,
I've created a user-control, which resides in library of other controls I use in my application. The control has two or three textboxes and some drawn graphics. I've put this control in my main application and it basically works fine.
Next I have a class, and I create an instance which stores my data and I serialise this class to file for use later on. The user-control is used to change the values in this object and I do that using an event which is fired when the TextChanged event occurs. What makes it more complicated is I can have multiple instances of the class which I need to switch between and the user-control needs to display the data in the textboxes for the objectI've selected.
My problems see to start when I reload my serialized file or switch between the objects.
So for example, when I initialise the control I do:
usercontrol.textboxA = X.GetParamA;
usercontrol.textboxB = X.GetParamB;
When I switch between say object X and Y I do
usercontrol.textboxA = Y.GetParamA; // This can cause issues as TextChanged is called
usercontrol.textboxB = Y.GetParamB;
When the user changes a value in the textbox I fire the event which is caught in the form containing the user-control I do:
// Get selected object X or Y in this case
Y.GetParamA = usercontrol.textboxA;
Y.GetParamB = usercontrol.textboxB;
This really doesn't feel like the right way to tackle this and I fear my design is off. I though of passing in a reference to my objects or maybe there is a better way to use the events...
Any suggestions would be great.
Thanks
|
|
|
|
|
Looks ok to me, remember most of your work revolves changing data from one format to another and vice versa.
|
|
|
|
|
Hi guys.
How can i execute or fire an event, by example the Validated event for a textbox control from another control like a button?
Example:
I have the following code for the Hello textbox Validated event:
private void Hello_Validated(object sender, EventArgs e)
{
MessageBox.Show("Hello guys");
}
I want to fire that event, the Validated event from another control like a button, so i can show the message "Hello Guys"
by clicking a button.
Thanks for your time...
Regards...
Henry de Sousa
|
|
|
|
|
private void Button_Click(object sender, EventArgs e)
{
Hello_Validated(null, EventArgs.Empty);
}
I doubt it. If it isn't intuitive then we need to fix it. - Chris Maunder
|
|
|
|
|
Just call Hello_Validated function from the part of the code you wish.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Thanks for your answer guys, that's it.
Henry de Sousa
|
|
|
|
|
The following code does NOT give an error but do not know why I do not get the email sent by this code.
Thanks
using System.Net.Mail;
private void mnuFileSendMail_Click(object sender, EventArgs e)
{
try
{
SmtpClient mailClient = new SmtpClient("smtpinternalName.dev");
//Create the mail message
string from = "mywork@company.com";
string to = "myWebaddress@hotmail.com";
string subject = "subject";
string body = "text of the body";
MailMessage mailMessage = new MailMessage(from, to, subject, body);
mailClient.Send(mailMessage); //Send(Mail)
}
catch (Exception ex)
{
throw ex;
}
}
modified on Monday, June 23, 2008 8:55 AM
|
|
|
|
|
please learn to use PRE tags for code blocks!
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Can't you at least be polite when you criticize someone? At least the code is reasonably formatted if not in pre blocks.
I doubt it. If it isn't intuitive then we need to fix it. - Chris Maunder
|
|
|
|
|
he reformatted 2mins after i moaned about it...
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
|
Verghese wrote: personal behaviour
Chris Maunder wrote: #5. If you are posting source code with your question, place it inside pre tags, or click the "Ignore HTML tags in this message" check box.
its not just personal preference its the damn rules! and im not showing off anything. i said please and everything!
for your information i read every post here in an attempt to learn something, no one wants to read un-indented code!!! and he fixed it after i moaned.
so why dont you HAVE A NICE DAY... jackass
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|