Click here to Skip to main content
15,886,830 members
Home / Discussions / C#
   

C#

 
GeneralRe: Get a grahics object from a Bitmap Pin
Ista25-Aug-03 18:28
Ista25-Aug-03 18:28 
GeneralDES encryption/decryption Pin
devvvy25-Aug-03 16:41
devvvy25-Aug-03 16:41 
GeneralRe: DES encryption/decryption Pin
Julian Bucknall [MSFT]26-Aug-03 5:46
Julian Bucknall [MSFT]26-Aug-03 5:46 
QuestionValid CodeProject Article? Pin
Steven Behnke25-Aug-03 14:41
Steven Behnke25-Aug-03 14:41 
AnswerRe: Valid CodeProject Article? Pin
Ista25-Aug-03 15:13
Ista25-Aug-03 15:13 
GeneralRegistry Errors Pin
mikemilano25-Aug-03 10:57
mikemilano25-Aug-03 10:57 
GeneralRe: Registry Errors Pin
Roger Stewart25-Aug-03 12:02
professionalRoger Stewart25-Aug-03 12:02 
GeneralRe: Registry Errors Pin
mikemilano25-Aug-03 12:57
mikemilano25-Aug-03 12:57 
i am creating a Param object before i call GetValues()

here's a little more of the code with the 2 methods i'm using.

I can comment out either one of the 'problem' lines, and the methods work fine, but it is when both are not commented that i get the object error.

private void CreateStyles(DataGrid dg)
{
  DataGridTableStyle style = new DataGridTableStyle();
  style.MappingName = "IssueHistory";

  DataGridTextBoxColumn DetailID = new DataGridTextBoxColumn();
  DetailID.MappingName = "DetailID";
  DetailID.WidthChanged += new EventHandler(this.SaveIssueGrid);


  RegistryKey softwareKey = Registry.LocalMachine.OpenSubKey("Software");
  RegistryKey SC = softwareKey.OpenSubKey("SC");
  
  if( SC != null)
  {
    RegistryKey Param = SC.OpenSubKey("Param");

    if(Param != null)
    {
      DetailID.Width = (int)Param.GetValue("IHDetailIDWidth",50); // <-- problem line
    }
  }
  // code here to add style to dg
}

void SaveIssueGrid(object sender, EventArgs e)
{
  RegistryKey softwareKey = Registry.LocalMachine.OpenSubKey("Software",true);
  RegistryKey SC = softwareKey.CreateSubKey("SC");
  RegistryKey Param = SC.CreateSubKey("Param");	

  Param.SetValue("IHDetailIDWidth",this.dgIssueHistory.TableStyles["IssueHistory"].GridColumnStyles["DetailID"].Width); // <- problem line
}


sorry for the big code post, but i've been working on this for hours with the same results.
GeneralRe: Registry Errors Pin
Roger Stewart25-Aug-03 15:11
professionalRoger Stewart25-Aug-03 15:11 
GeneralRe: Registry Errors Pin
mikemilano26-Aug-03 7:06
mikemilano26-Aug-03 7:06 
GeneralScreenshot of Window... Pin
Calamitous25-Aug-03 10:40
Calamitous25-Aug-03 10:40 
Questionhow to retrieve a list of sheet from excel with odbc in c#? Pin
zoltix25-Aug-03 10:15
zoltix25-Aug-03 10:15 
AnswerRe: how to retrieve a list of sheet from excel with odbc in c#? Pin
Csharp™25-Aug-03 11:43
Csharp™25-Aug-03 11:43 
GeneralRe: how to retrieve a list of sheet from excel with odbc in c#? Pin
zoltix25-Aug-03 22:47
zoltix25-Aug-03 22:47 
GeneralDataGridTextBoxColumn.WidthChange to trigger method Pin
mikemilano25-Aug-03 6:49
mikemilano25-Aug-03 6:49 
GeneralRe: DataGridTextBoxColumn.WidthChange to trigger method Pin
Roger Stewart25-Aug-03 7:25
professionalRoger Stewart25-Aug-03 7:25 
GeneralRe: DataGridTextBoxColumn.WidthChange to trigger method Pin
mikemilano25-Aug-03 7:48
mikemilano25-Aug-03 7:48 
QuestionC# Profiling?!? Pin
Alberto Bencivenni25-Aug-03 5:37
Alberto Bencivenni25-Aug-03 5:37 
AnswerRe: C# Profiling?!? Pin
leppie25-Aug-03 8:38
leppie25-Aug-03 8:38 
GeneralRe: C# Profiling?!? Pin
Anonymous25-Aug-03 10:22
Anonymous25-Aug-03 10:22 
GeneralRe: C# Profiling?!? Pin
Alberto Bencivenni25-Aug-03 10:40
Alberto Bencivenni25-Aug-03 10:40 
GeneralNewby Application.StartupPath Problem Pin
GostWryter25-Aug-03 3:06
GostWryter25-Aug-03 3:06 
GeneralRe: Newby Application.StartupPath Problem Pin
David Stone25-Aug-03 4:58
sitebuilderDavid Stone25-Aug-03 4:58 
GeneralRe: Newby Application.StartupPath Problem Pin
GostWryter26-Aug-03 2:01
GostWryter26-Aug-03 2:01 
Generaljava Word maker help required Pin
seunao25-Aug-03 1:43
seunao25-Aug-03 1:43 

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.