|
I have a tiff file that I need to dispay on a form. The picture box class apparently does not support tiff. I can convert the file to Bitonal but the image loses a lot.
Being fairly new to C# can someone recommend a way to accomplish my task of opening a tiff file into a windows form? (picturebox or whatever?)
thanks.
Bob
|
|
|
|
|
You are right. I was surprised the designer doesnt support it. Try it this way:
pictureBox1.Image = new Bitmap("C:\\test.tif");
|
|
|
|
|
Is there any other way to calculate network utilzation except using PerformanceCounter ??
|
|
|
|
|
I am wondering if there is way to keep the nice method descriptions, available at programming time, if you compile the class to .dll. Will be nice for fellow programmers when using my classes.
|
|
|
|
|
Yes. Use XML documentation (3 forward slashes), and go into your project properties and enable XML documentation file. Name the xml documentation file <yourdllname>.xml
When other developers go to use your dll, IDEs such as Visual Studio will realize there is a documentation file available, and will use that to populate intellisense.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
Thanks - This helps me alot
|
|
|
|
|
Go take a look at NDOC.
http://ndoc.sourceforge.net
it is free and allows you to document your classes from inside your code and build a MSDN type class reference file that can be used within or outside of your assembly.
Bob Robey
|
|
|
|
|
After you have enabled the xml docs ,then :
In commenting claases and methods just use before them
///<summary>
///Summary description for Your class or Method.
///</summary>
If you want to comment a parameter then use:
/// <summary>
///
/// </summary>
/// <param name="Your Second parameter name"></param>
/// <param name="Your First parameter name"></param>
as < summary >s stands to the method description and param to the parameters ,and you can use any number of parameters.
|
|
|
|
|
I did drop only two TextBox-es one for username next for password.
But how can i write code to checked in SQLServer username and password then to back me response???
|
|
|
|
|
1 :When you reply just click on the message and then there is a link called reply just click on it ,instead of launching a new thread.
2 : Create a database and then any table in it called USERS for example ,and add fields called username and password ,etc... .
And then try to ckek it by using a datareader to check if it's in the database or otherwise.
|
|
|
|
|
In one my appliation whicha i create by C# i need in page_Load to show me a new form in wich I must give username and password. So can somebody help me how to coding for username and password which's must analysed in SQLServer then to get back me a response.
If username and password is incorrect get error.
If username and password is correct get show next page.
HELP
|
|
|
|
|
Try to make another form in your project that contains only 2 textboxs ,and then try to code this ,and if any problem presents we will help you so much more.
|
|
|
|
|
I am trying to create a main table from a dataset that may have mutiple tables all with the same structure any clues. I need to end up with one table at the end where am i going wrong as i get the error table1 already belongs.
here is my code
//get all table into one ready to show and print
DataTable tblNew;
tblNew = dst.Tables[0].Copy(); //get the sructure and data
for(int i = 1;i
|
|
|
|
|
Do you mean you want to add all the tables in this dataset to that table ?after each other ?
|
|
|
|
|
the user suplies me with say 5 tables all schemas are identical, I want to take all the rows from the 5 tables and crew a new single table containg all the rows from the 5 tables so as i end up with one single table(then not interested in what happens to the original 5 tables) As I need to end up with dst.writexml with only one table being printed and not 5 as i can use that in my crystal report.
|
|
|
|
|
lets say that they are in an array :
DataTable[] tbls = new DataTable[5];
DataTable final = new DataTable("All");
for(int i=0;i<5;i++)
{
foreach(DataRow r in tbls[i].Rows)
{
this.final.Rows.Add(r);
}
}
Hope that helps.
|
|
|
|
|
I want to create an Access database on my PocketPC (WinCE4.2, PocketPC 2003 OS). Then using C# to populate tables, query tables, ...
From a simple search on Google.com I find that I must use ADOCE.NET but I didn't succeed to download it and also didn't see any control that I can use from Visual Studio 2003 (I created a project for Smart Mobile Device).
Is there any one has experiences doing such kind of work?
Best regards,
A. Riazi
|
|
|
|
|
Hi,
In a interface i am using private access specifier , will compling will it give error or not, if it give error then what is that error.
thanks
|
|
|
|
|
NO! its not allowed to put any access modifier behind function defination in interface, be it private, public, protected or internal.
Ali
|
|
|
|
|
Using a private in an interface is illogical.
The private specifier is telling the compliler that the method/property/field is accessible to ONLY other members of this specific class. As interfaces have no implementation nothing could ever use something declared as private within an interface.
As a general note: Interfaces are definitions for part of an exposed parts of a class so that other code can see that a class implements an interface and therefore know that it can call certain methods or properties even if it knows nothing else about the class.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Hi,
if two methods having same signature but different return type then also we can say that is overloading?
Example:=
int sum(int x,int y)
{
//some code
}
string sum(int x,int y)
{
//some code here
}
Plz tell me, thanks
|
|
|
|
|
In my views, yes we can say this 'Overloading'
Ali
|
|
|
|
|
|
mowli wrote:
if two methods having same signature but different return type then also we can say that is overloading?
Computer says no.*
This is not valid because the compiler won't know what method implementation to run.
Consider the following call:
Console.WriteLine("{0}", sum(1,2)); Which of the two methods should it call? Console.WriteLine can accept an int or a string here, so the compiler wouldn't know what to do.
If you try and run this you will get a compiler message along the lines of "myClass already defines a member called 'sum' with the same parameter types"
* As you can tell, I've been watching Little Britain recently.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
I have a dataset that I read from an xml file using
DataSet.ReadXml(fs);
I then add to the dataset and rewrite the xml file using the following:
DataRow newrow = mf.quotesDataSet.Tables["quote"].NewRow();<br />
newrow["thequote"] = quoteInput.Text;<br />
newrow["speaker"] = speakerInput.Text;<br />
newrow["origin"] = originInput.Text;<br />
newrow["image"] = "test.jpg";<br />
mf.quotesDataSet.Tables["quote"].Rows.Add(newrow);<br />
mf.quotesDataSet.WriteXml(fw);
It does add the data, however, it adds it outside the main xml hierarchy. For example, instead of:
<rss><br />
<channel><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>new text</thequote></quote><br />
</channel><br />
</rss><br />
it writes to the file as:
<rss><br />
<channel><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>text</thequote></quote><br />
</channel><br />
</rss><br />
<quote><thequote>new text</thequote></quote><br />
how do I make the added rows to the dataset write into the proper hierarchy?
|
|
|
|