|
Pass NumberFormatInfo as the IFormatProvider.
Hope this helps...
|
|
|
|
|
Hi all,
i want to know how can I add data in a form from another form and display it in a datagrid after adding it to the first form
pleeease help
thanx
|
|
|
|
|
|
it will best if you use event handler in Child Form
and Call it from Parent Form.
class FrmChild
{
public event System.EventHandler addData;
.........
......
}
class FrmParent
{.....
private void btnSchduler_ClickEvent(......)
{
FrmChild obj=new FrmChild();
obj.addData +=new EventHandler(objServices_addService);
obj.ShowDialog();
}
private void objServices_addService(object sender, EventArgs e)
{
//write code to Add in Data Grid....
}
}
Sanjit.rajbanshi@wlinktech.com
|
|
|
|
|
First I decrypted your question
Then I found out that, you can do it by creating a new constructor which takes a datatable in the second form. Then from first form, you send the datatable to the second forms constructor where it is used as Form2.CustomDataGrodView.DataSource = datagridViewFromConstructor. Or you can add a property(public DataTable NewDataSource {get; set;}) or method like (UpdateDataSource(DataTable newDataSource)) then call these from your First Form with a new DataTable.
Hope this helps...
|
|
|
|
|
Hello,
I'm Trring to insert,update and delete throught a DataGrideView by using code
But I don't Know How .I need for help in how to select the appropriate Events.
Thanks.
Dad
|
|
|
|
|
try this article
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
DataGridView.Rows.Add(...)
DataGridView.Rows.Remove(...)
DataGridView.Rows.Insert(...)
Checkout MSDN Library for these methods.
Hope this helps...
|
|
|
|
|
I have a question(s) that I hope someone can answer. I know how to make a picture box either visible or invisible and also how to load one image into it.
The questions are: Can more than one image be loaded into a picture box at one time? If so how is it done and how do you show each picture when needed? If it can't be done, what are my alternatives?
I'm trying to get three pictures into the same picture box area, and show each in turn as a specific button is clicked.
Thank you for any help or suggestions that are forth coming.
|
|
|
|
|
Nope, you can't. Luckily, you have the ability to define variables
Declare and initialize three Image s and set the PictureBox 's Image property to the appropriate one when you need to.
|
|
|
|
|
Use Imagelist control.
Regards,
Arun Kumar.A
|
|
|
|
|
ImageList supports only specific number of colors and sizes which cause too many headaches.
just create a List or Collection or Image[] myImageList = new Image[] {img1, img2, img3};
And then in a loop, Button.Click event or Timer.Tick event use this code:
protected void UpdateImage(Image newImage)
{
//un-comment below lines if you are reading images from disk to prevent memory leaks
//if(myPictureBox.Image != null)
//{
// myPictureBox.Image.Dispose();
// myPictureBox.Image = null;
//}
myPictureBox.Image = newImage;
}
OR
protected void UpdateImage(IList myImageList, int newIndex)
{
myPictureBox.Image = myImageList[newIndex];
}
Hope this helps...
|
|
|
|
|
I have a screen shot that I want to analyze. Rather than do it pixel by pixel I am cutting up the screen shot into different sections. I want to analyze the palette and if a certain range of colors exist then do some additional processing.
<br />
Bitmap test = new Bitmap(pictureBox1.Image).Clone(new Rectangle(0,0,100,50), System.Drawing.Imaging.PixelFormat.);<br />
Color[] Entries = test.Palette.Entries;<br />
foreach (Color colorSearch in Entries)<br />
{<br />
}<br />
However, with the above code the palette has no Palette.Entries. Is there a way to force palette creation on the bitmap or do I need to use a different image format(Something I hadn't thought until now).
I attempted to try and force the Format8bppIndexed enum from PixelFormat, but that failed with an out of memory error. I'm assuming because there are more than 256 colors in the rectangle.
Another idea I had, but have no clue how to implement, is to change all the colors that are similar to a single color. But I think that still won't work without a palette. I honestly have no idea here.
|
|
|
|
|
I guess I answered my own question when I was writing. So just incase anyone else wants to know. Save the image as Gif and the Palette is created.
|
|
|
|
|
Hi friends!
I have no idea that how I can convert the image into the sketch style? Using the C#.Net.
Please suggest to me or give the helpful hints…………I will be very thank full to all of you……….this image conversion is a part of my FYP……..i used many algorithms for conversion of image but these algorithms are not efficient ...I have been trying since last month but i fail.....please guide me
Thanks Again!!
|
|
|
|
|
hi..
I downloaded a code from codeproject.com run the program, and when I click to find devices, it gives me PlatformNotSupportedException ... and Bluetooth.Net not supported on this device..
i looked everywhere and found out that bluetooth stack should be installed on my pc, well i looked for this bluetooth stack but found nothing, i'm using XP Home SP2 .. and C#.NET 2005 .. InTheHand.Net library for coding ... please help me out .. !
anyone worked on a bluetooth related project before .. ?
|
|
|
|
|
Do you even have a BlueTooth interface in your machine?? If not, installing the drivers for it won't do you any good...
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
thanks for you reply ..
but what do you mean by bluetooth interface .. ?
i have a dongle bluetooth device, and its working perfectly using the application that came with it ... but using the C# application ... i got the above error ... !!
|
|
|
|
|
NiZaR.TecH wrote: but what do you mean by bluetooth interface .. ?
This:
NiZaR.TecH wrote: i have a dongle bluetooth device, and its working perfectly using the application that came with it
OK. Does the interface show up under Start/Settings/Network Connections? If not, you're not going to be able to use it in your code. This could be why you're getting the error you are.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
yes it does,
and guess what ... i've tested my application on another pc with another USB device, and it worked, it seems that the problem is in the dongle bluetooth device, but another problem came up ... when I click find devices, it shows nothing ..
|
|
|
|
|
Hello!
Hope you all are doing great! We were having clumsy sort of issue! details are as follows:
- We have c# windows application, which processes the data(simple text file, huge in size aprox. 40Gb).
- Doing so, it doesnot show any sort of items on the form, it looks as if its hanged/not responding
- Application consists of 1 form, which contains few performance indicators, few labels, few progress bars.
- But in reality it is working and processing the data(checked from the task manager, and also the output file is generated very accuratly).
- From start till end application utilizes 100% of the cpu.
- If we try to run any other program even notepad, system hangs n we have to restart it!
We are using Windows Server 2003, any sort of help, idea, suggestion, question will definitly be appreciated! !
Thanks in advance!
Adeel
--
|
|
|
|
|
Processing 40GB file is very expensive for computer. The time it takes will depend on the computer you are running it on. Also use threads in your application
|
|
|
|
|
Very right , but why it is not showing up the items(labels, progress bars...etc), and how can we make it show them and also do the processing as well!!?
The machine specs are 2.8E GHz HT Processor, 1 GB RAM, 160 GB SATA-II Drive!
Any suggestions how shall we implement threads, like processing in seperate thread? is this what you mean? and wil it solve the issue
|
|
|
|
|
Have a look at Backgroundworker component. It has got a good example
|
|
|
|
|
It sounds as if you are doing your file processing on the UI thread, and you are not allowing any time to any other threads.
1> do the data processing on a worker thread, use
2> do a small chunk of processing then call Thread.Sleep(ms) to allow other things to run for a few ms, that way you don't hog 100% of the CPU.
|
|
|
|