|
I need fix UserControl on a desktop window. How I can make it?
Exenten
|
|
|
|
|
You don't make any mention of what UserControl, what it does/doesn't do, what is broken/supposed to do, who wrote it (if not you), and what you mean by "on a desktop window". So all we can tell you is start VIsual Studio .NET and go from there.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi everybody, I am developing an application that use DataGrid to display data. The built-in ability of the datagrid is that when users click on a column header, data will be sorted by that column. Are there any way to know which column data are being sorted by? And how can we sort data display in DataGrid by a column by code (i.e users do not need to click on that column header)?
|
|
|
|
|
The DataGrid doesn't sort anything - the DataView does. You get a DataView by default when you bind a DataSet or DataTable to the DataGrid.DataSource , but you can also do this separately:
DataView view = new DataView(dataSet1.Tables["Table1"]);
view.Sort = "LastName, FirstName";
dataGrid1.DataSource = view; When the DataView is sorted, the index of a particular should not change while it would with the DataGrid (because the data and view on the data are out of sync), meaning you have to use the CurrencyManager to get the right row.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Thank you for your helping!
|
|
|
|
|
I'm trying to build a simple web app in C# that will add and remove appointments to an Excange server (2003) on my LAN. I need to add a reference in my application for CDOEX (Microsoft CDO for Exchange 2000 Library), which contains all the classes and interfaces I need, but this DLL is only installed during the Exchange installation. I'm doing my development on an XP Pro machine, and the web app will obviously be deployed on the Exchange server. The thing is, Exchange will not install on XP (only 2000 Server or 2003 Server), so testing this thing locally is not an option. Is there a way to do all of my development/testing on the remote server with VS.NET installed on my local machine?
Thanks for any help,
-Drew
|
|
|
|
|
Use System.Web.Mail if all you want is CDO functionality. Unless you actually need CDOEX, just use CDO which is installed as a client library on Win2K and up (i.e., included in XP and Win2K3) and that Exchange and the Microsoft Virtual SMTP Services provide in XP and Win2K3 as part of IIS. System.Web.Mail uses CDO, which generally makes it the wrong choice when general SMTP functionality is needed, especially since it requires proper client configuration. If you've already committed your clients to CDO/CDOEX, you might as well use System.Web.Mail .
Be sure to reference System.Web.dll which defines the classes under System.Web.Mail in your project.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Does anyone know of anything out there that I can use to dial up a numeric pager, leave a number and then hang up? It is not a "fancy" pager. No message, not text, no nothing. Just a regular old pager.
I have a asp.net c# page. User clicks a button that says "Page Me." Somehow the box with the modem dials up the pager and leaves the numeric page (all same phone number left).
I can do it manually through hyperterminal, but not sure if I can control this with c#.
Thank you for any help.
|
|
|
|
|
You need to either use or write a TAPI client to connect to the modem. Search this site using the text box at the top (under the logo) for "TAPI", or click "Search comments" above to search this forum for "TAPI", which we've discussed a lot. Some people have even given their opinions about third-party libraries that provide TAPI functionality.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi, I’m programming a web app using c# and asp.net and I am trying to display a list of performances that are scheduled in the next month, in a listbox. So I need to get today’s date in my code and compare it to the dates of all the concerts and display the appropriate ones. My main problem is getting today’s date can anyone help.
Thanks in advance
Tadhg88
|
|
|
|
|
DateTime.Now Gets a DateTime that is the current local date and time on your computer.
Anger is the most impotent of passions. It effects nothing it goes about, and hurts the one who is possessed by it more than the one against whom it is directed.
Carl Sandburg
|
|
|
|
|
Or use DateTime.UtcNow to get the current date and time in the Universal Coordinate Time (yes, the C and T appear to be backward but that's just the way it is).
You should consider browsing the .NET Framework SDK class library reference. Especially classes like DateTime should be easy to find using the index, then you just need to browse the members. The class library follows a naming guideline that is supposed to make easy to find what you want.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I found that confusing as well, but I have since heard that
"...the Universal Time Code (UTC) specifies the time in the Universal Coordinated Time (UCT) format".
Not that I stopped having headaches, though.
I hate international standards. They mostly have not been thought through and completely fail to achieve anything other than introducing a new way of screwing up.
Cheers
Sebastian
|
|
|
|
|
What's wrong with UTC? It's a simply international standard that's easy to follow. Just make sure all your dates are stored in UTC and convert them using the current TZ and locale (if displaying) when needed locally.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I have been asked to write a program to count the number of vowels in a setence using foreach and a switch statement.so this is what i came up with.but i think its bad programming.can u help me make it much simpler and user friendly.by the way its not working as yet.can u giv me a bit of suggestions on how to rectify solution.
static void Main(string[] args)
{
int aCount = 0,eCount = 0,iCount = 0,oCount = 0,uCount = 0;
char[] arr = new char [] {'a','e','i','o','u'};
string strWord;
char charWord="";
Console.Write("Please enter a sentence: ");
strWord = (Console.ReadLine().ToLower().Trim());
foreach (int i in arr)
{
switch(charWord)
{
case 'a':aCount++;
break;
case 'e':eCount++;
break;
case 'i':iCount++;
break;
case 'o':oCount++;
break;
case 'u':uCount++;
break;
default: break;
}
}
Console.WriteLine("No of a's"+ aCount + "\nNo of e's" + eCount + "No of i's"+ iCount + "No of o's"+ oCount + "No of u's"+ uCount);
uni1985
|
|
|
|
|
lindiwe wrote:
by the way its not working as yet
It's not working, cause the switch statement always receives the charWord variable, which always keeps its initial value "". Also its no use to loop over the defined vowel array, if you have an switch statement inside the loop that tests for all vowels and increments specific counters.
Instead loop over the string, you read from the console, as shown below:
for (int i = 0; i < strWord.Length; i++)
{
switch(strWord[i])
{
case 'a':aCount++;
break;
case 'e':eCount++;
break;
case 'i':iCount++;
break;
case 'o':oCount++;
break;
case 'u':uCount++;
break;
default: break;
}
www.troschuetz.de
|
|
|
|
|
IMO the switch can be skipped
EG:
int[] chars = new int[256];
foreach (char c in strWord)
{
chars[c]++;
}
Console.WriteLine("A:" + chars['a']);
Console.WriteLine("E:" + chars['e']);
Console.WriteLine("I:" + chars['i']);
Console.WriteLine("O:" + chars['o']);
Console.WriteLine("U:" + chars['u']);
xacc-ide 0.0.8 now with C#, MSIL, C and HLSL coloring - Screenshots
|
|
|
|
|
How to generate Calender when I press on comobox?
Thankx
|
|
|
|
|
Use the System.Windows.Forms.DateTimePicker control. You might consider browsing the .NET Framework SDK class library to see what other classes - or controls, for that matter - are available.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
hi,
Normally we can change the Color of Tab Pages by using its properties.
But How do I change the Frame Color and Border color of Tab Control?.
If any one know it please reply me..
Thanks in advance.
|
|
|
|
|
The tab frame and the tab itself are drawn by the TabControl , which actually encapsulates the native Windows common control of the same nature. You'll need to set the TabControl.DrawMode to TabDrawMode.OwnerDrawFixed and handle the TabControl.DrawItem event (or extend the TabControl class and override TabControl.OnDrawItem , which is more robust).
Search or browse this site for tab control and owner-drawing articles. There are several.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I am working on a project where the structure of the objects I manipulate will only be known at run time. The basic example that comes to mind is when you have a document object with custom properties that are user defined.
The idea of generating a class definition from the custom properties occured to me from the PropertyGrid control that exposes the hard coded properties of the object assigned to it.
Any ideas how I can have a generic class from which I create a specific class at run time, instantiate the class and bind to the PropertyGrid ?
HABIB@BAMS/TN
|
|
|
|
|
|
|
Hi..
I wrote some codes on double click event of datagrid but i want to handle it when double clicking on the cell.. How can I do that?
|
|
|
|