|
You can use VSA. There is an article about it somewhere on CP.
Ñ There is only one MP Ð
|
|
|
|
|
yeah But VSA is not only for .NET languages ?
ME I want to make my own script language using C# but the user can Add a function call AddFile(param1,param2) and then me I have already declare the function in C# to make action for AddFile
Anyway I will try to read more about VSA.
Thanks a lot
|
|
|
|
|
|
Hi,
does anybody knows how to use list controls in virtual mode with C#?
In unmanaged C++ this is done by setting the LVS_OWNERDATA style and
handling the according notifications.
Thanks in advance
Holger Persch
|
|
|
|
|
|
I want to pass some parameter to a worker thread from my form class.How can I do it?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
|
Hi!
I think you can put your worker Thread function in a seperate class. Then you can initialize your class any way you like (with your "parameters") and set the ThreadStart delegate of your thread to the appropriate method in your class.
Cheers
HTH
Martin
"Situation normal - all fu***d up"
Illuminatus!
|
|
|
|
|
hello everyone,
i'm not sure if this is the right area but here goes. i've been tasked to create a web-site in c# that does several data related things, but the most important section is this part they call "the data import tool" ( yeah real catchy.. ) any whoo.. the idea behind this piece is the user would be able to create datasources that are basically just like ODBC DSN's, in that you select a type and depending on the type you fill out some info (i.e. ip address, login name, database name). this connection will allow the main site to take a search term and query across these different datasources. my question is, is this even possible? then if it is can it be done with c#. i've posted a quick sketch of what they are looking for at this address : http://www27.brinkster.com/jtucker/data.htm
any ideas, or help would be great.. thanks,
------------------------------------------------
jason.tucker
"technologies that require sober programmers never work. ~ Don Box "
sonork 100.15072
|
|
|
|
|
hi,
i'm writing a dll and there's a huge but constant data structure that is used from time to time inside the library.
when i put it into an ordinary class, this data-structure (it's a tree) has to be rebuilt everytime an object of the class is constructed.
there's no main-function or app-object to keep the tree reference throughout the use of the dll. reference lost, garbage-collector feeded
what's the most effective way to solve this?
:wq
|
|
|
|
|
Hi
Have tried putting it in a different class and exposed it a static member?
You dont so whether u make changes to it, or it just serves as a "lookup table"...
Maybe it helps
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
yes it is kind of a lookup-table (a lookup-tree if you like)
but when i have that thing a static member of a class, it still has to be created once. when should i do that? in the constructor? but then the procedure takes place each time an object of this class is created via new. or do you think an additional static bool set to true after the first creation may help?
lets say
Class A { <br />
static Tree lookupTree; <br />
static bool created=false; <br />
A()<br />
{<br />
if (!created) <br />
{<br />
ExpensiveTreeCreationFunction();<br />
created = true;<br />
}<br />
}<br />
...<br />
}
and then i can use
<br />
A control = new A();<br />
A.foo();
as often as i like without ExpensiveTreeCreationFunction(); called each time?
:wq
|
|
|
|
|
yes ! almost, but it would be better to check when calling foo() instead of a static constructor (some things never makes sense ) or just add a static method to create it...there are many choices Do whats best for you.
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
checking in foo() is ok. i just tried and it seems to work.
to get things clear: when a class consists of a static member, this member is stored somewhere else than the objects of that class (which are destroyed by the GC when references go to zero) and are freed/destroyed when? at the end of the program-run? i just want to understand that...
:wq
|
|
|
|
|
The best solution to this is to use a static member and static constructor. Create some class which has the static member of the type you are referring to. Then put hte build datastructure code in the static COnstructor. This way the table will only be built ont time and you odn't have to worry about when to build it. The static constructor will be called before anything in the class is accessed.
|
|
|
|
|
|
Hi all
Im painting alot of lines to a part of the screen at a very fast rate (100fps). Now I note in taskmanager that the PF (pagefault?) delta goes up to 10000 - 15000 when these drawing operations take place. Is this normal and what i also find is huge memory usage (normal 20mb ranging to 120mb). Is this just the GC taking its time to "kick" in?
Thanx in advance
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
hmm. i have a program which runs all day long and does some minor painting/threading/network-things every 5 minutes. i had very neat effects with it running in the background (top was a complete reboot of my win2k-machine) - from weird/interchanged icons over wrong repainting to ... well this reboot once.
i don't trust gdi+
(yes i released every resource)
:wq
|
|
|
|
|
OK problem solved , a Bitmap object was created every frame, i decided get graphics object from handle instead of getting it from a bitmap. Damn that doesnt work either, different problem.
OK, then I created Bitmap at constructor. Helps with memory issue, but still seeing about 5000 - 10000 PF (page file, not fault ) delta. Is this at all bad in anyway?
Maybe its time to look at DirectDraw...
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Hi!
Do you call Dispose() on the graphic objects when you don't need them anymore (end of function or end of loop)?? Because the garbage collector doesn't handle unmanaged resources (like GDI or file handles) and therefore only collects your classes (and with them the unmanaged resources) during idle time.
Cheers
HTH
Martin
"Situation normal - all fu***d up"
Illuminatus!
|
|
|
|
|
H i Martin
I have tried calling Dispose and without , same effect, seems there are a lot of useless funtions lying around. The PF delta is caused as a bitmap is written to every 20ms or so. The high memory issue was cause by creating a new Bitmap every time instead of just reusing one. Unfortunately, ya cant seem to write directly to the screen without flashing problems (every draw/clear operation is reflected immediately to screen. So i guess im stuck with the PF delta problem although I dont think its so serious.
Thanx for the help
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Dim UIH As UIHierarchy = DTE.Windows.Item onstants.vsWindowKindMacroExplorer).Object
Dim samples As UIHierarchyItem = UIH.GetItem("Macros\Samples")
How to convert these two lines to c#.I am just starting c# on doing some simple project.UIHiearchy is a interface.
Thanks in advance
|
|
|
|
|
<br />
UIHierarchyItem samples = UIH.GetItem("Macros\Samples");<br />
thats the second line but i will will need to know more about the first line before i can convert it.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
suresh_sathya wrote:
Dim UIH As UIHierarchy = DTE.Windows.Item onstants.vsWindowKindMacroExplorer).Object
Thre ar som mising chratrs
Please repost line
maybe
UIHierarchy UIH = (UIHierarchy) DTE.Windows.Item[Constants.vsWindowKindMacroExplorer];
Try it
UPDATE: Dont try it, it wont work. That constant is not defined in any enum from the envdte assembly. Could you please repost complete VB.Net line?
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
leppie wrote:
maybe
UIHierarchy UIH = (UIHierarchy) DTE.Windows.Item[Constants.vsWindowKindMacroExplorer];
I don't use VB.NET but the assembliey attributes are placed between < and >.
Ñ There is only one MP Ð
|
|
|
|