Hi all, i really need to catch "ESC" key press while focus is on WebBrowser control.
I tried something like this:
(webControl as Control).KeyPress += new KeyPressEventHandler(MyKeyPressEventHandler);
But it doesnt work. The method is not called. I tried some methods, described here, but dont get any result ( Help, please.
...
Is there a way to return a point for a string within a text box? I found a COM function GetTextExtentPoint that will return the length of a string, but I want to know the point where the string starts.
...
I have the following data I want to display in a DataGridView:
DataEntry[] data = new[]{
new DataEntry(){Name = "A", Entries = new []{ "1", "2"}},
new DataEntry(){Name = "B", Entries = new []{ "1", "2", "3"}}};
"Name" will be a simple TextBox field, and "Entries" a ComboBox where the items to choose from are the elemen...
I want to be able to dynamically modify the image in a c# treeview. Specifically, I would like to reduce the opacity in certain cases of certain images.
I know that I can add extra icons to the imagelist that is bound to the treeview, but as cases like this add up, the extra icons will get to be too much.
Is there a way to access the ...
Can someone provide some sample code how to make a post-mortem lookup into the PDBs of a managed application on a symbol server to retrieve source file/line number for a managed stack trace containing the following stack frame information:
<StackFrame
module = "TestBench.exe"
className = "TestBench.Program"
methodName = "M...
Hello all,
I'm using Enterprise library, but the idea is the same. I have a SqlStringCommand and the sql
is constructed using StringBuilder in the forms of
"insert into table (column1, column2, column3) values (@param1-X, @param2-X, @parm3-X)"+" "
where "X" represents a "for loop" about 700 rows
StringBuilder sb = new StringBuild...
I wrote a Log class derived from System.Diagnostics.TraceListener like so
public class Log : TraceListener
This acts as a wrapper to Log4Net and allows people to use System.Diagnostics Tracing like so
Trace.Listeners.Clear();
Trace.Listeners.Add(new Log("MyProgram"));
Trace.TraceInformation("Program Starting");
There is a request t...
Hi,
Is there a way to create a window (similar to a screen-saver) that will be displayed once your running application is not 'interacting' (or being idle) with the user, meaning to say, no mouse movements happening on the application.
Some of my friends suggested to use a Timer for this one. Any suggestion for a good head start? Thank...
I've been looking for solutions that provide a couple of types of protection and dotfuscator has been what I've landed on each time I look. Specifically, I like:
code obfuscation
their usage analytics
tamper detection/notification
shelf-life enforcement
Now, I know that there's lots of alternatives to the first, some of which are fre...
Users drag rows up and down in my DataGridView. I have the dragging logic down-pat, but I'd like there to be a dark marker indicating where the row will be placed after I let go of the mouse.
Example from Microsoft Access; I want to drag rows instead of columns
Does anyone know how I'd go about doing this? Is this built-in, or would...
This sounds simple but my regex knowledge is limited.
I need an expression to match a decimal number or the string "all", as in a range validator that allows the word all represent the max range.
I thought something like this might work:
((^[-+]?\d*\.?\d*)|any)
But the above doesn't work for "any".
...
I have a main Table, with several "child" tables. TableA and TableAChild1 and TableAChild2.
I have a view which shows the information in TableA, and then has two columns of all items in TableAChild1 and TableAChild2 respectivly, they are rendered with Partial views.
Both child tables have a bit field for VisibleToAll, and depending on ...
I want to deploy an application with a license attached. However, I want to prevent that my dll can be easily referenced in visual studio.
What are the usual ways of doing this? I was thinking about ngen-ing the application to prevent this, however, then the code becomes architecture dependent. Im not targetting any other architecture/p...
I read in an article somewhere that trig calculations are generally expensive. Is this true? And if so, that's why they use trig-lookup tables right?
EDIT: Hmm, so if the only thing that changes is the degrees (accurate to 1 degree), would a look up table with 360 entries (for every angle) be faster?
...
I'm creating a reporting application, and our customers are going to need to generate some pretty big reports which require quite a bit of memory. Ive been in a re-factoring mood lately, so I was wondering what the best way to access the properties of another open form would be(The reporting viewer opens in a new form.) So far I have:
...
I have a join table where the original table is a numeric type and the join table key column is a string type. Legacy decision that I am trying to avoid having to change to minimize the risk to the scope of work.
HasManyToMany<Attachment>(x => x.Attachments)
.Table("ObjectAttachments")
.ParentKeyColumn("ObjectId")
.ChildKeyColumn...
I need to traverse through an HTML document and detect the position of each tag so I can insert HTML elements when I reach specific positions, such as the bottom of a page (9x11 paper)
I am using the .NET web browser control. I cannot seem to get the code to figure out my current position. OffsetRectangle is dependent on the parent node...
Is there a way in .Net to find out exactly which process has locked a file?
EDIT: I'm doing this because I want to let my user know that they can't modify/open the file, because at the moment, another program they're using (such as Excel) has it open. Hopefully, this helps.
...
I'm developing a .NET application that will have both a WinForms and a Silverlight client. Although the majority of code will be in the server, I'll need to have quite a bit of logic in the clients as well, and I would like to keep the client library code the same.
From what I could figure out so far, I need to have two different proj...
Is it possible to sort a TreeView collection using IComparer<T> and not IComparer? After all they are all TreeNode values, right?
...