|
I am trying to get the ClassName of the Opera browser and then read the url from the address bar but I can't seem to get the name of the address bar. What is it? I am using Spy++ and no luck. Other browsers' address bars are typically called "Edit" but not in Opera.
[code]
Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
[/code]
|
|
|
|
|
|
Hi there,
I am havin an enormous amount of c++ comments
/**
blabla
**/
to be translated into xml tags
///<summary>
/// blabla
///</summary>
is there a way to automate this in vs .net 2003
thaks,
stonee
|
|
|
|
|
stonee74 wrote:
is there a way to automate this in vs .net 2003
Macros.
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
You could do it with macros, but I don't think I would. I'd be more likely to write a C# program that opened the file and used regex to do the replacements. I'd use a regex something like:
Regex regex = new Regex(@"
/\*\* # start of comment
\s+
(?<comment> # capture to named Comment
.+?\s+ # comment text
) # end of capture
\s+
\*\*/ # end of comment.",
RegexOptions.Singleline |
RegexOptions.IgnorePatternWhitespace);
and then use a MatchEvaluator function like:
static public string Evaluator(Match match) {
string[] lines = match.Groups["Comment"].Value.Split('\n');
for (int i = 0; i < lines.Count; i++)
lines[i] = "///" + lines[i];
return String.Join("\n", lines);
}
|
|
|
|
|
If you put a WebBrowser control in a Form, and then put that Form inside another Form (set it's Parent to the other form and set TopLevel to false, which is perfectly legal according to the docs), then when you quit your application (close the outer Form), it will stay resident in memory and eat up 100% of CPU time. (You can see it doing this in the Task Manager). This is probably caused by that OLEinPlace stuff somehow but I don't know OLE so that's totally a guess.
This is a HUGE problem for me. MASSIVE!!
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
Hello all,
Here's my problem. I have a Windows Form with some controls on it. When the user clicks a button, I want a second form to appear, and the first one to be hidden. I've drawn up both forms, so how can I make Form1 display Form2?
Thanks!
|
|
|
|
|
Form2 frm=new Form2();
frm.Show();
this.Hide();
Anonymous?
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Thanks. Sorry for posting Anon. I forgot my password and I'm on a coding spree, so don't want to hunt it down.
|
|
|
|
|
Ok.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I have one other detail I hope you won't mind answering. When the second form is closed via the close button (next to the minimize and maximize buttons in the upper right) the second form is disposed. However, Form1 remains, albeit hidden. So the program doesn't terminate.
I've tried calling Form1.Dispose() after Form2 is shown but that just quits the program. Any thoughts on how I can make the program quit when the user clicks the X?
|
|
|
|
|
You'll want to do this.Close(), not this.Hide. But that will release the ref to Form2, which may make it close, too. How about
Application.Run(new Form2());
this.Close();
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I get this error:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.windows.forms.dll
Additional information: It is invalid to start a second message loop on a single thread. Use Application.RunDialog or Form.ShowDialog instead.
Trying Application.RunDialog gives me this error:
C:\Documents and Settings\...\Form1.cs(402): 'System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form)' is inaccessible due to its protection level
Not sure exactly what that means, but any other thoughts? (Oh, and this.Close() on Form1 does quit the app.)
|
|
|
|
|
I went into the Closed event for Form2 and just put in this line, which works:
Application.Exit();
Still, I'd like to know if there's a way to do it without having to add that.
PS: Since I'm posting so much, I thought I should hunt down my p/w and login!
|
|
|
|
|
That's the way I was going to suggest doing it.
frogb0x wrote:
Since I'm posting so much, I thought I should hunt down my p/w and login!
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
So it seems that's the only way to do it, eh? Cool. Thanks for all your help!
|
|
|
|
|
God, I'm hoping some of you can help me here. I need DIRECTION.
I want to create a .NET application. I want to use C# language since it seems good for rapid application development.
I want to create the user interface (GUI) using the Visual Studio IDE form design.
Tell me if the following is possible:
I want to use DirectShow AND the Microsoft Speech .NET SDK in the SAME application. How can I do this? All the DirectShow examples are written in C++. All the .NET speech examples are written in C#.
Can I write the bulk of my application in C# and use C++ only for the DirectShow portion of it? Is this possible too?
Also, I'd like to "skin" my application, or in the very least give it some "personality" with rounded buttons and some custom controls that I create myself. Can I still use the Win32 API and "layered" windows to skin a GUI created with the "forms" wizard in Visual Studio? Is there any other way of creating that "custom" look?
I'm new to this stuff and I'm really confused. What's worse, is that I read all kinds of stuff about "managed code" and how DirectShow does not use managed code... DirectShow is built upon COM objects.... .NET allows one to mix managed and unmanaged code in the same application.... blah blah blah.... HELP!!!
All I want is some direction and advice on what to do 1st, 2nd, 3rd... I just don't know where to start... I don't want to read a 400 page book on ATL and COM if I'll be using C# which hides the COM internals... you know what I mean? HELP!!!
|
|
|
|
|
|
Hello, I am new to C# and ASP.NET, I have previously used ASP.
Inside my C# codebehind file, I open a database and get out
information. Now depending on that information I would either go to
the start page or show a text box and button for more information.
How do I move to another page without the action="page.aspx"
attribute? How do I pass information from C# like the user name to
C++ inwhich is using a HtmlView?
|
|
|
|
|
pdunn wrote:
How do I move to another page without the action="page.aspx"
If you want to do it in code behind you have to use this:
Response.Redirect("yourpage.aspx");
Mazy
No sig. available now.
|
|
|
|
|
Is there any way to automatically upgrade IE to a appropriate version (>5.01) before installing .Net Framework if needed ?
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
I thought the framework installer took care of that.
|
|
|
|
|
Unfortunately you are wrong!
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
Hi,
I am doing a proxy-based ad blocker with C# as my degree project.
I am using mainly the HttpWebRequest & HttpWebResponse classes to perform HTTP redirection.
i wonder why i am getting ReceiveFailure errors quite often nowadays whenever i execute the GetResponse() method of HttpWebRequest, when dealing with images. consequently, the page is displayed with some missing images...
.. but when i test loading the page with a direct connection, everything is fine, and the page looks perfect.
previously, i was testing the same code with a dialup connection, and this problem rarely happens. but now, with my adsl connection, i am beginning to face this weird prob. i dun think adsl is the cause, nor dialup will fix the prob.
can anyone give me an idea on wut's happening, and how to solve this prob.
thanks.
|
|
|
|
|
I have written a fairly complex service that pulls data from a database, merges this into Word documents and then emails the result to specified addresses
The problem I have is that the COM code I am using to handle the connectivity between the C# service and word is a little 'shakey' so when my application throws an exception I want the service to shut itself down.
The only code/tutorial I have come across is located here :
http://support.microsoft.com/default.aspx?scid=KB;en-us;q245230[^]
But as I am by no means a C++ expert this may aswell be written in Chinese.
Does anybody have any ideas on how I can get this service to shut itself down?
|
|
|
|