|
In C# 2005 if you put an ErrorProvider onto a form, between the form's controls' (eg. a TextBox) properties an "Error on errorProvider1" item appears. How does this work and how can I make my own class to behave like an ErrorProvider?
|
|
|
|
|
The ErrorProvider works by implementing the IExtenderProvider interface. You can find MSDN documentation on the IExenderProvider interface here[^]. Also, I would recommend James T. Johnson's article[^] here on CP covering the topic as well.
|
|
|
|
|
Hi all,
Just started looking at C# (been using Java for a while now) but is it possible to access a corba server using a C# client, the server is using visibroker for java. Could I generate the stubs for the client using the C++ version of visibroker and use them?
Cheers...
|
|
|
|
|
IF you've got c++ dll's you can p/invoke any function/methods they provide.
|
|
|
|
|
|
Hello.., i'm working on a project, where i have a dataGridView, that get's it's data from at database (Access).., that works...
In the database (MusicCollection), there are several column's, ex: "Type", that contains "CD", "LP", "Single" etc.
In the Properties for ComboBox1, i have set the dataSource to "MusicCollection" and the displayMember to "Type"
That works, but if there are 100 CD's in the database, "CD" appears 100 times in the combobox...., and i only want 1 occurence for each Type...., like the sql-statement: SELECT DISTINCT Type FROM MusicCollection
I would like to use a sql-statement, but i don't know, where to put it...
I use Visual Studio 2005 Express.
(i'm sorry about my pore english )
I hope, that someone can help me.
Helge
|
|
|
|
|
this.DropDownList1.Items.Clear();
this.DropDownList1.datasource:=dataset.tables["MusicCollection"];
this.DropDownList1.databind();
each time u fill combobox first empty then set datasource cuz to not duplicate datas;
hope helps
|
|
|
|
|
Hello, thank you for fast reply..., but i don't understand:
then set datasource cuz to not duplicate datas
Is it something i should do in properties for ComboBox1...???
Helge
|
|
|
|
|
just pointing out that you need to do this *each* time
this.DropDownList1.Items.Clear();
this.DropDownList1.datasource:=dataset.tables["MusicCollection"];
regards,
g00fy
|
|
|
|
|
A goal is:
if u load your form or you make any event example by clicking button or any other enevt dropdownlis fills again. this is multi-dupliacted data.
every time clear combobox then fill it again from ur table?
hope i was clear???
dropdownlost.items.clear();
dropdownlost.datasource.dataset["TableName"];
dropdownlost.DataBind();
-- modified at 2:45 Monday 19th December, 2005
|
|
|
|
|
I have a paremeter in an xml file that can contain one of a dozen discrete, non contigious integers. To enforce the limited selection I've defined them as follows in the xsd, and built a wrapper class using the xsd tool.
<code>
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:enumeration value="123"/>
......
</xs:restriction>
</xs:simpleType>
</code>
<code>
[System.Xml.Serialization.XmlTypeAttribute(Namespace="TheNameSpace")]
public enum EnumType
{
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("123")]
Item123,
}
</code>
I can read/write the xml normally without problem. The issue comes when I want to reassign a value of EnumType, and use it later in the session.
<code>
xmlClassObject.EnumTypeValue = (EnumType)123;</code>
This assigns the value to the enum, and will save properly. The problem is that as shown in the debugger or created using ToString(), the value loaded from the file is "Item123", while the value I set in code is "123". Is this a bug in MSes code, or should I be setting the value in a different method? I tried creating the string "Item123" and assigning that, but the cast failed.
-- modified at 10:13 Friday 16th December, 2005
Is there a way I can use the code tags, and still have my XML survive?
|
|
|
|
|
Dear All,
I have a directory in E drive, which I want to share and allow full control to aspnet via C# programming.
I need simple code for it.
With Regards
Manoj
|
|
|
|
|
You can make a call to the net command line application
net share sharename=c:\folderToShare
You can call this from C# using
System.Diagnostics.Process.Start ("net share myShareName=c:\\folderToShare");
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
|
Thanks you a lot for help,
Can you provide me a simple C# code for sharing directory and allow particular user full control(aspnet).
I am working on using windows xp.
Thanks & Regards
Manoj
|
|
|
|
|
Hi All,
Is it possible to Add a right click contextual menu item in Shared Web Folders.When I view it with RegMon it shows the HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers
key.I registered my namespace extension there.but it is not being displayed on web folders.
although it is being shown in the RegMon.Is there something which i am missing or they are also unextenisble like the drag and drop menu items for the web folders.Any suggestions will be most welcome.thanks.
Rakesh
|
|
|
|
|
http://www.worldsbestapp.com/EntryDetail.aspx?Value=URg4XnXlYyVlQ825baBwW6baIPnXLFooeljRm%252bcSp7w%253d[^]
This application allows multiple software developers to communicate about a piece of structured text such as
software code or HTML. *All code is automatically formated. Each users mouse movements can be seen by the other
users and the view is automatically scrolled as necessary to keep all developers looking at the same code at the
same time. *All mouse locations are ratioed to factor out differences of messenger window size, activity splitter
location, and screen resolution. *Users can identify themselves by a name/nick-name and a color. This name/color
show up under the users pointer so everyone can see who is moving each pointer. *Code highlighted on one users
screen is highlighted on all users screens. *Code pasted into the view is saved in a clipboard for all users to
recall without having to resend the code. *Code can be copied out of the view. *The Selection Search feature shows
a Top 10 matches list for any word highlighted in the code view.
Please go check it out. It has helped me and my team when talking about code sections or designs.
Steve Welborn
"Science can purify religion from error and superstition.
Religion can purify science from idolatry and false absolutes"
- 1987 John Paul the Great
|
|
|
|
|
Any ideas on how to launch the default email client from within a C# application, attach a file, and specify a subject line and message body? I'd appreciate any input.
cobra2005
|
|
|
|
|
forgot to mention that I only want to fire up the Send window (equivalent to what's happening when you do a Mail -> New Message from within IE).
cobra2005
|
|
|
|
|
You could create a new process with the "mailto" command:
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo = new System.Diagnostics.ProcessStartInfo("mailto:admin@admin.com?subject=Subject text&body=Body text");
myProcess.Start();
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Thanks! Is there ANY WAY to specify a file to be sent as an attachment? Seems like there has to be because I could right click on the file and select Send To -> Mail Recipient and I get the send email client with the file attached. Any help would be greately appreciated.
cobra2005
|
|
|
|
|
append &attachment="c:\temp\file.txt" make sure the file exists beforehand
|
|
|
|
|
This does not work. I don't think that mailto supports attachments. Any other ideas?
cobra2005
|
|
|
|
|
google for mailto attachments
|
|
|
|
|
hi. is there maximum value of build number of assemblyinfo version?
|
|
|
|