|
Remind not to call you for tech support!
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
|
When I go to 'About' in Visual Studio it says I have 1.0.3750 framwork...
I have the 1.1 installed on my computer... How do I get visual studio to use it?
I wanted to do the enable visual styles thing...
/\ |_ E X E GG
|
|
|
|
|
Visual Studio 2002 only targets NET 1.0 .You can not use the .NET 1.1 from within Visual Studio 2002.
To build a .NET 1.1 App you have two options:
1. Use Visual Studio to write and organize your files and then use the command line compiler on the 1.1 SDK folder to build your app (but remember that NET 1.1 introduces some code-breaking changes to NET 1.0)
2. Upgrade to Visual Studio 2003
As for the visual styles, I wouldn't be too eager to use the NET 1.1 EnableVisualStyles method since there have been multiple reports of instability and inconsistent behavior of this method. Implementing visual styles through yourappname.exe.manifest (a manifest file) is still the safest bet.
|
|
|
|
|
please help me, how to set tab size in richtextbox control?? I can't find this proprety in this.
Thanks!!!
Nho'c Ti`
|
|
|
|
|
3 choices
1) its the only control on the form
2) set all controls tab stops
Of course we should slap anyone's hand for doing that
3) Implement the KeyDown function and just add spaces and and set the handled property to true
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I am trying to make my code take the path of a directoru A, and then iterate through all files, sub-directories, and all the sub-directories files, until i get to the end.
I thought I had it, but I don't;) Having trouble with the logic...
Thanks
Steve McLenithan"When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl." ("When cryptography is outlawed only outlaws will have privacy")
|
|
|
|
|
|
Thanks that will give me somethign to work with;)
Steve McLenithan"When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl." ("When cryptography is outlawed only outlaws will have privacy")
|
|
|
|
|
Hi!
I am using a dial up modem for my internet connection.
and I want to make a program that monitors how long ive been
connected to the internet so that i'll be able to keep track.
How do i do this is C#? I'm using a windows 2000 professional
for my OS.
Thanks a lot!
"To teach is to learn twice"
|
|
|
|
|
|
I want to get the text from the textbox in the other application;i tried "getwindowtext",it can only get the informaion of label,checkbox,form(the caption),but failed to get the information of the textbox.The msdn says that "GetWindowText cannot retrieve the text of a control in another application."
Which other API should I use?
Thanks
|
|
|
|
|
If the other application is another C# app you created, you can
use get property.
"To teach is to learn twice"
|
|
|
|
|
|
I have a function that does the following
fills a dataadapter with items belonging to user1
then Creates a dataset object and fills it with data using data adapter's Fill method
set my dataview = Nothing
then I fill a dataview with this dataset
lastly I bind a datagrid to this dataview
this works but next time I call my function for user2
the grid displays items belonging to both user1 and user2 instead of just user2
I am .Net Windows Application
How do I successfully clear the datagrid of user1 data before loading user2
some sample code would help since I am pretty new to .Net
|
|
|
|
|
can you show sample code of what your doing. It sounds like its pointing to the binding context of user1 or your not pointing to user2's table.
Is this on the same form?
Have you used debug->locals and viewed which dataset and table its tied to?
Have you reset the datasource?
DataGrid1.DataSource = DataSet.Table["myuser2table"].DefualtView;
hmmm
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Hi !
I have a problem with serializing a class, which has a variable with an abstract-class-type.
If I'm using the specific class Test2, everything works fine,
but when I use the abstract class Test, I get the following error-message:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll
Additional information: There was an error generating the XML document.
Does anybody know whats the matter here?
using System;
using System.Xml;
using System.Xml.Serialization;
using System.IO;
namespace xmlTest
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
myObject o = new myObject();
XmlSerializer mySerializer = new XmlSerializer(typeof(myObject));
StreamWriter myWriter = new StreamWriter("test.xml");
mySerializer.Serialize(myWriter, o);
}
}
public class myObject
{
//public Test2 t = new Test2();
public Test t = new Test2();
}
public abstract class Test
{
public string s = "Test";
}
public class Test2:Test
{
new public string s="Test2";
}
}
Thank you !!!!
|
|
|
|
|
Try adding a parameter-less constructor to your custom objects - the Xml serializer cannot work without one, e.g.
public class myObject<br />
{<br />
public Test t;<br />
public myObject()<br />
{<br />
t = new Test2();<br />
}<br />
}
|
|
|
|
|
The XmlSerializer works by creating an instance of the type and setting the various properties/fields. Because you have an abstract class it cannot create an instance of it and thus fails.
Using a real serializer (BinaryFormatter or SoapFormatter) will result in some extra information being written out so that the formatter knows the t field is a reference to an instance of the non-abstract class Test2 .
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
Hi I have two .net applications running on the same PC. (its a long story.) I need to do a little bit of communication. I've read that Remoting is the way to do this, but all the examples for remoting involve three applications where one is a server, and tcp connections, and complicated stuff I don't need. Is there like a simpler thing I can do?
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
Bog,
Let me suggest the following book on remoting:
"Advanced .Net Remoting" C# Edition by APress ISBN 1-59059-025-2
You can implement remoting between your two applications without the need of a "server" application. This means that your two applications each act as a client and a server to each other. This requires that each application in acting as a server must be on a different port number. Beware of UI Controls responding to remoting calls as they are handled on a seperate thread. UI control methods can only be accessed by the "creator" thread which is the application thread.
While Remoting in .Net is made simple, it still requires a good understanding of the details to build proper remoting components.
Happy coding!
|
|
|
|
|
|
I have been writing a few user controls, and have needed to put many of the same dropdownlist and other data dynamicly populated from a database.
I had an idea that maybe if I could somehow create a class that could access the database, load the DDL and then put is a placeholder, or pass back the populated DDL that I could start reusing more of my code.
Is this possible, or do I just pass back an array of data to bind, and if so how would I code the Val, Desc for the databind in an array. I am a little new to C# or C for that matter.
Thanks for any ideas and examples.
NamoGuy
Mike Stone
Kaskaskia College
|
|
|
|
|
just implement the IList which an array does ( the collection namespace) or System.Arrayy
of coursew you could create a class and implement the IDataBinding class for adding and things like that but the IList suffices
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
this seems like it should be really basic, .. but i do not understand the problem.
<br />
public int GetInt()<br />
{<br />
return 1;<br />
}<br />
<br />
public bool TestInt()<br />
{<br />
if( GetInt() > 0 )<br />
return true;<br />
return false;<br />
}<br />
error: An object reference is required for the nonstatic field, method, or property 'test.numbers.GetInt()'
|
|
|
|
|
Presumably you're calling test.numbers.TestInt() in a static (class) context rather than an object context. Either make TestInt() and GetInt() both static, or call them as methods of an object of type test.numbers.
|
|
|
|