|
So.. fs is null? AFAIK that can never happen, it would have to give an other exception as detailed here: File.Open on MSDN[^]
I don't know what else?
|
|
|
|
|
i don knwo wht is happening,The file is created. that i can see when when i browse the folder. but null reference exception is shown when i run applcn.
This code was posted by me...
|
|
|
|
|
Is the file ok? does it open in, say, paint without error?
|
|
|
|
|
no there is error in opening
its telling something like invalid data....how firts i need to convert byte array or memory stream to image....thats the problem persisting.............
This code was posted by me...
|
|
|
|
|
i got it correct!!!!
the error was in writing to file
thanks!!!
This code was posted by me...
|
|
|
|
|
You know, it's actually easier if it's "just pixels". Then you can just make an empty bitmap and write the pixels to it yourself.
But you had best find out, because it really is a very important difference..
|
|
|
|
|
Dear All,
I have developed different application and create it msi package for them, but this time its alittle bit different.
now i have developed an application which can be used over 34 provinces of afghanistan and monthly there will 2 or more updates for each province, so this mean that each province may have updates or not that depends.
i am asking which method of installation should i use? 1.creating msi package 2. creating by clickonce
my concern is always updates, i should be able to send them only udpates whenever the require not the whole setup file.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Hi,
I guess that you have one single application that must be configured to fit in for each of the 34 provinces. If it is that, I would use clickonce, because click-once contains the distribution itself.
Other way would be to write an application that contains the update mechanism itself, like an antivirus-app. There are different patterns and frameworks for this, so it should be easy to find a good starting point.
Regards
Sebastian
|
|
|
|
|
thx my friend, the fact that each province uses its own version and a single update to any province should be distributede for 34 provinces.
i would really appreciate to have some reference regarding update mechansim as u mentioned for antivirus or can i use ".cab" from VS setup for my deployment?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
MS published a pattern and practices-article about self-updating applications: http://msdn.microsoft.com/en-us/library/ms978574.aspx[^]
Have a look, it is quite interesting.
Didn't get it that each province has its own version. You mean you implemented ONE application, but to fit for the province it must be CONFIGURED?
|
|
|
|
|
thx, i mean the application is only one, but is installed in 34 provinces, if one provinces finds any bug or error in the application, that error needs be fixed and reflected to all provinces.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Ah okay, sounds good. Well as mentioned before, click-once will suit your requirements perfectly.
|
|
|
|
|
|
Hi.
We are working on .net 3.5(wpf,WCF). We have a set of string say a List<objects> of a class with string data. We need to print it.
What is the best way out, keeping it lightwieght and simple.
Thanks
|
|
|
|
|
If you are printing reports, go for ReportViewer control or Crystal report. Or else in-built classes to print data would be best bet.
There is a WPF/WCF[^] forum here. IMO that would be better place ask.
|
|
|
|
|
Thnaks ..
Needed a pust to start , got it . Something called
System.Drawing.Printing ,
Thanks a lot ..
|
|
|
|
|
See this[^] article about printing data. Might help.
|
|
|
|
|
Hi All,
im working on c# windows forms,i need to add a check box control to datagrid while binding data.To be clear im adding some set of fields to the datagrid.I need to add checkbox in the cells having datafied "id".If i check that id check box i need to display the checked value.This is my question,please do needful.Im new to this windows forms.
Thanks in advance.
|
|
|
|
|
This[^] explains what you need.
Once, you have added the DataGridBoolColumn, handle its MouseClick event to display/hide the data.
I prefer using DataGridView instead of the grid. Check out if that suits your need.
|
|
|
|
|
hi all
I have a datagrid and another datagrid in the rowdetails. When 2 or more rowdetails are displayed, there is problem with scrollbar.
The scrollbar will not disappear when the row detail is collapsed using a button placed in the rowdetails..Please help me if anybody has the solution.
the code to Collapse the rowdetail is as follows:
private void CancelButton_Click(object sender, RoutedEventArgs e)
{
StackPanel panel = (((sender as Button).Parent as Grid).Parent as StackPanel);
DataGrid grid = panel.Children[1] as DataGrid;
DataGridRow row = DataGridRow.GetRowContainingElement(grid);
row.DetailsVisibility = Visibility.Collapsed;
}
thanks in advance..
|
|
|
|
|
is it possible to know the method used by dotnet libraries. i m using getbezierpoints method in dotnet to get the bezier points of a stroke. but not sure if dot net is using quadratic bezier points or cubic bezier point or something else. my further analysis depends on the method used by them. i asked the same question 2 days back n was suggested to seek help of reflector. unfortunately reflector is not able to give the code behind. is there any other way out. pls help
|
|
|
|
|
Hi,
for such questions there are IMO three possible answers:
- documentation
- reflection
- experiments
I would spend 10 minutes on documentation, try reflection for 10 minutes, then start a series of little experiments, trying out some extreme cases since those are most likely to show the differences.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
how to prevent same forms laod agin and agin from MDI???
|
|
|
|
|
use the below sample code.
bool flag = false;
FrmSearch search = new FrmSearch();
foreach (Form f in this.MdiChildren)
{
if (f.Name.ToString() == search.Name.ToString())
{
f.Focus();
flag = true;
break;
}
}
if (flag == false)
{
search.MdiParent = this;
search.Show();
}
Regards,
Karthik K...
|
|
|
|
|
KKarthik2000 wrote: if (f.Name.ToString() == search.Name.ToString())
AFAIK string.ToString() is a waste, it just returns
string<br />
<br />
:) <br />
<br />
<div class="ForumSig">Luc Pattyn <a href="http://www.codeproject.com/KB/scrapbook/ForumGuidelines.aspx">[Forum Guidelines]</a> <a href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=648011">[My Articles]</a><br />
<hr>The quality and detail of your question reflects on the effectiveness of the help you are likely to get.<br />
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.<hr></div>
|
|
|
|