|
From the minimum requirements it seems that FileSystemWatcher does not work with 98 or ME. So, I'm thinking about writing my own version that does. Any ideas? I guess detecting new files or files that have changed with different sizes is easy. How about detecting changes in files where the new and old file size is the same? Is checking the various date stamps the only way?
Thanks in advance
Andy
|
|
|
|
|
|
Hi
need some serious help with a regex pattern..
i have the following expression:
Regex regex = new Regex(@"(^(aa)*(?!a)(b))", RegexOptions.ExplicitCapture);
what it does (partially) and is intended to do is to match only when there is an EVEN number of A infront of B
like:
b -> match
ab -> no match
aab -> match
aaab -> no match
aaaab -> match
aaaaab -> no match
etc..
so far so good
what i want is to make it only return the "b" when a match is found.
and also i want it to behave the same way when there is text infront of the pattern , like:
helloB -> match
helloAB -> no match
helloAAB -> match
helloAAAB -> no match
anyone?
//Roger
|
|
|
|
|
Roger J wrote:
what i want is to make it only return the "b" when a match is found.
Won't this be in the 4th element of the GroupCollection that comes out of the match?
|
|
|
|
|
Evening,
I was hoping if anyone knows how exactly one would hook into Internet Explorer using C# (similar to Browser Helper Objects of C++).
Any starter information appreciated,
Thanks,
Nishant
|
|
|
|
|
suppose I want to deploy an application on a pc without a common runtime, I need to package it with dotnetfix.exe. But how do I package this seamlessly with my application. I created visual studio .net setup project, but need details on how to include dotnetfix.exe...
thanks a lot
|
|
|
|
|
|
Hello,
Is it possible to add a windows form as a control in another form. If possible how? (With out using MDI relation ship).
Chito
|
|
|
|
|
How would I find out if the following was a whole number?
As floats
10/6 = 1.666666666666667
10/2 = 2.0
|
|
|
|
|
You can do a modulus operation to find out if the remainder is 0:
10%2 = 0 (10/2 = 5 r 0)
10%6 = 4 (10/6 = 1 r 4) <-- not a whole number
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
Thanks that will work great.
|
|
|
|
|
Hi All,
How do I enable multiple selection in a TreeView?
cheers,
Donal
|
|
|
|
|
|
I try to display the shell context menu of a file. When I get the
IContextMenu, I want to track the selected menuitem with the
TrackPopupMenu API call.
Here's the call :
int num = TrackPopupMenu(<br />
menuHandle,
TPM.TPM_RETURNCMD | TPM.tpm,<br />
pos.X, pos.Y,<br />
handle,
IntPtr.Zero);
The declarations :
public enum TPM :long<br />
{<br />
TPM_LEFTBUTTON = 0x0000L,<br />
TPM_RIGHTBUTTON = 0x0002L,<br />
TPM_LEFTALIGN = 0x0000L,<br />
TPM_CENTERALIGN = 0x0004L,<br />
TPM_RIGHTALIGN = 0x0008L,<br />
TPM_TOPALIGN = 0x0000L,<br />
TPM_VCENTERALIGN = 0x0010L,<br />
TPM_BOTTOMALIGN = 0x0020L,<br />
TPM_HORIZONTAL = 0x0000L,<br />
TPM_VERTICAL = 0x0040L,<br />
TPM_NONOTIFY = 0x0080L,<br />
TPM_RETURNCMD = 0x0100L,<br />
TPM_RECURSE = 0x0001L,<br />
TPM_HORPOSANIMATION = 0x0400L,<br />
TPM_HORNEGANIMATION = 0x0800L,<br />
TPM_VERPOSANIMATION = 0x1000L,<br />
TPM_VERNEGANIMATION = 0x2000L,<br />
TPM_NOANIMATION = 0x4000L,<br />
TPM_LAYOUTRTL = 0x8000L,<br />
}<br />
[DllImport("user32.dll", SetLastError=true)]<br />
public static extern int TrackPopupMenu(<br />
IntPtr hmenu,<br />
TPM fuFlags,<br />
int x,<br />
int y,<br />
IntPtr hwnd,<br />
IntPtr rect);
The menu is always displayed on the left side only even if the x value
is greater than 0...
Note that I know that the declaration of the API call is false :
normally, there is a "int res" between the y and the hwnd parameters.
But when I add "int res", the menu is no more displayed.
I also tried to use TrackPopupMenuEx but the menu is also not showed...
I have Windows XP Pro SP1.
Thank you
|
|
|
|
|
Who can tell me how to reuse the Microsoft WebBrower control in C#?
I reference the method Navigate2,but the webpage opened didn't display images.
Below show my codes:
Object objUrl="http://www.yahoo.com";
Object obj=null;
axWebBrower1.Navigate2(ref objUrl,ref obj,ref obj,ref obj,ref obj);
Please help me!
|
|
|
|
|
Rather than setting the obect to null, consider using the System.Reflection.Missing value. Also, I use the Navigigate
method rather than Navigate2. Someone might tell us the
difference other than how the URL is passed?
object missingVal = System.Reflection.Missing.Value;
string address = "http://www.yahoo.com";
axWebBrowser1.Navigate(address, ref missingVal, ref missingVal,
ref missingVal, ref missingVal);
|
|
|
|
|
Can I get the Microsoft Windows Installer packaged separately if I don't have the visual studio.NET?
Jassim Rahma
|
|
|
|
|
Hi,
I've got a huge log-file, i'm intrested in displaying it with a ListView style control, the problem is that these controls can't handle alot of data.
My thoughts were:
1. Find a ListView control that knows to handle alot of rows.
problem: can't find one.
2. Create a "Virtual ListView", meaning, the ListView contains only a specific subset of the data, when the user scrolls, i read for the new data.
problem: not only that I don't have a clue how to do that, but i think it will be problematic when the user scrolls alot(it means i have to read fast).
Anyone's got an idea?
Thanks in advance,
Eytan
|
|
|
|
|
Answer 2 is the right one. You'll have to manage the scrolling itself, reflected by the WM_VSCROLL and WM_HSCROLL messages (along with combination of codes LINE, PAGE, ...). My recommendation is to download a Petzold sample called GDIDEMO2 (google!). That's old stuff from a MFC programming book, however that's the simplest and most reusable thing I can think of.
|
|
|
|
|
Didn't understand from your post:
Is the message loop and message handling exposed by .net, or are you suggesting i Write it with MFC?
Thanks,
Eytan
|
|
|
|
|
Any .NET winform control exposes a WndProc method and heavily relies on it. Override it and process the mentioned messages. Since scroll messages passing through .NET controls are exactly those from WIN32 controls, you can rely on ready-to-use code. Now, that's up to you...
|
|
|
|
|
Thanks alot,
I'd like to use your advice in another thing related to this application.
Again, this application is pretty simple,
There is a Log-file which is written in very high-rates.
My application(called LogMon) reads the Log-file when it changes and saves in its memory only the last 600 or so records.
When the user scrolls up and back down, i calculate the records that should be loaded and load them before he scrools up to them.
Anyway,
I thought that maybe the whole idea of reading from a file is pretty slow,and came up with the following idea.
I split the LogMon to 2 apps:
* LogMon File2DB
* LogMon Gui
LogMon File2DB:
---------
Reads lines appended to file, and inserts them into a local\remote DB.
LogMon Gui:
---------
Reads the DB and updates when DB has new records.
This makes the GUI much faster and much easier to implement the "virtual ListView".
Quetsions:
1. Will this be faster?
2. regarding the LogMon File2DB, say the parsed log-file has a changing format, meaning there can be some log-files, each one with different format, is there any way, maybe with XML of defining dynamically the structure of the log-file?
Thanks ,
Eytan
|
|
|
|
|
eytan levit wrote:
Will this be faster?
Depending on whether the begin or the end of the logfile is mostly interesting, I would seek to either the begin or the end of the file, and only load a chunk, then build the list view out of it.
eytan levit wrote:
regarding the LogMon File2DB, say the parsed log-file has a changing format, meaning there can be some log-files, each one with different format, is there any way, maybe with XML of defining dynamically the structure of the log-file?
I don't think the structure of a log file changes much, regardless of the application it is used for. A log file has several common fields including "date, user, log class family, severity, description". If that's a log of c++ code, then you add custom records like module name, filename, line. But that's pretty much all about it.
Even though I believe that's would be too much efforts here, your code could read the log structure out of a config file (ini, csv, xml). I believe there are a few ready-to-use log managers here in Cp.
|
|
|
|
|
I'm trying to get the contents of the AxWebBrowser.CreateGraphics(); to a PrintEventArgs.Graphics object. The desired effect is to be able to have the contents of a web page displayed on a printed page with my own graphics printed too. Like a nice title or a surrounding box for the page.
Any ideas?
"Where would you rather be today?"
|
|
|
|
|
I'm new to .NET so perhaps I'm missing something obvious, but is there a simple way to zero a byte array. I have this code:
byte[] byteArray = new byte[some size]; now is there a way to zero that array so that I can use it again?
Also another quick question. Is there a way to set the default button in the form designer? I know there's an IsDefault property but I can't find a way to set it in the designer.
Thanks in advance.
- monrobot13
|
|
|
|
|