Click here to Skip to main content
15,905,913 members
Home / Discussions / C#
   

C#

 
AnswerRe: Select next control if control is in groupbox? Pin
BillWoodruff3-Sep-12 15:38
professionalBillWoodruff3-Sep-12 15:38 
QuestionExperimentation - Would Like Feedback Pin
Matt U.31-Aug-12 9:59
Matt U.31-Aug-12 9:59 
AnswerRe: Experimentation - Would Like Feedback Pin
SledgeHammer0131-Aug-12 10:52
SledgeHammer0131-Aug-12 10:52 
AnswerRe: Experimentation - Would Like Feedback Pin
ekolis31-Aug-12 11:26
ekolis31-Aug-12 11:26 
AnswerRe: Experimentation - Would Like Feedback Pin
Ravi Bhavnani31-Aug-12 12:36
professionalRavi Bhavnani31-Aug-12 12:36 
AnswerRe: Experimentation - Would Like Feedback Pin
OriginalGriff1-Sep-12 1:53
mveOriginalGriff1-Sep-12 1:53 
GeneralRe: Experimentation - Would Like Feedback Pin
Matt U.6-Sep-12 7:29
Matt U.6-Sep-12 7:29 
GeneralRe: Experimentation - Would Like Feedback Pin
OriginalGriff6-Sep-12 7:58
mveOriginalGriff6-Sep-12 7:58 
Questionpassing data between forms Pin
mamoony31-Aug-12 8:53
mamoony31-Aug-12 8:53 
AnswerRe: passing data between forms Pin
Richard Andrew x6431-Aug-12 9:18
professionalRichard Andrew x6431-Aug-12 9:18 
AnswerRe: passing data between forms Pin
OriginalGriff31-Aug-12 9:21
mveOriginalGriff31-Aug-12 9:21 
GeneralRe: passing data between forms Pin
mamoony31-Aug-12 10:08
mamoony31-Aug-12 10:08 
GeneralRe: passing data between forms Pin
OriginalGriff31-Aug-12 21:09
mveOriginalGriff31-Aug-12 21:09 
GeneralRe: passing data between forms Pin
BillWoodruff3-Sep-12 15:59
professionalBillWoodruff3-Sep-12 15:59 
GeneralRe: passing data between forms Pin
mamoony10-Sep-12 10:06
mamoony10-Sep-12 10:06 
QuestionDelete From XML File Pin
Kevin Marois31-Aug-12 8:47
professionalKevin Marois31-Aug-12 8:47 
AnswerRe: Delete From XML File Pin
PIEBALDconsult31-Aug-12 9:40
mvePIEBALDconsult31-Aug-12 9:40 
GeneralRe: Delete From XML File Pin
Kevin Marois31-Aug-12 9:52
professionalKevin Marois31-Aug-12 9:52 
GeneralRe: Delete From XML File Pin
PIEBALDconsult31-Aug-12 11:20
mvePIEBALDconsult31-Aug-12 11:20 
GeneralRe: Delete From XML File Pin
AmitGajjar31-Aug-12 23:27
professionalAmitGajjar31-Aug-12 23:27 
QuestionTo show the properties page of a file and navigate to a tab Pin
John T.Emmatty31-Aug-12 4:03
John T.Emmatty31-Aug-12 4:03 
AnswerRe: To show the properties page of a file and navigate to a tab Pin
Shameel31-Aug-12 4:56
professionalShameel31-Aug-12 4:56 
Use the ShellExecuteEx Win32 API to achieve this.
C#
using System.Runtime.InteropServices;

[DllImport("shell32.dll", CharSet = CharSet.Auto)]
static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo);

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
public struct SHELLEXECUTEINFO
{
    public int cbSize;
    public uint fMask;
    public IntPtr hwnd;
    [MarshalAs(UnmanagedType.LPTStr)]
    public string lpVerb;
    [MarshalAs(UnmanagedType.LPTStr)]
    public string lpFile;
    [MarshalAs(UnmanagedType.LPTStr)]
    public string lpParameters;
    [MarshalAs(UnmanagedType.LPTStr)]
    public string lpDirectory;
    public int nShow;
    public IntPtr hInstApp;
    public IntPtr lpIDList;
    [MarshalAs(UnmanagedType.LPTStr)]
    public string lpClass;
    public IntPtr hkeyClass;
    public uint dwHotKey;
    public IntPtr hIcon;
    public IntPtr hProcess;
}

private const int SW_SHOW = 5;
private const uint SEE_MASK_INVOKEIDLIST = 12;
public bool ShowFilePropertiesDialog(string fileName)
{
    SHELLEXECUTEINFO info = new SHELLEXECUTEINFO();
    info.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(info);
    info.lpFile = fileName;
    info.lpVerb = "properties";
    info.fMask = SEE_MASK_INVOKEIDLIST;
    info.nShow = SW_SHOW;
    return ShellExecuteEx(ref info);
}


And then use the method like this:

C#
ShowFilePropertiesDialog(@"C:\hello.txt");

GeneralRe: To show the properties page of a file and navigate to a tab Pin
John T.Emmatty31-Aug-12 5:08
John T.Emmatty31-Aug-12 5:08 
AnswerRe: To show the properties page of a file and navigate to a tab Pin
Shameel31-Aug-12 5:11
professionalShameel31-Aug-12 5:11 
Question.Net C# GUI dll will use in VB6 (Not user control) Pin
mamoony31-Aug-12 3:52
mamoony31-Aug-12 3:52 

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.