|
Is Console.WriteLine(***) ?
wang
|
|
|
|
|
Console.WriteLine(someString) will send someString to the Console.
The console is:
- the output pane when running inside Visual Studio
- the console windows when executing from a DOS command window
- absent when simply double-clicking the exe in Windows Explorer.
Luc Pattyn
|
|
|
|
|
Hi,
is it possible to process each individual word in a microsoft word document from VB.NET.
For example, if i have a phrase say 'HE IS A BOY', is it possible for VB.NET to identify each single word??
can anyone help??
Thanks in advance
Regards
Nitin
|
|
|
|
|
I known 2 ways.
1 is regex
2 is use string.split(' ') splite the phrase to a string[].
wang
|
|
|
|
|
I assume that you mean that you want to get the text out of Word and manipulate it in some way. There is a way that doesn't involve using Microsoft Word at all, and relies instead on something called an IFilter. Basically, an IFilter is the mechanism by which the Search mechanism in Windows works, and allows you to get information out of sources such as Excel, Word, Adobe Acrobat, etc.
What you need to do is read in the document using the appropriate IFilter and then parse it to extract the words. Here's a link to a C# version that shows what you need to do.
http://www.codeproject.com/csharp/IFilter.asp[^]
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I am using a MenuStrip Component in .NET 2.0, Windows form Application. How do you capture the events on the individual items, when they are clicked
Lets
Home
> SubItem1
> SubItem2
> SubItem3
ItemClicked event on the MenuStrip component triggers when the Top level Menu items are clicked like Home
How do you find out which subitem was clicked.
Thanks
Rajaraman.S
|
|
|
|
|
Hi !
I'm using Visual Studio 2005 Professional Edition and C#.
I have a simple question:
I want to add to my form, which is a scrollable control, a menustrip and
statusstrip.
The problem is that the menustrip is not fixed at top if i scroll down.
A similar problem exists also for the statusstrip. If i open the program it
is only visible if i scroll down.
The program thinks that the menustrip and the statusstrip are in the Client
region, to which i want to draw something.
So, how can I fix them, so that they are not get lost if i scroll the main
form up or down ?
--
Schwammkopf
PS: The AutoScrollMinSize is set to (ClientSize.Width + 50,
ClientSize.Height + 50). Of course, on each OnPaint i update it.
|
|
|
|
|
hi, im trying to use GetProcesses(); function to list all active processes in my machine, i want to use this function to use DuplicateHandle to list the handles of a specific process...
but i cant find no where information that could me let write the prog, mos of the cases all examples give me errors, in microsoft MSDN i dont understand i they use #using then the compiler give me errors... im confuse with using GetProcesses(); or GetCurrentProcess(); but with both i cant write the prog, full of errors...
please someone could give me a had here...
|
|
|
|
|
This is the code that I use.
Dim YourProcesses() As Diagnostics.Process
Dim currentProcess As Diagnostics.Process = Diagnostics.Process.GetCurrentProcess()
YourProcesses = Diagnostics.Process.GetProcessesByName("YourAppNameHere")
If UBound(YourProcesses) > 0 Then
If currentProcess.Id <> YourProcesses(0).Id Then
MsgBox("Previous Instance of Your Application is already Running", MsgBoxStyle.Exclamation, "Your Application")
End
End If
End If
|
|
|
|
|
Here is some C# code from a big app, it may contain some strange lines (just ignore
those), it is copied here to show the general flow:
using System.Diagnostics;
public static ProcessComparer processComparer=new ProcessComparer();
public void showComboboxWithAllProcessesInAlphabeticalOrderAndMinePreselected() {
LP_SimpleDialog dialog=new LP_SimpleDialog("Show Process", settings);
Process[] processes=Process.GetProcesses();
int n=processes.Length;
ArrayList processes2=new ArrayList();
for (int i=0; i<n; i++) processes2.Add(processes[i]);
processes2.Sort(processComparer);
string[] procnames=new string[n];
int myProcID=Process.GetCurrentProcess().Id;
int curr=0;
for (int i=0; i<n; i++) {
Process proci=(Process)processes2[i];
if (proci.Id==myProcID) curr=i;
procnames[i]=proci.ProcessName;
}
ComboBox cb=dialog.AddFixedComboBox(procnames, curr);
}
public class ProcessComparer : IComparer {
public int Compare(object object1, object object2) {
Process process1=object1 as Process;
Process process2=object2 as Process;
return string.Compare(process1.ProcessName,
process2.ProcessName, true);
}
}
Hope this helps.
Luc Pattyn
|
|
|
|
|
Has anyone ever tried to use the Text Object Model[^] with a RichTextBox? Personally, I like the TOM much more than the manipulations allowed through normal interaction with the RichTextBox but I just can't seem to find any way to get to ITextDocument in .NET.
Has anyone ever attempted this before and lived to tell the tale? I doubt that I'm the only person who ever wanted a DOM for rich text in a .NET app...
|
|
|
|
|
There's an article here on CP that might help. This is the link Clickety[^] to the message that talks about using ITextDocument.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks! Seems just what I need.
|
|
|
|
|
Hello All !!!
Tell me please - how in .NET 2005 set total control for mailslot (function CreateMailSlot) for everyone.
Is it necessary set DACL in null ?
I am trying but there is no results...
If anybody uses securuty in .NET 2005 please help
|
|
|
|
|
Hi there,
I just wanted to know whether it was possible to create postscript file from doc, xls and ppt using .net framework. I am going crazy trying to find answer to this problem so at this point any help would be greatly appreciated.
|
|
|
|
|
Well, no. .NET cannot write a postscript file using built in libraries, nor can it read Office docs without the Office toolkit also installed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
So if this is not possible using using .net framework's built in library. Is there any other way this can be done.
|
|
|
|
|
Hi Friends,
In my project i set the session expire after 20 min. But it donot take that much time, the session is expiring with in 5 min or 10 min or expiring when am working on it, can anyone tell what i can do for solve this problem?
thanks & rgds
Nithin
|
|
|
|
|
Nithin Krishna wrote: In my project i set the session expire after 20 min. But it donot take that much time, the session is expiring with in 5 min or 10 min or expiring when am working on it, can anyone tell what i can do for solve this problem?
I had a similar problem in one of site.It was caused by too much stress on the domain. This could be one reason your session is expire before 20 min.
Other reason could be configuration setting in the web file.
|
|
|
|
|
this happens only when there is lot of data to be loaded in the page.Simplify the queries and use stored procedures.
cheers
sangeet
|
|
|
|
|
I have my C# project which runs on a PDA device. How to I check on the device which version of OpenNetCF it is using.I mean which file to check for and on which location on the PDA? Or is it only on the local machine on which I compile my code. But I see that a code which I have compiled on my machine, runs well on one PDA, but does not on the other PDA and gives the following exception
"An unhandled exception of the type 'System.MissingMethodException' occurred in System.Windows.Forms.dll"
|
|
|
|
|
Hi All,
Many times I miss to follow good practices for .net development.
I have started collecting a list BEST Practices for .net development or in short a check list on .Net code for optimization to improve my .net development.
For example, Should I use Data List, Data grid and Data Repeater for displaying the data to user where I believe Data List is more efficient way for display data.
Could you please recommend me is any website or any book or a check list which contains Best Practices for .Net.
Thanks & Regards,
Vijay Kulkarni
|
|
|
|
|
|
i want to do real time simulation with WPF.how can i do it?
|
|
|
|
|
That depends entirely on what your simulating and your ability to code it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|