Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
GeneralRe: Using a txtbox as output window Pin
Heath Stewart6-Jan-04 17:21
protectorHeath Stewart6-Jan-04 17:21 
GeneralRe: Using a txtbox as output window Pin
leppie6-Jan-04 13:58
leppie6-Jan-04 13:58 
GeneralRe: Using a txtbox as output window Pin
Luther Baker6-Jan-04 18:33
Luther Baker6-Jan-04 18:33 
Generalusing a C++ dialog window from C# Pin
misterbear6-Jan-04 10:14
misterbear6-Jan-04 10:14 
GeneralRe: using a C++ dialog window from C# Pin
Mazdak6-Jan-04 10:44
Mazdak6-Jan-04 10:44 
GeneralRe: using a C++ dialog window from C# Pin
Heath Stewart6-Jan-04 17:19
protectorHeath Stewart6-Jan-04 17:19 
GeneralRe: using a C++ dialog window from C# Pin
misterbear7-Jan-04 0:29
misterbear7-Jan-04 0:29 
GeneralRe: using a C++ dialog window from C# Pin
Heath Stewart7-Jan-04 3:00
protectorHeath Stewart7-Jan-04 3:00 
Doing this as a COM component will allow you to use COM interop in your application, which is pretty easy to do. But if you don't know much about Windows programming, COM is even more difficult to learn so I wouldn't recommend it. Besides, deploying the solution requires that not only do you copy the COM DLL to a target directory but that you also register it (both not hard, but it's still a two-step process).

If you just make use of the GetOpenFileName and GetSaveFileName functions, along with the OPENFILENAME struct and a Win32 dialog template resource (all of which you'd have to do for the COM component anyway), you can encapsulate this function just like the default Windows Forms components that you want to replace. As I said before, use a good decompiler to see how they do it. Most of the controls in Windows Forms are just wrappers for native functions and controls, after all. I would recommend this approach. To deploy, just copy the DLL into your application's installation directory or somewhere in the PATH environment variable (like the Windows or Windows\System32 directory). I would recommend the application installation directory with the rest of your managed application though, since it would keep your files together and wouldn't clutter the system with DLLs that other applications might not use.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralAutoresizing two panels with one splitter Pin
RB@Emphasys6-Jan-04 9:49
RB@Emphasys6-Jan-04 9:49 
GeneralRe: Autoresizing two panels with one splitter Pin
Heath Stewart6-Jan-04 17:17
protectorHeath Stewart6-Jan-04 17:17 
GeneralRe: Autoresizing two panels with one splitter Pin
Luther Baker6-Jan-04 18:47
Luther Baker6-Jan-04 18:47 
GeneralRe: Autoresizing two panels with one splitter Pin
Heath Stewart6-Jan-04 18:55
protectorHeath Stewart6-Jan-04 18:55 
GeneralRe: Autoresizing two panels with one splitter Pin
RB@Emphasys7-Jan-04 3:57
RB@Emphasys7-Jan-04 3:57 
GeneralCompare files Pin
Gary Kirkham6-Jan-04 9:13
Gary Kirkham6-Jan-04 9:13 
GeneralRe: Compare files Pin
Mazdak6-Jan-04 9:22
Mazdak6-Jan-04 9:22 
GeneralRe: Compare files Pin
Kentamanos6-Jan-04 11:13
Kentamanos6-Jan-04 11:13 
GeneralListView and ProgressBar Pin
Guinness4Strength6-Jan-04 8:30
Guinness4Strength6-Jan-04 8:30 
GeneralRe: ListView and ProgressBar Pin
Heath Stewart6-Jan-04 17:15
protectorHeath Stewart6-Jan-04 17:15 
GeneralGetting info out of datagrid cell Pin
obelisk296-Jan-04 8:17
obelisk296-Jan-04 8:17 
GeneralRe: Getting info out of datagrid cell Pin
Mazdak6-Jan-04 9:19
Mazdak6-Jan-04 9:19 
GeneralFolderBrowserDialog Pin
Gary Kirkham6-Jan-04 7:15
Gary Kirkham6-Jan-04 7:15 
GeneralNever Mind Pin
Gary Kirkham6-Jan-04 8:12
Gary Kirkham6-Jan-04 8:12 
Generalcomparing strings Pin
Hayat6-Jan-04 6:45
Hayat6-Jan-04 6:45 
GeneralRe: comparing strings Pin
Colin Angus Mackay6-Jan-04 6:57
Colin Angus Mackay6-Jan-04 6:57 
GeneralRe: comparing strings Pin
Heath Stewart6-Jan-04 17:41
protectorHeath Stewart6-Jan-04 17:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.