Click here to Skip to main content
16,004,974 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow different size font insert in a DataGridView cell Pin
Che YoungSoo20-Mar-07 5:06
Che YoungSoo20-Mar-07 5:06 
Questioncontrols Pin
WhiteGirl2320-Mar-07 4:55
WhiteGirl2320-Mar-07 4:55 
AnswerRe: controls Pin
Dave Kreskowiak20-Mar-07 6:18
mveDave Kreskowiak20-Mar-07 6:18 
QuestionProblem with controlbox Pin
dBrong20-Mar-07 4:42
dBrong20-Mar-07 4:42 
AnswerRe: Problem with controlbox Pin
Johan Hakkesteegt21-Mar-07 2:54
Johan Hakkesteegt21-Mar-07 2:54 
GeneralRe: Problem with controlbox Pin
dBrong22-Mar-07 11:27
dBrong22-Mar-07 11:27 
QuestionHow can I read a value from a XML file? Pin
JUNEYT20-Mar-07 3:27
JUNEYT20-Mar-07 3:27 
AnswerRe: How can I read a value from a XML file? Pin
Dave Kreskowiak20-Mar-07 4:53
mveDave Kreskowiak20-Mar-07 4:53 
You can start by NOT naming your variables the same as class names, for example:
Dim XmlDocument As New XmlDocument

is a bad idea. This is because you can give yourself a headache wondering why the compiler is complaining about Static and Instance members, when your code looks correct.

Change the names to something less confusing...
Private Function GetConfigParameter(ByVal MyKey As String) As String
    Dim doc As New XmlDocument
    Dim node As XmlNode
 
    ' It's a bad idea to use CurrentDirectory, simply because the current directory
    ' can change during the execution of your app.
    doc.Load( Path.Combine(Application.StartupPath, "app.con") )
    node = doc.DocumentElement.SelectSingleNode("//configuration/AppDefaultValues/add[@key=""" & MyKey & """]")
    Return node.Attributes.GetNamedItem("value").Value
End Function





Dave Kreskowiak
Microsoft MVP - Visual Basic


GeneralRe: How can I read a value from a XML file? Pin
JUNEYT20-Mar-07 9:22
JUNEYT20-Mar-07 9:22 
QuestionUse a Web Control in VB.NET Pin
ayeleteric20-Mar-07 3:06
ayeleteric20-Mar-07 3:06 
AnswerRe: Use a Web Control in VB.NET Pin
Dave Kreskowiak20-Mar-07 4:42
mveDave Kreskowiak20-Mar-07 4:42 
GeneralRe: Use a Web Control in VB.NET Pin
ayeleteric20-Mar-07 4:45
ayeleteric20-Mar-07 4:45 
GeneralRe: Use a Web Control in VB.NET Pin
Dave Kreskowiak20-Mar-07 5:00
mveDave Kreskowiak20-Mar-07 5:00 
GeneralRe: Use a Web Control in VB.NET Pin
ayeleteric20-Mar-07 5:02
ayeleteric20-Mar-07 5:02 
GeneralRe: Use a Web Control in VB.NET Pin
Dave Kreskowiak20-Mar-07 6:08
mveDave Kreskowiak20-Mar-07 6:08 
Questionopen designer of rdlc report at runtime Pin
n_00420-Mar-07 2:48
n_00420-Mar-07 2:48 
Questionedit a string Pin
taherjaorawala20-Mar-07 2:35
taherjaorawala20-Mar-07 2:35 
AnswerRe: edit a string Pin
CPallini20-Mar-07 2:50
mveCPallini20-Mar-07 2:50 
AnswerRe: edit a string Pin
Christian Graus20-Mar-07 5:02
protectorChristian Graus20-Mar-07 5:02 
QuestionHow to get data from image Pin
JanapatiBalu20-Mar-07 1:59
JanapatiBalu20-Mar-07 1:59 
AnswerRe: How to get data from image Pin
Dave Kreskowiak20-Mar-07 4:39
mveDave Kreskowiak20-Mar-07 4:39 
GeneralRe: How to get data from image Pin
JanapatiBalu20-Mar-07 18:36
JanapatiBalu20-Mar-07 18:36 
GeneralRe: How to get data from image Pin
Dave Kreskowiak21-Mar-07 1:35
mveDave Kreskowiak21-Mar-07 1:35 
GeneralRe: How to get data from image Pin
JanapatiBalu21-Mar-07 2:53
JanapatiBalu21-Mar-07 2:53 
GeneralRe: How to get data from image Pin
Dave Kreskowiak21-Mar-07 4:01
mveDave Kreskowiak21-Mar-07 4:01 

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.