|
A technique I've been playing with is to deploy the application as a "ClickOnce" app to a server share, but not make it available offline (so no start menu item is created on the users machine). Then I just send out a link to the .application file (file://server/share1/Support/Apps/MyWonderful.application). This works pretty well, and lets you specify what permissions you want your application to have.
"On one of my cards it said I had to find temperatures lower than -8. The numbers I uncovered were -6 and -7 so I thought I had won, and so did the woman in the shop. But when she scanned the card the machine said I hadn't.
"I phoned Camelot and they fobbed me off with some story that -6 is higher - not lower - than -8 but I'm not having it."
-Tina Farrell, a 23 year old thicky from Levenshulme, Manchester.
|
|
|
|
|
I want to make the background of boolbutton images to be the same with system color.
How can I do? By the way, what does mean "ImageTransparentColor" property in VC#?
thanks.
|
|
|
|
|
ImageTransparentColor is the color within the image that will NOT be drawn. So, for example, to make a bitmap where the only thing visible is a single black dot, make one with a single black dot over a magenta background. Then set the ImageTransparentColor property to magenta, and it will not be drawn. This is used so the images don't have to fill in a rectangular area when drawn. I beleive this answers both questions. (to make it system color, simply set the ITC property as described above, then set the container's backcolor property to the system color). Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Hi
How to restrict file type in one or more dynamic file upload controls in C# Web project.
For example I am creating code in code-behind
FileUpload uploadDataFile = new FileUpload();
In Browse dialog I want to restrict File Type as Xls, txt, CSv.
Please remember FileUpload controls are creating dynamically.
Thanks in Advance
|
|
|
|
|
Elena2006 wrote: In Browse dialog I want to restrict File Type as Xls, txt, CSv.
It's not possible with FileUpload control. You can check the file extension and content type after submitting the form.
|
|
|
|
|
What would be the point? A particular extension doesn't guarantee what the contents are.
|
|
|
|
|
I have a tricky problem that I could really use some help on.
My app works with a number of very large float[] arrays that can easily use more memory than is available. To solve this I have created a memory manager that, in cases of dwindling memory, will dump some of the older arrays to temporary files. My app can request a reference to one of these arrays at any time, and the memory manager will recreate the array from the dumped copy if it's no longer in memory.
The problem is that my memory manager must not dump to disk any arrays that are currently being used by other parts of the app because a) any further changes to the array won't be reflected in the dumped copy, and b) dumping an array to disk that is being kept in memory by other parts of the application won't help memory load to begin with since the array won't be collected.
How can my memory manager, when it is deciding which arrays to dump to disk, check to see if other parts of the application are holding references to any of the arrays?
Thank you very much!
|
|
|
|
|
Why don't you use a cooperative approach, making your arrays released by their consumer to your memory manager?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
exactly.
impelment same mechanism as COM object use.
add two methods:
AddReference()
ReleasReference()
and increase, decrease number of it's references in prive variable:
int referenceCount .
When AddReference() is called, referenceCount == 0 and array is dumped to file, recreate the array
When ReleasReference() is called and referenceCount == 1 , dump array to file.
Call AddReference() everytime you need to pass reference to another variable
Call ReleasReference() everytime you dispose this reference
zilo
|
|
|
|
|
(just kidding)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
zilo
|
|
|
|
|
Thank you for the throughtful replies.
An issue is that the app reached a quarter million lines of code and a fair level of complexity before it became clear that temporarily writing these arrays to disk would be necessary. Being able to figure out a way to do this that is transparent to the rest of the app would be a real lifesaver.
|
|
|
|
|
I know it is hard to hear but maybe a bit refactoring is worth. please, don't blame me for
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
I don't blame you....but I still might be crying myself to sleep tonight.
|
|
|
|
|
Well good night then and happy new year.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
My first thought upon reading the subject line was, "If it exists, it's being referenced".
Winkles wrote: a quarter million lines of code
What's a line of code?
Anyway, yeah, you need a class that does all that behind the scenes, sounds like a good weekend project.
Or make some type of database? So all the arrays are always cached to disk?
|
|
|
|
|
Could you help me tisth advise how to protect user login and password
i have an open-source applcication which backups data and i want to prevent unauthirized access to file with options programmatically. There is a login and password of a backup user.
so i have no ideas what to use to prevent such information being disclosed or just copied with other people
|
|
|
|
|
|
Hi all
I Wount to add Footer to DataGridView In C#.Net Windows Application
But In Windows Application The DataDridView Dont Have Footer To Add it
I wount to How i can add footer to DataGridView or A new Free Grid Control Have Footer
Thanks For Any Body Help Me
Thaer
modified on Monday, December 31, 2007 2:34:56 AM
|
|
|
|
|
Create a new class, inherit from DataGridView, and override the OnPaint method to display your footer as follows
public override void OnPaint(...) {
base.OnPaint(...);
} Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
How can I apply Model View Conrol (MVC) pattern on windows app, If i were to have only a custom user control class, Data class, and ProperGrid control on a Form1.cs in C#. I have went through couple of MVC patterns on google and here as well, but neither of them telling me how can we update raw data if they were to change by two places, first is through PropertyGrid itself and secondly when the custom control is moved through the mouse.
Please advise me if there is any link i can further learn from. Thanks I appreciate ur favor.
|
|
|
|
|
netJP12L wrote: me how can we update raw data if they were to change by two places
I did this using delegates. So when the data class gets changed, delegate will be invoked and it will change the grid data. I don't know whether this is the real MVC pattern
|
|
|
|
|
Thanks for answering, the way I am trying to implements is also the same way you said. I have a ShapeUserControl that get updated by the dataclass through the delegates. But my problem is how can I update the data class through the ShapeUsercontrol. Can you please show me some demo.
|
|
|
|
|
SharePoint & BizTAlk Server.
Among these two, Which one has better future.
For Employment, which course is better ?
Among these two, which one is easy to learn?
Can any one give your views regarding my question???
G. Satish
|
|
|
|
|
Hi, I have set DataSource for a ComboBox and it works properly but now i want to insert another option ALL, how I could do so? Plz help me out.
|
|
|
|