|
[7:35:12 PM] parthasarathy says: Hi all,
I am creating an windows application using vb.net. I am trying to deploy the project as exe. In this i am having few doubts.
(i) How to make my deployed application to check for latest version updated (as yahoo messanger)
(ii) How to Deployee an project with in an another project. For eg: First i deployed project 1, now i want to use/call the deplyoed Project 1 inside the Project 2 while deploying.
(iii) How to make my application to run on system start up?
Plz suggest me an solution
Thanks in advance
Regards
Anuradha
|
|
|
|
|
well, if you're using vb.net then you're in the wrong forum, anyway:
i. Make your application add a registry value with it's version and then make the program check for it's version (or check a web server for newer updates).
ii. Include the 2 projects and use System.Diagnostics.Process.Start to open the 2nd project's exe.
iii. Add a registry value the following subkey: "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", add whichever name you'd like and the value should be the application's path.
|
|
|
|
|
Thank you very much for your reply.
I am having an another problem in the Question 2.
As you told i inserted this code
"Include the 2 projects and use System.Diagnostics.Process.Start to open the 2nd project's exe." in my application.
Now i am facing different problem, I want to run the Project 2 at the system start up(everytime), how to write in the
"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", add whichever name you'd like and the value should be the application's path",
plz explain this with an example.
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
I want to create a fake file which would appear to be big but would take almost no space on the drive, since the question is quite vague i brought an example i saw on some forum:
http://img107.imageshack.us/img107/5246/bigfiles2xt3.png
I managed to find C++ examples but no C# ones.
And before you answer please notice i don't want the files to take much space on the drive (i already created a program that makes files but they take as much space on the drive as their size).
|
|
|
|
|
YOu can us p/invoke to call the win32api, or other c++ dlls. For the former see www.pinvoke.net[^]. The signatures there were auto generated and a few are problematical as a result, but the overwhelming majority word out of the box.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
Isn't there a way to do this using C#?
|
|
|
|
|
yes, through p/invoke. The .net class library wraps all the normally used functionality of win32. IF you want to do weird stuff you still have to access the raw API.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
System.IO.FileStream fileStream = new System.IO.FileStream("test.file", System.IO.FileMode.Create);
fileStream.SetLength(9999999);
fileStream.Close();
File Not Found
|
|
|
|
|
Misread the question. A file reporting a size greater than it physically occupies will be caught on a disk error check like scan disk. So I can't see a particularly robust use for it (I am somewhat narrow minded sometimes)
File Not Found
|
|
|
|
|
There is the notion of sparse files and an fsdisk utility[^]
and a FileAttribute.SparseFile that sound good.
It is intended to skip sectors that would contain just zeroes, and is supposed to
work on some file systems only (NTFS yes, FAT no).
But I cant get it to work at all, it wont even keep the flag set (as opposed to hidden,
which gets accepted).
Luc Pattyn
|
|
|
|
|
hello
how can load one file to RichTextBox?
|
|
|
|
|
that would be simple for google.
By the way google is smart more than us, you can try asking it from time to time for basic questions like this
|
|
|
|
|
richtextbox has a property called Text which you can use to fill richtextbox with the strings.
richTextBox rtb = new richTextbox();
rtb.Text="hello";
|
|
|
|
|
|
Hi,
If its just the file you need to open and view the contents into a RichTextBox, you can use the OVERLOADED LoadFile() function which accepts a filename (filepath) as a string and a RichTextBoxStreamType as an another parameter
Eg.
this.richtextBox.LoadFile("c:\\temp.xxx", RichTextBoxStreamType.RichText).
The RichTextBoxStreamType.RichText should be used , if the cile to be opened in the RichtextBox is of RichTextType.
Refer MSDN for other flavors of RichTextBoxStreamType ENUM.
Thanking you in Advance
Regards
Pratik Shah
|
|
|
|
|
another good guy with goooooogle
You can load multiple files into RichTextBox one simple way :
load the files into separate buffers (dont use RichTextBox.LoadFile or something)... and then set's these buffers with the += .. :
System.IO.TextReader tr1 = new System.IO.StreamReader("filename1.txt");
string s1 = tr1.ReadToEnd();
...
richtextBox.Text += s1;
and so on
VirtualVoid.NET
|
|
|
|
|
Hello,
I am implementing a FileSystemWatcher to watch a directory for changes. The code that I wrote was as follows:
private void setupDirWatcher(string thePath)
{
FileSystemWatcher aWatcher = new FileSystemWatcher();
aWatcher.Path = thePath;
aWatcher.NotifyFilter = NotifyFilters.LastWrite;
aWatcher.Changed += new FileSystemEventHandler(aWatcher_Changed);
aWatcher.EnableRaisingEvents = true;
}
This is called once to do the setup and the intent was to have a watcher on a particular directory.
But I don't understand why this would ever work. It would seem to me that since aWatcher is a local variable and should go away at the end of the method, then the watcher shouldn't really work. I realize that 'new' is called here, but I don't see how this has any lifespan outside this method. What I see is that the event handler gets called several times, as changes happen in the directory.
I would have expected that aWatcher would need to be a class member for this to work. Is it just a coincidence that this works or am I missing something here?
Thanks,
Matt
|
|
|
|
|
The FileSystemWatcher instance is not collected by the garbage collector because of the event handler that is registered to the Changed event.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thank you for your response. It was helpful.
Matt
|
|
|
|
|
The life span in C# is a lot different than in C/C++ or other non-garbage collected languages. The "aWatcher" is a pointer to the created instance, and that pointer will expire when the method is finished, while the lifespan if the instance will be as long as, in easy terms, "somebody knows where it is".
Internet - the worlds biggest dictionary
|
|
|
|
|
So in this case, the watcher instance's lifespan is until either the program terminates or I explicitly unregistered the event handler at some point later in the code and I guess that would need to be in the specified callback method itself since I don't actually have a way to get to that watcher instance once the setup method is done.
Thanks for the clarification on this.
|
|
|
|
|
Correct. Generally if you need to unregister an event handler you need to save the needed instance information in class variables.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
OS :XP
Visual studio 2003
controls . RichTextbox
I have two richtextbox one is input and
other one is display.
I place some text in input then added
it will show in display window.
In display richtext I could not find the last send item.
the scroll is on the top
How can bring the scrollbar to down in run time.
for shwo the last send item from input richtext.
anybody help me
Continue...
|
|
|
|
|
textBox.Select(textBox.length, textBox.length);
i guess that will work
|
|
|
|
|
Hi
Is there any column like datagridDateTimePicker in vs-2003 version?
sivamyneni
|
|
|
|