|
yes!
thank you very much for this. i haven't used the app.config before so this opens a lot of doors for me.
thanks for the insight!
gonad.
|
|
|
|
|
Two general questions...
First, I have SEVERAL system.Diagnostics.process events running in just ONE menu click event, but the thing is that only the FIRST process gets run, while the other processes are ignored. What is the reason for the other processes being ignored? Do I need to implement each of the processes using a multi-threaded approach? If so, is there a good article written on all of the steps required for multi-threading?
Second, I am implementing a C# windows application that accesses several graphics files based upon the menu item that is selected by the user. The problem is that when a different menu item is selected, the graphics items are NOT RELEASED, and thus they cannot be overwritten with graphic file replacements. The error message thrown is that there is a file sharing error. Is there a way that I could somehow RELEASE the graphics programmatically so that there would not be a file sharing error thrown, and if so, what is the syntax?
I would imagine that it would need to use a foreach loop with relation to a directory and would somehow utilize the control.Dispose() method ie.
string strDirectory = System.IO.Directory;
foreach(Control control in strDirectory)
{
control.Dispose();
}
Am I on the wrong track, or is there a way of RELEASING the files so that they are no longer in SHARE MODE so that they could be overwritten? Would appreciate some further assistance.
|
|
|
|
|
new_phoenix wrote:
First, I have SEVERAL system.Diagnostics.process events running in just ONE menu click event, but the thing is that only the FIRST process gets run, while the other processes are ignored.
Without seeing your code that launches all this stuff, it's impossible to tell you what your doing wrong. You should be able to launch any number of processes without spawning them on extra threads.
new_phoenix wrote:
Second, I am implementing a C# windows application that accesses several graphics files based upon the menu item that is selected by the user. The problem is that when a different menu item is selected, the graphics items are NOT RELEASED, and thus they cannot be overwritten with graphic file replacements.
You're running into the issue where if you tell an Image object to load an image from a file, the Image object maintains a lock on that file until the Image object is disposed. To work around this, see this[^] article on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak:
Interesting article about graphic file locking using the Image.FromFile() method versus FileStream. Makes me wonder why Microsoft would set up the possibility of creating this issue in the first place. Also, thanks for letting me know that I do not need to go into spawning threads to manage the processes as well. Could the problem of process management be that the first process needs to be killed before it could progress to the next process? Thanks again.
|
|
|
|
|
new_phoenix wrote:
Could the problem of process management be that the first process needs to be killed before it could progress to the next process?
Only if you're telling it to wait for the process to complete. By default, it will launch process after process without waiting. Like I said, we'd need to see your code that launches these.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
We have a .net 1.1/c# windows application. We install and everything is fine. The first time we try to run the application though it does a repair on itself and the following message appears in the application event log on the computer.
Detection of product '{32214061-AA74-405B-81B2-76E0213EFF49}', feature 'DefaultFeature', component '{9F3FC1C9-7A15-4F58-9117-AB0A91F57675}' failed. The resource 'C:\Program Files\Common Files\Crystal Decisions\1.0\Bin\pg32conv.dll' does not exist.
Weird thing is that this dll DOES exist - we checked for it before starting the application.
Any ideas on how to solve this? The repair messes up some configuration files we have so we need to stop it.
|
|
|
|
|
If this is happening after the app is installed using Installshield, then i have seen the same types of things. InstallShield does the repair on a file and it then also messes up alot of configuration too.To stop this for testing we had to disable the Windows Installer service after the app was installed. there is suppose to also be a flag to turn this off in the install script too, but we could not get it to work correctly.
Steve Maier, MCSD MCAD
|
|
|
|
|
we are actually not using InstallShield - just using the .msi and setup.exe. Maybe I will look for the script you referred to - thanks for the input.
|
|
|
|
|
Hi all,
I've created a UserControl having a picturebox control on it. Then I added my UserControl to the Windows Form and also added the _Click event. My problem is; when I click the UserControl the event is fired just fine but when I click the picturebox on the UserControl - nothing happens. What would you suggest?
Thanks
Radgar
|
|
|
|
|
Add an event handler to your UserControl that catches the Click event of the contained PictureBox and raises the Click event of your UserControl.
YourUserControl : UserControl
{
private PictureBox pictureBox1;
...
this.pictureBox1.Click += new EventHandler(pictureBox1_Click);
...
private void pictureBox1_Click(object sender, EventArgs e)
{
this.OnClick(e);
}
}
www.troschuetz.de
|
|
|
|
|
Thank you Stefan but I did it yesterday by adding a public delegate & event handler. Your way is much easier. Thanx!
Radgar
"Imagination is more important than knowledge." - Albert Einstein
|
|
|
|
|
I was following this tutorial
http://www.codeproject.com/dotnet/mgrmsmq.asp
but I don't seem to have System.Messaging. Can someone explain what's going on? I thought that was standard?
Thanks a lot,
Jim
|
|
|
|
|
It will be in a dll you need to import. Right click on 'references' for your project, click on Add Reference, and choose System.MEssaging from the .NET list.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanks you SO much, I am a COMPLETE idiot -_-
Jim
|
|
|
|
|
Hey!
I am using a Rich Textbox with wordwrap and with out Scroolbars.
I need to know ho big the Text box must be to fit all the text with out out using scroolbars.
How do i do this? i have lookt at lines but this just shows 1 lien?
BestRegards
SnowJim
|
|
|
|
|
How would I go about hiding files? I don't want to mark them as hidden, I want to actually hide the files like the program 'Folder Lock' does.
|
|
|
|
|
You'd have to ask Folder Lock how they do it. None of the Windows files sytems supports the kind of "hiding" that Folder Lock does.
My first guess on how they do it would be a self modifing .EXE and/or file system extension. The files are actually encrypted and stored into a file, kind of like a .ZIP or a self extracting .ZIP file.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I was reading an article how some keyloggers can hide themselves in this manner.
http://oxygine.com/Images/show.png
This picture shows the actual Folder Lock program file as well as where the hidden file is located. Im not quite sure what the ||||| means in the file path. The source materials.gcf that is in the hidden files is about 500mb.
Any idea, as I doubt Folder Lock will tell me how to do it?
|
|
|
|
|
Hey
I am using a TreeView to show some objects.
When a object is updated from the network connection the tree is updated(re build)
If the user hade open/expand some nodes it will be closed after the rebuild is runned.
Is there any way to save what nodes that is expand and what item that is selected?
Best Regards
Snowjim
|
|
|
|
|
Snowjim wrote:
Is there any way to save what nodes that is expand
Use the Expanded property of TreeNode .
Snowjim wrote:
and what item that is selected?
Use TreeView.SelectedNode or TreeNode.IsSelected .
Charlie
if(!curlies){ return; }
|
|
|
|
|
The easiest way (but not most efficient) is to recursively go through the tree and check (like Charlie mentioned) the Expanded property of each node. For each node you find where this property is true add the FullPath of the node to an ArrayList. After youve updated the tree, again search recursively through the tree and expand each node where its FullPath is contained in the ArrayList.
Same goes for the selected item. Remember the FullPath value of the currently selected item and reset it after your update.
|
|
|
|
|
I have a list box control on a win form. Whenever another control on the same form (eg another list box) chnages selection my first list box maintains it's selected item but moves it's scroll position so that the selected item appears at the bottom of the visible list. Does anyone know how I can stop this from happening?
|
|
|
|
|
if I have two form, form1 has a progress bar and form2 has a method Cal(). I want to call method Cal() for activate progress bar in form1. Please show me a simple code i'm a newbie in C#. Thank you
|
|
|
|
|
where can i get GPRS emulator for mobile devices???? sum1 plz help me ???
|
|
|
|
|