|
There are very few C# 'masters' if you ask me. If everyone who started c# would master it eventually, this site wouldn't be as popular.
Anyway, you don't need to understand errrrrrrrrrrrvrything.
This is important though, to start using any SDK.
1. An assembly reference is telling your project that you're using a certain SDK, or another resource. You can do this by rightclicking your project in solution explorer, and choose Add Reference...
2. You should first check your project if it already has the assemblies referenced. Open your project in solution explorer and open the references folder. If it already has, then that's good. If it has an exclamation mark next to it, or isn't there, that's bad. Remove it (if possible) and continue.
3. Open the Add Reference window. Take a look around, and I think you should eventually find the XNA Dll's that you need. Don't know where as I'm not really familiar with the package. This might be noted in
4. Now, in every code file where you use any XNA related stuff, you need to tell Visual Studio that this is what you're trying to do. This is done by a using directive. You say [I Will be] using Microsoft.XNA.Framework;
5. Now there shouldn't be any more errors on missing assemblies.
Hope this helps at all.
In short:
An assembly reference, is telling the project (not the solution) you're using a certain assembly (can be an SDK, or another type of resource)
A using directive is telling a certain code file that you will be using a certain assembly, that is referenced. You can't use a using directive for an unreferenced assembly.
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Hello, dear friends !!!
I need to make a ArrayList of Structures.
How can i do it ?
One nation - underground
|
|
|
|
|
Well, create the ArrrayList and then add instances of the structure.
By the way, if you're using framework > 1.1 I suggest using the generic List type instead of ArrayList .
"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." - Rick Cook www.troschuetz.de
|
|
|
|
|
C# 1.0 and C#1.1 are SO nasty here. In the absence of typed collections, I would write a wrapper class that allows me to pass my struct into a typesafe container.
Perhaps if you made clear your C# version and posted some code to explain where you have an issue, we can help further ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am using .net framework 2.0, visual studio 2005.
I want to make serialization of ArrayList structures books
struct strBooks
{
public string Author;
public string Name;
public int Year;
public int Pages;
public string ID_for_catalog;
}
I thought about what you had said. Would it be better to use array instead of ArrayList.
Like >> strbooks[] Book = new strbooks();
One nation - underground
|
|
|
|
|
I need to change the font size of text using listbox in richtextbox
thanks in advance..
|
|
|
|
|
What do you mean ? You want a listbox to list the sizes ? Then you capture the index changed event and use the value to set the font size in the rich text box ? Which bit is causing you grief ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
ahmed17 wrote: I need to change the font size of text using listbox in richtextbox
thanks in advance..
Thanks for telling us too.
Fonts are immutable, you can not directly change the size of the font of the richtextbox. You will need to create a new font and assign to the richtextbox's font property.
|
|
|
|
|
Howdy !!!
How can i make my window 100% transparent?
One nation - underground
|
|
|
|
|
Take a look at the Form.Opacity property.
"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." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks!
One nation - underground
|
|
|
|
|
or you could make visible = false. or just close the program.
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Unless you're animating the transperency property, i'd recommend using formInstance.Hide() method. Setting the opacity does tend to slow thing down on OSes that do not naturally support this feature.
|
|
|
|
|
hi guys,,
i have some data set to which my data grid is bound , now if user make changes in any row of the data set so i get these and synchronize to dta base using row versions , i math original row version with the currnet if it doesnot math i appl sql query and update all columns accordig to current values in this particular row, but i think this is not most appropriate approach , is there any other and short way where i dont have to apply looping to check the updated rows,,
thanks in advance
hello
|
|
|
|
|
I think what you want to use is the GetChanges() method on the DataSet.
Just define a new dataset then call the method.
DataSet changesDataSet = dataSet.GetChanges(
DataRowState.Modified|DataRowState.Added);
Hope that helps.
Ben
|
|
|
|
|
I'm basically just asking about how to go about this generally. I need to give you some background to this, so here goes...
At uni, I have inundated with requests from students in a 16-18yrs level class for help with programming. This course is a UK university initiative to help people who want to return to education and go on to a degree, there's a even a great-grandma in one of my classes! (I'm a returning mature student myself). It turns out that the tutor is basically reading from a book, and has never programmed before, blatantly admitting this to his subjects.
Quite a few people want to finish this year of their leg-up course to go on to the actual degree, into programming. Some have some base in programming, but only wysiwyg game making. They've all discovered I know more than a fair bit about programming. So I've decided to look at creating a Programming Club that is registered with the Student Union, with the aim of helping everyone (including me, I do not claim to know everything!).
With the SU's support, I can book one of the advanced rooms in the IT block (oooh, two monitors per computer, the computers are really gooood!). I can get other support too.
I know I have to keep things low key as to it's real aim (ie. actually teach these people the fundamentals of programming).
This is all just about me having validation from other programmers out there, to boost my confidence that I can actually do this.
I'm just wondering if I should go the group session route, where everyone helps each other, or make it a little bit more formal for part of the time, actually showing people how to program, ie. notation, naming, other conventions, showing code optimisation (this is bad, this is good stuff etc). I've even got an old program I made, that is quite long, and actually uses a lot of program examples that I could use as a project for people to learn from, as it has many examples of how to do things right and how NOT to do things!
Do you have any suggestions?
|
|
|
|
|
This seems like a good thing to discuss in the lounge.
If the others are all inexperienced, I'd tend towards a user group type format, where there's a presentation, and then there's some more loose discussion time afterwards.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks, trying to do this is probably going to drive me mad, but I was considering that option the most.
|
|
|
|
|
hi ,
I'm using .net 1.1 and have t send mail using System.Web.Mail.I have to handle errors like when the message sending fails i have to resend the mail,If the address is invalid i should not resend it again and if the mail bounce due to mailbox full,i have to resend it..Is it possible if i use System.Web.Mail.
I know this can be handed in .Net 2.0 using System.Net.mail.
people laugh at me because they say im different and I laugh at them because they are all the same.
|
|
|
|
|
There are two differnet kinds of exceptions you can check for.
SmtpFailedRecipientsException
SmtpFailedRecipientException
SmtpException
Microsoft help has this example:
try
{
client.Send(message);
}
catch (SmtpFailedRecipientsException ex)
{
for (int i = 0; i < ex.InnerExceptions.Length; i++)
{
SmtpStatusCode status = ex.InnerExceptions[i].StatusCode;
if (status == SmtpStatusCode.MailboxBusy ||
status == SmtpStatusCode.MailboxUnavailable)
{
Console.WriteLine("Delivery failed - retrying in 5 seconds.");
System.Threading.Thread.Sleep(5000);
client.Send(message);
}
else
{
Console.WriteLine("Failed to deliver message to {0}", ex.FailedRecipient[i]);
}
}
}
Hope that helps.
Ben
|
|
|
|
|
but this is possible only in .net Framework 2.0 ...I am currently using .net Framework 1.1...!
people laugh at me because they say im different and I laugh at them because they are all the same.
|
|
|
|
|
hi ,
i have problem with richtextbox , i make simple Notepad where user write text with any format as he like but when i save text in file the format
Not appear as i save (fonts,sizes and styles) and when i open file to be read in richtextBox with any format the fonts,sizes and styles appear like normal font...
i want method keep the same format if i using lable or textbox or richtextbox
|
|
|
|
|
I think a way to do it is to always load the file into a richtextbox so that you have access to the font property. Then you could use that property to set the label or textbox to the proper font.
You shouldn't have any issues using the savefile method from the richtextbox and then reading it back into a richtextbox.
Hope that helps.
Ben
|
|
|
|
|
hi all, here i am getting an error saying """Object reference not set to an instance of an object.""""
here i am catching[storing] all the selected values of checkedlistbox[chklstMultipleMdfyTbl] in to my listbox[lstChcked]
for that i've written code in ItemCheck event of CHECKELISTBOX
The code is --->
private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
{
if (e.NewValue == CheckState.Unchecked)
{
lstChcked.Items.Remove(chklstMultipleMdfyTbl.SelectedItem.ToString());
}
else if (e.NewValue == CheckState.Checked)
{
lstChcked.Items.Add(chklstMultipleMdfyTbl.SelectedItem.ToString());
}
}
but the thing is i am catching the default select values in the pageload event, so its making me into troble
so is it possible to block the ABOVE CODE while Page Is Loading--i mean for the firsttime?
For Ur Referenct My PageLoad CODE is -->
private void frmCustomizeParams_Load(object sender, EventArgs e)
{
TestingBoard.XMLTasks GetLasersProperties = new TestingBoard.XMLTasks();
string[] LaserChecking = new string[xmltask.GetLaserPropCount("tabular", "property")];
bool[] chkedList = new bool[xmltask.GetLaserPropCount("tabular", "property")];
LaserChecking = GetLasersProperties.GetLaserProp("tabular", "property");
chkedList = GetAllLaserPropchk("tabular", "property");
for (int i = 0; i < LaserChecking.Length; i++)
{
chklstMultipleMdfyTbl.Items.Add(LaserChecking[i], chkedList[i]);
if (chkedList[i])
{
lstChcked.Items.Add(LaserChecking[i]);
}
}
}
PLEASE HELP ME
PLEASE HELP ME
pashi A
|
|
|
|
|
Register to the ItemCheck event after you populated the CheckedListBox i.e. move the registration of the event handler from the constructor or InitializeComponent method to the Load event handler.
"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." - Rick Cook www.troschuetz.de
|
|
|
|