|
Hi,
I'm writing an application supporting MDI. In http://www.codeproject.com/useritems/System_File_Association.asp is described how to associate the documents with my program.
I'm still looking for a method to load additional documents into the application via double-clicking the respective file. With MFC this was done using DDE, but DDE doesn't seem to be supported well in .net.
What is the standard way to achieve this in .net?
TIA,
Matthias
|
|
|
|
|
The closest thing to a ShellExecute is this code:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "yourfile";
p.StartInfo.UseShellExecute = trure;
p.Start();
p.Close();
Hope that helps.
Ben
|
|
|
|
|
See here[^] for an example.
Note that you can always use the WM_COPYDATA message to pass an arbitrary block of data between processes, so the use of the registry is not necessary.
|
|
|
|
|
Hi All,
How I can customize the WinPE to support the Internet Explorer?
Please help me regarding this.
Currently I customized the WinPE with and I am able to launch the firefox on winpe and i can browse the web.
Thanks,
Vamsee.
|
|
|
|
|
Hi all,
Please tell me how to work with ToggleButton
I need to use two buttons- if i select one the other should be desibled,vice versa.
Hope u got my question.-Just a sample Toggle Button.
Please help me.
pashi
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
I don't see any logic here. You want to have 2 buttons. If you select one button which disables the other one, how do you want to enable it back? And how can it be ToggleButton? You can not click disabled buttons so how does it have to work as ToggleButton?
You would have to enable the other one back (by clicking some other third button, or the same first button again) before clicking it and disabling the first one.
Have you tried using check boxes or radio buttons?
You can also use one button as some kind of ToggleButton by
checking some conditions in the click button method
|
|
|
|
|
Newbie00 wrote: I don't see any logic here. You want to have 2 buttons. If you select one button which disables the other one, how do you want to enable it back? And how can it be ToggleButton? You can not click disabled buttons so how does it have to work as ToggleButton?
You would have to enable the other one back (by clicking some other third button, or the same first button again) before clicking it and disabling the first one.
Have you tried using check boxes or radio buttons?
You can also use one button as some kind of ToggleButton by
checking some conditions in the click button method
I guess you can follow the conventional toggling method with a single button and a related flag variable. click it, flag becomes 1, click it again, flag becomes 0, and act accordingly. Change
some text and appearance for the two states. That's as simple as it can get. Oh, you have to
take care of the initial state also. You know, the default value thing. :->
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
Exactly, that's what I meaned writing about one button which could be ToggleButton. The idea with 2 buttons working as ToggleButton wasn't very good.
|
|
|
|
|
Hi everybody,
I'm working on an Excel application with VSTO but I'm rather used to work with ASP.NET. So I would like to know if in Winforms there is an equivalent to the "application_error" function from the global.asax file (in web application) or if I have to realize one by myself ?
Of course the aim is to have an error manager that would catch all thrown exceptions.
Thanks
|
|
|
|
|
Howdy! I came across this new forum and realized that I still have a problem with a Windows Forms project I am toying with. I am creating a quicken like program. The main window creates a MDI child for each account (checking, credit card, and broker). I cannot figure out how to handle the close button. I want the form to just hide itself and remain in the main menu item that I dedicated to keeping the names of the children, so that the user can reselect and open the form again. However, this doesn't work:
private void CheckingAccountForm_FormClosing(object sender, FormClosingEventArgs e)<br />
{<br />
if (e.CloseReason == CloseReason.UserClosing)<br />
{<br />
this.Visible = false;<br />
}<br />
e.Cancel = true;<br />
}
The window is removed from the menu, and I currently have no way to bring it back.
Ideally I would like to remove the close button from the header of the form but leave the other two. I can't see any way to get rid of that button without losing the others.
I may just get rid of the header and add two custom buttons for the other two functions (minimize and full/screen toggle).
Any ideas?
Another pesky problem is that if I click the close button on the main form, it closes the children but stays open, and I gotta click the close buttong again.
Thx.
|
|
|
|
|
I don't know why You are defining The FormClosing method..
If You are using VC++ 2005 and you've placed a button on the form, that you want to close, all you have to do is setting up the Behavior property named DialogResult (you can choose the proper result's value from the checkbox placed on the right of the DialogResult property)..
If user clicks the button, the form closes. The user can open it from main/parent form's menu again.
In order to handle button's click you have to define
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {} method, which you can choose with the button double clicking (in the design form) or with choosing it from the button's events. In abovementioned method's body you can also write code, like this : this->Close(); which will cause closing the form too (the form wich is the owner of the button).
|
|
|
|
|
Thanks anyway, but that isn't it. I am talking about the red X button that you get in the right corner of any form you create where you do not set the ControlBox property to false.
|
|
|
|
|
Hello!
How can I be notified in Windows Forms,
when a hotkey (which I registered with
RegisterHotKey) is pressed. Is there an
event for this?
Alex
|
|
|
|
|
Nope. You have to override your forms WndProc method and look for the message yourself.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
I'm assuming C#, VB, C++ and other languages are suitable for any questions related to WinForms?
Marc
Thyme In The CountryInteracxPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
Marc Clifton wrote: C#, VB, C++
Already forums for them as there is for database. Could it be this forum is for design issues surrounding WinForms?
Could end up with overlapping issues.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Richard A. Abbott wrote: Could it be this forum is for design issues surrounding WinForms?
It's going to be hard to ask questions that don't go into code/language related topics as well, so I think we will see a mixture of languages. This, I believe, is what Marc was asking about.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Marc Clifton wrote: I'm assuming C#, VB, C++ and other languages are suitable for any questions related to WinForms?
Of course. I would like to see questions regarding the language on the language forums, questions regarding a .NET type or the CLR in the .NET forum and so on.
█▒▒▒▒▒██▒█▒██
█▒█████▒▒▒▒▒█
█▒██████▒█▒██
█▒█████▒▒▒▒▒█
█▒▒▒▒▒██▒█▒██
|
|
|
|
|
Inevitably. I suspect that most windows forms questions will still end up in the VB/C# forums, as most people don't know what they are asking ( just like 80% of posts in the C++/CLI forum are off topic ).
I guess that means by the time a question gets here, it's bound to be an interesting one
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Shouldn't the phrase be "language indifferent"? "language agnostic" would mean that the forum doesn't know whether programming languages exist.
|
|
|
|
|
I suspect it means that it doesn't care one way or the other.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Michael Dunn wrote: Shouldn't the phrase be "language indifferent"? "language agnostic" would mean that the forum doesn't know whether programming languages exist.
One of the definitions of agnostic is:
"uncertain of all claims to knowledge"
and you'll see the term used in computereze fairly frequently, for example:
"but thanks to the Mono project it's virtually platform-agnostic."
or:
"Yes, the person who started the Rails project is a MySQL fan... but Rails is database agnostic. "
(both quotes taken from the web)
Marc
Thyme In The CountryInteracxPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
Gosh! CP must be expanding this evening.
|
|
|
|
|
I'm off for a week next week so figured I should make lots of changes in the few hours before I leave
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|