Click here to Skip to main content
15,914,488 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionC# .Net windows application unable to open MS Access Database Connection in windows server 2003 Pin
ankit_1987_95-Sep-12 23:04
ankit_1987_95-Sep-12 23:04 
AnswerRe: C# .Net windows application unable to open MS Access Database Connection in windows server 2003 Pin
Eddy Vluggen5-Sep-12 23:48
professionalEddy Vluggen5-Sep-12 23:48 
Generaloptiontips.in Pin
optiontips.in4-Sep-12 21:26
optiontips.in4-Sep-12 21:26 
AnswerRe: optiontips.in Pin
Eddy Vluggen4-Sep-12 21:58
professionalEddy Vluggen4-Sep-12 21:58 
QuestionObtain Summary Values from GridView Control in vb.Net?? Pin
Priyanka Jain4-Sep-12 19:39
Priyanka Jain4-Sep-12 19:39 
AnswerRe: Obtain Summary Values from GridView Control in vb.Net?? Pin
Eddy Vluggen4-Sep-12 21:55
professionalEddy Vluggen4-Sep-12 21:55 
AnswerRe: Obtain Summary Values from GridView Control in vb.Net?? Pin
Durgeshyadav201210-Sep-12 23:20
Durgeshyadav201210-Sep-12 23:20 
QuestionXML Deserializing Button.Color Pin
Dan Orr4-Sep-12 19:20
Dan Orr4-Sep-12 19:20 
I'm trying to serialize the colors of buttons on a Windows form in VB2010.net. It appears to serialize correctly into XML, but for some reason it won't deserialize correctly. I've read various confusing blog articles, some of which say that you can't XML serialize the color propperty and others that seem to find a way to do so. It seems like it should be straight forward, but something is not being accepted by .net although it doesn't complain about my code. Does anyone have an idea why this won't work?

The following is my serializing segment:
VB
xmlSerialisedForm.WriteAttributeString("BtnForeColor", DirectCast(childCtrl, Button).ForeColor.ToArgb().ToString)

xmlSerialisedForm.WriteAttributeString("BtnBackColor", DirectCast(childCtrl, Button).BackColor.ToArgb().ToString)


It yields the following XML:
XML
<?xml version="1.0" encoding="Windows-1252"?>
<ChildForm>
  <Control Type="System.Windows.Forms.Button" Name="btnConfigForm" ForeColor="Color [ControlText]" BakColor="Color [Control]" BtnForeColor="-16777216" BtnBackColor="-986896">
    <Visible>True</Visible>
  </Control>
  <Control Type="System.Windows.Forms.Button" Name="btn30" ForeColor="Color [Black]" BakColor="Color [Yellow]" BtnForeColor="-16777216" BtnBackColor="-256">
    <Visible>True</Visible>
  </Control>
  <Control Type="System.Windows.Forms.Button" Name="btn32" ForeColor="Color [White]" BakColor="Color [Green]" BtnForeColor="-1" BtnBackColor="-16744448">
    <Visible>True</Visible>
  </Control>
  <Control Type="System.Windows.Forms.Button" Name="btn33" ForeColor="Color [White]" BakColor="Color [Black]" BtnForeColor="-1" BtnBackColor="-16777216">
    <Visible>True</Visible>
  </Control>
  <Control Type="System.Windows.Forms.Button" Name="btn41" ForeColor="Color [Black]" BakColor="Color [Red]" BtnForeColor="-16777216" BtnBackColor="-65536">
    <Visible>True</Visible>
  </Control>
  <Control Type="System.Windows.Forms.PictureBox" Name="pbxFloorPlan" ForeColor="Color [ControlText]" BakColor="Color [Control]">
    <Visible>True</Visible>
  </Control>
</ChildForm>


This following is my deserialize code that yields a white color for each button:
DirectCast(ctrlToSet, System.Windows.Forms.Button).ForeColor = Color.FromArgb(CInt(Val("BtnForeColor")))

DirectCast
(ctrlToSet, System.Windows.Forms.Button).BackColor = Color.FromArgb(CInt(Val("BtnBackColor")))

AnswerRe: XML Deserializing Button.Color Pin
Eddy Vluggen4-Sep-12 21:54
professionalEddy Vluggen4-Sep-12 21:54 
QuestionBest way to understand .Net Framework!? Pin
Tan-V4-Sep-12 6:34
Tan-V4-Sep-12 6:34 
AnswerRe: Best way to understand .Net Framework!? Pin
Eddy Vluggen4-Sep-12 6:42
professionalEddy Vluggen4-Sep-12 6:42 
QuestionCustom Tool and Designer Serializer Pin
Ali el2-Sep-12 2:17
Ali el2-Sep-12 2:17 
GeneralRazor Engine Pin
Albarhami1-Sep-12 20:45
Albarhami1-Sep-12 20:45 
GeneralRe: Razor Engine Pin
Eddy Vluggen1-Sep-12 21:50
professionalEddy Vluggen1-Sep-12 21:50 
GeneralRe: Razor Engine Pin
Dave Kreskowiak2-Sep-12 4:45
mveDave Kreskowiak2-Sep-12 4:45 
QuestionRazor engine (MVC) Pin
Albarhami1-Sep-12 20:44
Albarhami1-Sep-12 20:44 
Questionhow to create database with sql connection in vb.net Pin
mamnafih31-Aug-12 1:05
mamnafih31-Aug-12 1:05 
AnswerRe: how to create database with sql connection in vb.net Pin
Eddy Vluggen31-Aug-12 1:31
professionalEddy Vluggen31-Aug-12 1:31 
AnswerCross post Pin
Wes Aday31-Aug-12 2:28
professionalWes Aday31-Aug-12 2:28 
Question.Net Framework Pin
Georges2328-Aug-12 5:14
Georges2328-Aug-12 5:14 
AnswerRe: .Net Framework Pin
Eddy Vluggen28-Aug-12 5:33
professionalEddy Vluggen28-Aug-12 5:33 
SuggestionRe: .Net Framework Pin
AsaApplications30-Aug-12 13:26
AsaApplications30-Aug-12 13:26 
AnswerRe: .Net Framework Pin
Abhinav S30-Aug-12 19:46
Abhinav S30-Aug-12 19:46 
AnswerRe: .Net Framework Pin
Bernhard Hiller31-Aug-12 2:37
Bernhard Hiller31-Aug-12 2:37 
RantNeed to vent/need incite (complete rant) Pin
anthem12728-Aug-12 2:03
anthem12728-Aug-12 2:03 

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.