|
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?
|
|
|
|
|
hi
u have to use HitTest() Method in data grid to get Row Index and Column index .
|
|
|
|
|
Hi,
How can I check if the local machine is connected to the LAN or WAN? I would not be knowing the IP of the server. I would to develop an application which when run on the a machine tells me if the machine is connected to LAN or not.
My Application should behave very similar to the network Icon in the systray.
When ever the network is disconnected. the Icon is changed.
I am new to network programming please help
regards
Sharath
|
|
|
|
|
I think the SystemInformation.Network property is what you're looking for.
www.troschuetz.de
|
|
|
|
|
Hi Stefan,
Thank for the reply.
The systeminformation.network property returns the status as connected even though I unplug my network cable. Is there any thing else I need to do. Please let me Know.
I am using Windows 2000
Regards,
Sharath
|
|
|
|
|
Hmm, I honestly don't know
I've never used this property myself. Just knew it's there and thought it may help you. Starting from your description I guess it maybe only returns an indication on the presence of a network adapter, although the documentation says that it returns "true if a network connection is present".
Maybe you should try posting your problem again with additional info on the non-working SystemInformation.Network property.
Good luck
www.troschuetz.de
|
|
|
|
|
I would to run a file .exe, that is inside my folder application, after my software' installation.
How?
|
|
|
|
|
I asssume you're using the Windows Installer project for VS.NET? While this isn't the appropriate forum for that, I'll answer anyway. You do need to be more explicit about your situation, though. You can install an application anyway, from a simple xcopy deployment to Windows Installer to proprietary installation technologies like InstallShield to even a simple drag-n-drop.
If you are using the Windows Installer project in VS.NET, you can't do this using the IDE. You have to download the Windows Installer SDK from http://msdn.microsoft.com/platformsdk[^] (part of the Platform SDK, or PSDK) and install Orca.msi from the Bin sub-directory of the PSDK installation root. After you've compiled your setup project, open it in Orca (installed under Start->Programs, or just right-click on your MSI file and select "Edit in Orca") and find the File table. Find the File column key (the first column) that corresponds to the file in your package you want to run and copy it.
Then go to the CustomAction table and add a new row. The "Action" field can be any name you want that is unique in the table, like "CALaunchApp". The Type should be set to 18. Paste the value you copied from the File table into the "Source" field. The "Target" column is any command-line options you want passed to the executable when executed.
You should bitwise OR the "Type" column with 192 for asynchronous, non-waiting execution (so the installation finishes when the executable is launched), meaning that you should enter 210 in the "Type" column.
Finally, find the InstallExecuteSequence table, add a new row, and enter the name of the custom action in the "Action" field, set the "Condition" to UILevel > 3 , and set the "Sequence" table to the higher number in the whole table. If you sort by the "Sequence" field it will probably be easier. InstallFinalize should be the last action in the sequence, so use a number higher than it's "Sequence" leaving space in between (so that new actions can be sequenced in between more easily).
This isn't the best way, but the easiest way, of launching your executable after install. What would be better is to provide a check box on the exit dialog and conditionally launch your executable from the "Finish" button's click event, but I'll leave that as an exercise.
Note that you will have to repeat this process after every compilation of your setup project because they will not be saved. You might consider a way to automate this. The MSI package is a database so you can use the System.Data.OleDb classes to change data using the ADO.NET, but I cannot remember and cannot find the name of the OLE DB provider so you'll need to do some research. The native APIs are easy to use, though. Read the documentation[^] for MsiDatabaseOpenView and its linked doucmentation for more information.
The easiest way to accomplish what you want - but a commercial Windows Installer IDE like those from Wise[^] or InstallShield[^]. The VS.NET Windows Installer project is not intended for commercial deployment - merely simple control or internal application installs.
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 need to convert msword doc files to a pdf format and save it to some location. Also, i need to convert this using pure c#. Can anybody please suggest some solution. Please please.
Many Thanks
|
|
|
|