Click here to Skip to main content
14,736,049 members
Home » Discussions » C#
   

C#

 
AnswerRe: Get method name as string Pin
DaveyM6930-Jul-08 2:09
professionalDaveyM6930-Jul-08 2:09 
GeneralRe: Get method name as string Pin
leppie30-Jul-08 3:27
Memberleppie30-Jul-08 3:27 
QuestionControl.Invoke() equivalent with Thread object Pin
ccufi30-Jul-08 0:36
Memberccufi30-Jul-08 0:36 
AnswerRe: Control.Invoke() equivalent with Thread object Pin
Frank Horn30-Jul-08 1:36
MemberFrank Horn30-Jul-08 1:36 
AnswerRe: Control.Invoke() equivalent with Thread object Pin
Alan N30-Jul-08 5:55
MemberAlan N30-Jul-08 5:55 
QuestionHow to run application from network folder Pin
AndrusM30-Jul-08 0:12
MemberAndrusM30-Jul-08 0:12 
AnswerRe: How to run application from network folder Pin
Simon P Stevens30-Jul-08 0:47
MemberSimon P Stevens30-Jul-08 0:47 
GeneralRe: How to run application from network folder Pin
AndrusM30-Jul-08 1:25
MemberAndrusM30-Jul-08 1:25 
If you want your app to automatically just work from a network share you need to design it so it doesn't require full trust

I need that in MDI child form Escape key closes form, Ctrl+F1 cycles and
Ctrl+F10 toggles maximizing. For this I use code below in form base class which requires full trust.
How to implement those features without full trust ?

Andrus.

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            switch (keyData)
            {
                case Keys.Escape:
                    if (this != FormManager.MainForm)
                    {
                        Close();
                        return true;
                    }
                    break;

                case Keys.Control | Keys.F1:
                    for (int i = 0; i < FormManager.MainForm.MdiChildren.Length; i++)
                    {
                        if (FormManager.MainForm.MdiChildren[i] == this)
                        {

                            if (i < FormManager.MainForm.MdiChildren.Length - 1)
                                FormManager.MainForm.MdiChildren[i + 1].Focus();
                            else
                                FormManager.MainForm.MdiChildren[0].Focus();

                            return true;
                        }
                    }
                    return true;

                case Keys.Control | Keys.F10:
                    if (WindowState == FormWindowState.Maximized)
                        WindowState = FormWindowState.Normal;
                    else
                        WindowState = FormWindowState.Maximized;
                    return true;

            }
            return base.ProcessCmdKey(ref msg, keyData);
        }
    }


Andrus

GeneralRe: How to run application from network folder Pin
Simon P Stevens30-Jul-08 2:16
MemberSimon P Stevens30-Jul-08 2:16 
GeneralRe: How to run application from network folder Pin
AndrusM30-Jul-08 2:22
MemberAndrusM30-Jul-08 2:22 
GeneralRe: How to run application from network folder Pin
Simon P Stevens30-Jul-08 2:34
MemberSimon P Stevens30-Jul-08 2:34 
GeneralRe: How to run application from network folder Pin
AndrusM30-Jul-08 8:25
MemberAndrusM30-Jul-08 8:25 
GeneralRe: How to run application from network folder Pin
Simon P Stevens30-Jul-08 22:30
MemberSimon P Stevens30-Jul-08 22:30 
GeneralRe: How to run application from network folder Pin
AndrusM30-Jul-08 23:38
MemberAndrusM30-Jul-08 23:38 
GeneralRe: How to run application from network folder Pin
AndrusM30-Jul-08 2:35
MemberAndrusM30-Jul-08 2:35 
GeneralRe: How to run application from network folder Pin
Simon P Stevens30-Jul-08 2:41
MemberSimon P Stevens30-Jul-08 2:41 
GeneralRe: How to run application from network folder Pin
AndrusM30-Jul-08 8:27
MemberAndrusM30-Jul-08 8:27 
GeneralRe: How to run application from network folder Pin
mav.northwind30-Jul-08 20:03
Membermav.northwind30-Jul-08 20:03 
GeneralRe: How to run application from network folder Pin
AndrusM31-Jul-08 0:02
MemberAndrusM31-Jul-08 0:02 
GeneralRe: How to run application from network folder Pin
mav.northwind31-Jul-08 9:36
Membermav.northwind31-Jul-08 9:36 
GeneralRe: How to run application from network folder Pin
AndrusM31-Jul-08 10:13
MemberAndrusM31-Jul-08 10:13 
GeneralRe: How to run application from network folder Pin
mav.northwind31-Jul-08 19:22
Membermav.northwind31-Jul-08 19:22 
GeneralRe: How to run application from network folder Pin
AndrusM1-Aug-08 0:16
MemberAndrusM1-Aug-08 0:16 
QuestionAuto Updater under Vista Pin
Markus Mayer30-Jul-08 0:02
MemberMarkus Mayer30-Jul-08 0:02 
AnswerRe: Auto Updater under Vista Pin
mav.northwind30-Jul-08 20:09
Membermav.northwind30-Jul-08 20:09 

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.