|
Heritos Gger wrote: just using Notepad, Paint, and csc.exe
You should try SciTE which has a very small footprint and also offers syntax highlighting for C#. Plus you can bind csc to a menu item / the Build / Compile Command.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
if you have a generic abstract class:
public abstract AbstractClass<T>
Who's derivative classes declare the type like:
public DerivedClass1 : AbstractClass<int>
public DerivedClass2 : AbstractClass<bool>
How would get a third class to except objects of AbstractClass type no matter what T was:
public class NewClass
{
private AbstractClass myField;
}
Because as I understand it now, I would have to set a type on AbstractClass in the field definition. Obviously I could set the type as object, but that would defeat the who purpose. Is there a way to do this and retain type safety or am I going about this implementation all wrong?
|
|
|
|
|
|
It would, but I suppose I should have been more specific. What I specifically want is NewClass to have a collection of objects derived from AbstractClass. This means a collection that gets populated with DerivedClass1 and DerivedClass2 objects, which use different types in the generic.
|
|
|
|
|
There's probably a proper way to do this but a workaround could be:
Create an internal property inside AbstractClass that stores what type T is. In your collection then use AbstractClass<object> but when you actually come to use it cast it: (typeof (abstractClass.Type))abstractClass; .
This is probably completely the wrong way to go around it but thought it might provide you with some more thoughts. Too tired to think straight now
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
I have a tab control on an application. I want to simulate click the tab control without going inside the application.
On spy++ I see that each tab is a window.
How Do I send a click event.
Send Message perhaps?
Ok, so it is SendInput. But, how would I set the window handle? Its the first agrument in SendInput the window handle?
Or is there a function that I can find the exact coordinates of a window? My think is this. If I know the bounding rectangle, I can set the dw, dy values and raise a click event inside.
Can someone help me?
Thanks,
Nick
1 line of code equals many bugs. So don't write any!!
-- modified at 11:48 Tuesday 30th May, 2006
|
|
|
|
|
|
Yeah But SendMessage isnt firing the buttons correctly.
Think Im going to stick with mouse event instead
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
Nevermind. I got it to work with PostMessage
Thanks tho
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
I need to create a routine... processing routines to defeat CAPTCHA
You can help?
Nilo B.
-- modified at 10:52 Tuesday 30th May, 2006
|
|
|
|
|
|
J4amieC wrote: Hacking
Just feel like being tenecious but I think you mean cracker. (From google, I can't remember the exact place where I read about the difference between hacking and cracking).
Hacker:
Originally, a hacker was a term of respect, used among computer programmers, designers, and engineers. The hacker was one who created original and ingenious programs. Unfortunately, the current popular meaning of the term is used to describe those who break into systems, destroy data, steal copyrighted software, and perform other destructive or illegal acts with computers and networks.
Cracker:
A cracker is one who engages in one or more of the following: 1) breaks into a computer system; 2) figures out ways to bypass security or license protection in software; 3) intentionally breaches computer security. Contrary to popular belief, Cracker is not synonymous with Hacker.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Ed.Poore wrote: Unfortunately, the current popular meaning of [Hacker] is used to describe those who break into systems, destroy data, steal copyrighted software, and perform other destructive or illegal acts with computers and networks.
Pretty much sums up the uses of writing a program designed to get past captcha
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
li3k z0Mg j00 r t3h l33t HaX0r!!1!!11! d00d!11!
|
|
|
|
|
Hi all,
I have stored a GUID in a FlexGrid as string and want to reconvert this string back to a guid. I didt't find a way.
There is not Convert.toGuid or something like that.
Also a simple cast brought no solution.
string st = Guid.NewGuid();<br />
Guid gid = Convert.to?????(st);<br />
<br />
or<br />
<br />
Guid gid = (Guid) st;
What's the way
Tnx in advance
-- modified at 10:18 Tuesday 30th May, 2006
Frank
|
|
|
|
|
Hello fracalifa,
Try this snippet:
string st = Convert.ToString(Guid.NewGuid());
Guid gid = new Guid(st);
|
|
|
|
|
Hello CodyGen,
That's it !
Thanks
|
|
|
|
|
Hi all
"Generating an XML file from an XML schema"
The are so many tools for this purpose/
but im looking for an snipet of source code which execute this task.
Had watched in Articles but not explorate appropriated.
Please any links or suggestions.
Thank
|
|
|
|
|
I did some playing with this idea myself, it was painful and dirty and I never got it working right. I'd be interested to know if somebody has an answer for this.
XSD has so many different ways to specify the same structure, that it's really difficult to cover all the possibilities. If you find an answer elsewhere, please post it here.
You can use the XSD tool to generate XML I believe, but I'd like to find a way to do it programmatically for reasons other than outputing to XML. But if that's your aim, you might look at the XSD tool that comes with the SDK.
Visit BoneSoft.com
|
|
|
|
|
Ok coming soon appear my article with same ability(i hope )
Will advice you when come out.
Please provide me you email
My one is maxcpr@gmail.com
-- modified at 2:49 Wednesday 31st May, 2006
|
|
|
|
|
Hi everyone.
I'm working on an application that displays files with name and path ++ in a DataGrid.
One day I came over a ListView project on the inet that could show images / icons + text in one column,
so I started working on my own DataGridColumnStyle to try and achieve the same result.
Only problem is that its really cpu-consuming when it retrieves the images and displays them.
In my custom columnstyle paint method I retrieve the filname,
then I extract the extension from the filename, look up extension in
Registry to find default application, and at last I get the path to the default Icon file.
Finally, I can extract the icon using
hImgSmall = Win32.SHGetFileInfo(filePath, 0, ref shinfo,
(uint)Marshal.SizeOf(shinfo),
Win32.SHGFI_ICON |
Win32.SHGFI_SMALLICON);
I was wondering if anyone has been working with anything similiar and that might have some hints/tips
as how to make this less cpu consuming. Maybe a more efficient way of locating the icons.
I recon all the "lookups" in registry is what makes this so slow.
Might help with double-buffering too? The images and text are drawn to the screen. :S
-Larantz-
|
|
|
|
|
I haven't tried anything like what you are doing, but one thought struck me. Are you looking up a lot of files with the same extension? If so could you maintain your own list of icons using the extension as a key (maybe the dictonary class would be good for this?) so that you only need to look in the registry the first time you encounter an extension? That would cut down on keep having to recreate the same icon.
The procedure would be something like this:
1) Get extension from filename
2) Look in my list to see if I already have a bitmap
3) If I already have it, use it and we're done
4) If we don't have it look it up in the registry and add it to our list
|
|
|
|
|
Thx for the tip.
I've been thinking about something like that too. I'll try and implement it
at work tomorrow.
Still on the lookout for more efficient ways of retrieving icons if anyone
has a tip.
-Larantz-
|
|
|
|
|
I implemented iconbuffering now but it still flicks and takes up resources.
I'll try with double-buffering. That should atleast take care of the flickering.
When it comes to resources, maybe I can't improve that considering the fact that it's many paint operations.
-Larantz-
|
|
|
|
|
Hi all.
Can any one help me about implementing an "access control system" on windows applications.
rezaey
|
|
|
|