|
I agree that the webbrowser controls are using the same set of cookies.
They are being tied to the application, which contains two browser controls.
I noticed that firefox's multitabbed browser displays the same traits (Shared cookies across tabs).
However...
If I launch IE point it at my test server, sign in (cookies are created). Then launch another seperate IE window point it at my test server this second window does not share the same cookies and behaves like a seperated browser(application) a unique instance. and I can log in with the different userid, and all is fine. (firefox does'nt behave the same multiple windows still share cookies)
I'm trying to achieve this behavior, of completely seperate browser instances within the same tabbed application. (I'm using IE version 6 by the way)
I guess i'm trying to achieve the impossible?
Thanks for the input Scott.
Beefy
(The hardest thing is explaining myself)
I guess I'm trying to achieve the impossible.
|
|
|
|
|
You might want to do the same test using IE 7 and see how it behaves.
You could possibly achieve this by loading different .NET AppDomains for each browser control, but that may not be worth the additional hassle of doing so.
|
|
|
|
|
Hi all,
I have written a small application that takes a snapshot of a webcam stream every so many seconds, and then saves as either a jpeg or bitmap.
Is there a straight forward way to convert these into a video file, such as an avi or mpeg?
Thanks,
Ben.
-- modified at 18:48 Thursday 20th September, 2007
PHP and C# Developer for Magezine Publishing Ltd
|
|
|
|
|
I think there's an article on this site on creating a video from stills, using DirectX
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm using CVS with a very large WinForms project (written in C#).
A little over a month ago, the code split into 2 lines (6.0 and 5.1). Over the past month, I've been making changes in over 100 files for various enhancements and bug fixes in 5.1, while other developers have been pushing unrelated changes into 6.0.
Now I need to push all my changes into the 6.0 line without overwriting the changes of other developers. There's probably only 2 or 3 files with unresolvable differences, and I'd hate to have to manually analyze over 100 diff's when the vast majority of the difference between files is that I made a change in a file that no one else made a change to, and most of the files that we both made changes to can be merged without trouble.
If there was a way to make CVS believe that I checked out version 6.0 on 8/10/2007 (when it was born), and that now I'm pushing changes I've made since then into 6.0, and it should merge these changes with everyone else's, I would be in great shape.
However, although I can check out 6.0 from 8/10/2007 and overlay my changes, it won't merge them back in, as it says the files have a "sticky date" on them. Can I remove the sticky date in such a way that it will still try to merge with other developers' changes rather than overwrite them?
|
|
|
|
|
Not sure but it sounds like a headache...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Now, I know how to send a filename to my application through the context menu with the registry.
AppName "%1"
But I want to send multiple filenames to my application.
Does anyone have any examples or hints as to what direction I should be looking do do this?
Thanks
|
|
|
|
|
I got this link from Marc Clifton's website. Looks interesting. Anyone have any experience with it? Would you recommend it?
TIA
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
The people in the lounge said I should google for the answer to a programming question but I do not know what search engine to use
|
|
|
|
|
I know people who've used it and like it. To be honest - I prefer to use the ones that I've rolled over the years, but they do seem to be solid enough.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks Pete
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
The people in the lounge said I should google for the answer to a programming question but I do not know what search engine to use
|
|
|
|
|
No problem. I'm glad to help.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I get the following error when running my code:
"A local variable named 'textOut' cannot be declared in this scope because it would give a different meaning to 'textOut', which is already used in a 'child' scope to denote something else"
namespace file_i_o<br />
{<br />
public partial class Form1 : Form<br />
{<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
string path = @"c:\testc.txt";<br />
try<br />
{<br />
<br />
StreamWriter textOut = new StreamWriter(new FileStream(path, FileMode.Create, FileAccess.Write));<br />
<br />
}<br />
<br />
catch(IOException ioe)<br />
{<br />
MessageBox.Show(ioe.Message);<br />
}<br />
StreamWriter textOut = new StreamWriter(new FileStream(path, FileMode.Create, FileAccess.Write));<br />
textOut.Write("test");
textOut.Close();<br />
}<br />
}<br />
}
If I put the "textOut.Write("test");" code in my try statement all is fine.
I think this sucks; I found that I cannot reuse textOut anywhere else in my code, this just does not seem right!
Please help and enlighten me.
Many Thanks,
Stuntman
-- modified at 18:06 Thursday 20th September, 2007
|
|
|
|
|
You are declaring textOut twice in the same method.
In your 'catch' block don't use StreamWriter in front of textOut.
God Bless,
Jason
I am not perfect but I try to be better than those before me.
So those who come after me will be better than I am.
|
|
|
|
|
It's not in the catch block. Take a look at my response to see the code in a formatted block. Even if it was in the catch block, it still wouldn't work because then textOut would be undefined in the catch block. In either case, the variable should be declared outside of the try .
|
|
|
|
|
Scott Dorman wrote: It's not in the catch block.
I guess my eyes got confused.
Scott Dorman wrote: it still wouldn't work because then textOut would be undefined in the catch block
You right I wasn't paying much attention.
God Bless,
Jason
I am not perfect but I try to be better than those before me.
So those who come after me will be better than I am.
|
|
|
|
|
No worries. Whenever I see a post like that, at a minimum I will respond saying they should wrap the code in <pre> tags. Sometimes, as I did with this one, I'll reformat it for them (and anyone else that responds) and provide an answer.
|
|
|
|
|
First, please wrap large code blocks in <pre> tags, not <code> in order to preserve the formatting.
namespace file_i_o
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string path = @"c:\testc.txt";
try
{
StreamWriter textOut = new StreamWriter(new FileStream(path, FileMode.Create, FileAccess.Write));
}
catch (IOException ioe)
{
MessageBox.Show(ioe.Message);
}
StreamWriter textOut = new StreamWriter(new FileStream(path, FileMode.Create, FileAccess.Write));
textOut.Write("test");
textOut.Close();
}
}
} The issue you are running into is due to the scoping rules of the language. If you want to do this, you need to declare the variable outside of the try block (StreamWriter textOut; or StreamWriter textOut = null; ) and then simply "new" the variable in both places. Your code would end up looking like this:
namespace file_i_o
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string path = @"c:\testc.txt";
StreamWriter textOut = null;
try
{
textOut = new StreamWriter(new FileStream(path, FileMode.Create, FileAccess.Write));
}
catch (IOException ioe)
{
MessageBox.Show(ioe.Message);
}
textOut = new StreamWriter(new FileStream(path, FileMode.Create, FileAccess.Write));
textOut.Write("test");
textOut.Close();
}
}
}
|
|
|
|
|
I have to point out the obvious here. This code is really bad practice. In the try block, he initializes the textOut variable and if he gets an IOException he shows the message. Then, he initialises the try textOut variable in exactly the same way - if it didn't work once, is it really going to work again.
Finally, the textOut.Close() should really be in a finally block.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Absolutely! I missed those issues completely. The second calls to textOut probably either shouldn't be there or should be moved into the try block (with the redudant initialization removed).
|
|
|
|
|
Thanks guys,
I sincerely appreciate the criticism and analysis. Problem solved.
thanks again,
stuntman
|
|
|
|
|
In the GridView_RowUpdating method, e.RowIndex returns null.
GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e).
I put a datatable and stored the grid and now e.RowIndex returns correct value
Could not understand the theory. Am trying to find it.
Still, can somebody help me out if you already know?
Thanks
|
|
|
|
|
I have been trying to come up with a way to track the CPU% usage of applications that I have running on different machines in different locations. In some instances there are multiple copies of the application running on the same machine. I was hoping to use the performancecounter to get the cpu% for these applications. However, I cannot get accurate results from machines running multiple copies of the application because the instance or names of the processes are the same. For instance, if I have four copies of an application running on one machine, my results may look like:
appName 100%
appName 100%
appName 100%
appName 100%
When in reality it should be:
appName 1%
appName 2%
appName 100%
appName 4%
Here is the code that I was using. Does anyone have any suggestions?
<br />
public string CPUUsage(string workingDirectory)<br />
{<br />
string procName = ConfigurationManager.AppSettings["MonitorEXE_Name"];<br />
<br />
string cpuUsage = "0.00%";<br />
<br />
Process[] processes = Process.GetProcessesByName(procName);<br />
<br />
if (processes.Length > 0)<br />
{<br />
string thisProcessWorkingDirectory = workingDirectory + "\\" + procName + ".exe";<br />
foreach (Process process in processes)<br />
{<br />
if (process.Modules[0].FileName.ToUpper() == thisProcessWorkingDirectory.ToUpper())<br />
{<br />
Process processToMonitor = Process.GetProcessById(process.Id);<br />
<br />
using (PerformanceCounter pcProcess = new PerformanceCounter("Process", "% Processor Time", processToMonitor.ProcessName))<br />
{<br />
<br />
pcProcess.NextValue();<br />
System.Threading.Thread.Sleep(1000);<br />
cpuUsage = pcProcess.NextValue().ToString("f2") + "%";<br />
<br />
} <br />
}<br />
} <br />
}<br />
return cpuUsage;<br />
}
|
|
|
|
|
|
I'm populating a treeview with the following:
1 Main Parent Node
5000 Child Nodes
1 Sub Node for each Child Node
The function I'm using returns a TreeNode (the main parent node with all children etc) in less than 0.1 secs which is quite acceptable. Adding this node to the treeview takes around 2.4 seconds during which time the UI is locked.
Is there any way of speeding this up?
Dave
-- modified at 13:56 Friday 21st September, 2007
|
|
|
|
|
The only thing you can do is call BeginUpdate on the TreeView to stop it from redrawing itself on every change to the control. Then you add your nodes to it, then call EndUpdate to resume painting the control.
|
|
|
|