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

C#

 
GeneralRe: Remote desktop server or VNC server in my app Pin
Cosby20-Dec-09 22:31
Cosby20-Dec-09 22:31 
GeneralRe: Remote desktop server or VNC server in my app Pin
Pete O'Hanlon21-Dec-09 0:16
mvePete O'Hanlon21-Dec-09 0:16 
GeneralRe: Remote desktop server or VNC server in my app Pin
Cosby21-Dec-09 2:01
Cosby21-Dec-09 2:01 
GeneralRe: Remote desktop server or VNC server in my app Pin
Pete O'Hanlon21-Dec-09 2:14
mvePete O'Hanlon21-Dec-09 2:14 
GeneralRe: Remote desktop server or VNC server in my app Pin
Cosby21-Dec-09 3:03
Cosby21-Dec-09 3:03 
GeneralRe: Remote desktop server or VNC server in my app Pin
Sunil G 321-Dec-09 6:39
Sunil G 321-Dec-09 6:39 
GeneralRe: Remote desktop server or VNC server in my app Pin
Pete O'Hanlon21-Dec-09 7:26
mvePete O'Hanlon21-Dec-09 7:26 
QuestionUsing "openas" verb in Windows 7 does not work? Pin
pedersen-roxen20-Dec-09 20:46
pedersen-roxen20-Dec-09 20:46 
Hi,


I have created an application that is basically a file browser with some special functionality to work with my employers content management system. I have managed to customize the code to work with Windows 7, coming from XP. The main issue was related to UAC and the writing to various sections of the registry.

However one problem does remain: I have some code for opening the files in their predefined editors, these are of course also defined in the windows registry. This portion works fine on Win7. I have implemented a function where the user can choose to open a file with a custom editor, this is done using a contextmenu which invokes the following code:

internal void EditAs()
{
  // Try to start app
  try
  {
    ProcessStartInfo Info = new ProcessStartInfo(localFile);
    if (File.Exists(localFile))
    {
      int i = 0;
      foreach (String verb in Info.Verbs)
      {
        // Display the possible verbs.
        Console.WriteLine("  {0}. {1}", i.ToString(), verb);
        i++;
      }
    }
    Info.ErrorDialog = true;
    Info.UseShellExecute = true;
    Info.Verb = "OpenAs";
    Process.Start(Info);
  }
  catch (System.ComponentModel.Win32Exception except)
  {
    MessageBox.Show("Could not open application. Please check executable path.",
      "Application missing",
      MessageBoxButtons.OK,
      MessageBoxIcon.Warning);
  }
  catch (InvalidOperationException ex)
  {
    return;
  }
}


The code works fine in win XP but in win7 I get an error message stating that

"This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel."

When I click OK on the first message I get the error message from my catch clause.

I have googled like crazy for a solution to my problem, does anyone have a clue?



Thanks in advance!
/martin
QuestionRestore .bak file through C# Coding in sql server Pin
NarendraSinghJTV20-Dec-09 20:16
NarendraSinghJTV20-Dec-09 20:16 
AnswerRe: Restore .bak file through C# Coding in sql server Pin
Ravi Bhavnani20-Dec-09 20:42
professionalRavi Bhavnani20-Dec-09 20:42 
QuestionRe: Restore .bak file through C# Coding in sql server Pin
Md. Marufuzzaman21-Dec-09 2:50
professionalMd. Marufuzzaman21-Dec-09 2:50 
AnswerRe: Restore .bak file through C# Coding in sql server Pin
NarendraSinghJTV21-Dec-09 16:43
NarendraSinghJTV21-Dec-09 16:43 
GeneralRe: Restore .bak file through C# Coding in sql server Pin
Md. Marufuzzaman21-Dec-09 17:26
professionalMd. Marufuzzaman21-Dec-09 17:26 
GeneralRe: Restore .bak file through C# Coding in sql server Pin
NarendraSinghJTV21-Dec-09 20:04
NarendraSinghJTV21-Dec-09 20:04 
QuestionHow to Access the registered users to login a page [modified] Pin
Shyloo20-Dec-09 19:56
Shyloo20-Dec-09 19:56 
AnswerRe: How to Access the registered users to login a page Pin
Ashfield21-Dec-09 1:19
Ashfield21-Dec-09 1:19 
QuestionHow commands "AT Command" SIM card will be charged. Pin
Ir-win ChakadCo20-Dec-09 19:55
Ir-win ChakadCo20-Dec-09 19:55 
QuestionActive Directory code Pin
Dharmarajan20-Dec-09 19:27
Dharmarajan20-Dec-09 19:27 
Questioncan not open new form problem? Pin
miss YY20-Dec-09 19:21
miss YY20-Dec-09 19:21 
AnswerRe: can not open new form problem? Pin
Saksida Bojan20-Dec-09 19:44
Saksida Bojan20-Dec-09 19:44 
GeneralRe: can not open new form problem? Pin
miss YY20-Dec-09 20:33
miss YY20-Dec-09 20:33 
GeneralRe: can not open new form problem? Pin
Ravi Bhavnani20-Dec-09 20:44
professionalRavi Bhavnani20-Dec-09 20:44 
Questionprinting the slip Pin
Thaer Hamael20-Dec-09 19:19
Thaer Hamael20-Dec-09 19:19 
AnswerRe: printing the slip Pin
Ravi Bhavnani20-Dec-09 20:47
professionalRavi Bhavnani20-Dec-09 20:47 
Questionreport viewer problem Pin
ali- kanju220-Dec-09 18:21
ali- kanju220-Dec-09 18:21 

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.