|
easy when you know how eh
just hard to google for some things
thank you
g00fy
|
|
|
|
|
is there another way though, this is fine when i open a file, but i would like to update the size as i type into the file to use this method i would have to save file after each keystroke.
kind regards,
g00fy
|
|
|
|
|
Try using Refresh() method of FileInfo class before calling the Length property every time you want to update it, i.e.,
fiMyFile.Refresh();
lLengthMyFile = fiMyFile.Length;
Though I have not checked it in the context of your application (but it worked in my application having some different requirements), it may work if the character is being written in the file as it is being typed.
Another way out could be to use the Length property of FileInfo as above as and when you save the file. And, after that as the characters are being typed, you keep a count of the characters / bytes of the unsaved data and add it to the Length calculated earlier for the saved data.
I hope it works.
Regards,
Ashok Dhamija
_____________________________
Padam Technologies
-- modified at 1:13 Monday 19th September, 2005
|
|
|
|
|
How best to declare/cycle 3 Pens on a Windows Form.
By "cycle" I mean that I want to iterate through the pens based on
button events...thanks
|
|
|
|
|
Don't declare the Pen locally. Declare and define the Pen at the form level, and pass parameters to the pen with the Button click.
|
|
|
|
|
Unless they are not one pixel wide pens, just use the Pens enumeration instead of creating your own.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I use a Panel as drawing zone and set AutoScroll = True, hoping a scroll will be attached to it automatically when I draw large drawings. But it does not happen. How can I make it?
Appreciate any advice!
Radic
|
|
|
|
|
Hoho! I get it!
Put another panel as the container of the drawing zone and set AutoScroll = True. When drawing, if the figure is close to the width and height of the drawing zone, increase the width and height!
Excited!
|
|
|
|
|
hi,
i have problems with my setup project...i want attach the dll files...so that the appl can be started without installed net framework:
but
<br />
------ Build started: Project: Sender, Configuration: Debug .NET ------<br />
<br />
Preparing resources...<br />
Updating references...<br />
Performing main compilation...<br />
<br />
The project is up-to-date.<br />
Building satellite assemblies...<br />
<br />
<br />
<br />
------ Starting pre-build validation for project 'Setup' ------ <br />
ERROR: Unable to find file 'sorttbls.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'prcp.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'culture.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'l_except.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'prc.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'region.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'CharInfo.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'bopomofo.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'ksc.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'xjis.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'l_intl.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'big5.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'ctype.nlp' of multi-file assembly 'mscorlib.dll'<br />
ERROR: Unable to find file 'sortkey.nlp' of multi-file assembly 'mscorlib.dll'<br />
------ Pre-build validation for project 'Setup' completed ------<br />
------ Build started: Project: Setup, Configuration: Debug ------<br />
<br />
<br />
<br />
<br />
---------------------- Done ----------------------<br />
<br />
Build: 1 succeeded, 1 failed, 0 skipped<br />
|
|
|
|
|
You need to have MS .NET framework on target machine. You cannot just include the dlls and run your application.
It is possible to install the framework through your setup if it is not existing on the target machine. For that you need to include .NET redistributable with your setup.
- ashish
|
|
|
|
|
hi, thx
whats the .NET redistributable?
cu
|
|
|
|
|
i've made an application, i want to create an algorithmic to handle a serial number inputted by the user at the first running of the application, and understand if it is one of possible (correct) or not, in this way unlock or not the appliction.
Where can i start by?
How can avoid hacker see my assembly algorithm?
|
|
|
|
|
look for www.thinstall.com
|
|
|
|
|
Almost no such method is hacker-free. Only thing is how more difficult you can make it.
You can use some hardware-related factors to create your serial numbers / copy-locking methods. You can also have some method to create some random number at the time of the first run of the software. But, you'll have to create your own algorithm. Search "serial number" in Code Project articles, and you'll get some useful material. Here is the first article in this search: http://www.codeproject.com/csharp/hard_disk_serialNo.asp[^]
Alternatively, you can consider some third-party solution. Google with phrases such as "copy protection", "software protection", and the like, and you'll get tons of such third-party applications.
Regards,
Ashok Dhamija
_____________________________
Padam Technologies
|
|
|
|
|
I need to add two colunmn and show them into the third column in my datagrid. Please help me with this.
|
|
|
|
|
|
Is it possible in C# app to react on some "USB device connected" event (USB Mass Storage, to be more precise) and obtain its new drive letter?
I have a directory tree and want to refresh it when new drive appears (e.g. flash disc).
|
|
|
|
|
You should start using unmanaged code then, kernel32.dll I think. You could also use user32.dll to read system messages. Search http://www.pinvoke.net for sample code.
|
|
|
|
|
since it's a "mass storage device" microsoft has a generic driver for it... that's all I know.
|
|
|
|
|
Cbeck out some article on Coding4Fun on MSDN. That should tell you how to do it.
|
|
|
|
|
I have several classes that make a namespace 'CsGL.Basecode'. In my application i would like to use them (by writing 'using System.CsGL.Basecode'). How to add this namespace into that project easily? Do these classes have to be copied into appropriate folder?
thank you very much for any help
|
|
|
|
|
You have to include them in the refernce file.
Niklas Ulvinge aka IDK
|
|
|
|
|
What is exactly this file name? And did you mean that i have to add them 'manually' or in visual studio?
|
|
|
|
|
In the sollution explorer there should be a reference 'folder' where you can add it. The 'folder' is actualy a file that you can change manualy.
I got Microsoft Visual Studio 2005 Beta 2, I don't know how your VS look like but it should be the same.
Niklas Ulvinge aka IDK
|
|
|
|
|
There is no way to add a reference via VS (I have VS2003 but as you said, that shouldn`t make any difference), because he accepts only 'component files' (and I want to add a namespace which consist of several classes).
In the 'C# project file' there are 2 possibilities where I could add it:
<Reference
Name = "System.XML"
AssemblyName = "System.XML"
HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<File
RelPath = "App.ico"
BuildAction = "Content"
/>
I tried with the reference but still in main class this was not possible to write using System.CsGL.BaseCode
|
|
|
|