Click here to Skip to main content
15,887,958 members
Home / Discussions / C#
   

C#

 
Questionhow to wrap some dll functions from VC6 Pin
yyf24-Mar-04 5:37
yyf24-Mar-04 5:37 
AnswerRe: how to wrap some dll functions from VC6 Pin
Heath Stewart24-Mar-04 9:08
protectorHeath Stewart24-Mar-04 9:08 
GeneralRe: how to wrap some dll functions from VC6 Pin
yyf24-Mar-04 10:23
yyf24-Mar-04 10:23 
GeneralRe: how to wrap some dll functions from VC6 Pin
Heath Stewart24-Mar-04 11:19
protectorHeath Stewart24-Mar-04 11:19 
GeneralProperty Sheet Pin
DrGreen24-Mar-04 4:41
DrGreen24-Mar-04 4:41 
GeneralRe: Property Sheet Pin
Heath Stewart24-Mar-04 4:50
protectorHeath Stewart24-Mar-04 4:50 
GeneralRe: Property Sheet Pin
DrGreen24-Mar-04 5:08
DrGreen24-Mar-04 5:08 
GeneralRe: Property Sheet Pin
Heath Stewart24-Mar-04 5:13
protectorHeath Stewart24-Mar-04 5:13 
That's not really what you asked for, though.

If you want a good implementation, see the IPropertySheet documentation in the Platform SDK on http://msdn.microsoft.com[^]. For example, I use a implementation similar to the following in our application:
public interface IPropertyPage
{
  string Title { get; }
  void Save();
  void Cancel();
  event PropertyChangedEventHandler PropertyChanged;
}
Implement this type of interface on your control. Then create a PropertySheet class that allows you to add IPropertyPage implementations to it. When you call ShowDialog on your PropertySheet (should derive from Form) it has all the pages in a TabControl. When the event is fired, enable the Apply button. When Apply or Save is clicked, call Save on each IPropertyPage in your collection and close the dialog if Save was clicked (it annoys me to no end when people click Apply then OK since OK is supposed to apply changes and close and - with all Microsoft implementations - does).

This is very similar to how MFC and the Windows Shell interfaces do it.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Property Sheet Pin
DrGreen24-Mar-04 5:27
DrGreen24-Mar-04 5:27 
GeneralTreeview context menu remains visible Pin
CStiefeling24-Mar-04 4:26
CStiefeling24-Mar-04 4:26 
GeneralRe: Treeview context menu remains visible Pin
CStiefeling24-Mar-04 4:35
CStiefeling24-Mar-04 4:35 
GeneralRegistry Entry Pin
Guinness4Strength24-Mar-04 3:12
Guinness4Strength24-Mar-04 3:12 
GeneralRe: Registry Entry Pin
Guinness4Strength24-Mar-04 3:28
Guinness4Strength24-Mar-04 3:28 
GeneralRe: Registry Entry Pin
surgeproof24-Mar-04 6:17
surgeproof24-Mar-04 6:17 
GeneralRe: Registry Entry Pin
Jeremy Kimball24-Mar-04 9:30
Jeremy Kimball24-Mar-04 9:30 
GeneralRe: Registry Entry Pin
Guinness4Strength24-Mar-04 9:32
Guinness4Strength24-Mar-04 9:32 
Generalimage on scroll bar Pin
flmosh24-Mar-04 1:07
flmosh24-Mar-04 1:07 
GeneralRe: image on scroll bar Pin
Heath Stewart24-Mar-04 3:01
protectorHeath Stewart24-Mar-04 3:01 
GeneralCustom explorer toolbar Pin
websight23-Mar-04 22:54
websight23-Mar-04 22:54 
GeneralRe: Custom explorer toolbar Pin
Michael Flanakin24-Mar-04 1:48
Michael Flanakin24-Mar-04 1:48 
Generalfrom VB to C# Pin
andrej6123-Mar-04 22:44
andrej6123-Mar-04 22:44 
GeneralRe: from VB to C# Pin
Michael Flanakin24-Mar-04 2:08
Michael Flanakin24-Mar-04 2:08 
GeneralRe: from VB to C# Pin
Judah Gabriel Himango24-Mar-04 3:48
sponsorJudah Gabriel Himango24-Mar-04 3:48 
GeneralRe: from VB to C# Pin
Michael Flanakin24-Mar-04 3:51
Michael Flanakin24-Mar-04 3:51 
GeneralRe: from VB to C# Pin
Heath Stewart24-Mar-04 3:58
protectorHeath Stewart24-Mar-04 3:58 

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.