|
Using a Try Catch statement won't work, because no error will be thrown if the file is empty. Use an If statement instead.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
You can use 'txtOut.text &= IO.File.ReadAllText(path)' to read all the text from a file. So all you really need is.
dim path as string = "c:\test.txt"
txtOut.text = MyLine & controlChars.crlf
txtOut.text &= IO.File.ReadAllText(path)
What do you mean by empty? Do you mean the file exists but has no data or the file doesn't exist?
|
|
|
|
|
Hi,How to i filter data in Crystal Report using a combo option (e.g Company Name).
There1 combo box for the Company, and a crystal report.
I'm using VB.Net 2005
|
|
|
|
|
In Visual Studio (VB.NET) 2005
simple as the title says, how do i keep the program name, but get rid of the top bar, i have deleted the control box, but when i put form text in, the top bar comes back!!!
|
|
|
|
|
The title of the program gets rendered on the title bar. If you want it rendered elsewhere, you'll have to render it yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
All i want it in is for the taskbar, where can i do this?
|
|
|
|
|
Just set the Form Border Style to "None".
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Hi!
The function below reads some values from an xml file perfectly. However when I try to save some values of submitted keys into xml file, it doesn't find the values in xml file and trying to create them. What is causing the problem.
'This procedure works fine
Private Function GetCnfgParameter(ByVal MyKey As String) As String
Dim DocXml As New XmlDocument
Dim NodeXml As XmlNode = Nothing
DocXml.Load(Path.Combine(Application.StartupPath, "app.xml"))
NodeXml = DocXml.DocumentElement.SelectSingleNode("//AppDefaultValues/add[@key=""" & MyKey & """]")
If TypeName(NodeXml.Attributes.GetNamedItem("value")) <> "Nothing" Then
Return NodeXml.Attributes.GetNamedItem("value").Value
Else
Dim Message As String = String.Empty
Message += "GetCnfgParameter:: app.con dosyasında tahrifat tespit edildi." & vbCrLf & vbCrLf
Message += "Program kendi atamalarını kullanacaktır."
MsgBox(Message, MsgBoxStyle.Critical)
Return Nothing
End If
End Function
But this procedure is not finding the same values in xml file even checking the node is as same as the above statements inside the procedure What is causing the problem? Thanks.
Private Function SaveConfigParameter(ByVal MyKey As String, ByVal MyValue As String) As Boolean
Dim DocXml As New XmlDocument
Dim NodeXml As XmlNode
Dim RootXml As XmlNode
Dim KeyXml As XmlNode
Dim ValueXml As XmlNode
SaveConfigParameter = False
DocXml.Load(Path.Combine(Application.StartupPath, "app.xml"))
NodeXml = DocXml.DocumentElement.SelectSingleNode("//AppDefaultValues/add[key=""" & MyKey & """]")
If NodeXml Is Nothing Then
' The node does not exist, let's create it but nodes exist actually
NodeXml = DocXml.CreateNode(XmlNodeType.Element, "add", "")
' Adding the Key attribute to the node, keep in mind, Xml tokens are case sensitive
' We should use 'key' instead of 'Key'
KeyXml = DocXml.CreateNode(XmlNodeType.Attribute, "key", "")
KeyXml.Value = MyKey
NodeXml.Attributes.SetNamedItem(KeyXml)
' Adding the key value, once again, remember that Xml tokens are case sensitive
ValueXml = DocXml.CreateNode(XmlNodeType.Attribute, "value", "")
ValueXml.Value = MyValue
NodeXml.Attributes.SetNamedItem(ValueXml)
' Add the new node to the root
RootXml = DocXml.DocumentElement.SelectSingleNode("//AppDefaultValues")
If Not RootXml Is Nothing Then
RootXml.AppendChild(NodeXml)
Else
SaveConfigParameter = False
End If
Else
'
' The node exist, save the new value
'
NodeXml.Attributes.GetNamedItem("value").Value = MyValue
SaveConfigParameter = True
End If
DocXml.Save(Path.Combine(Application.StartupPath, "app.xml"))
DocXml = Nothing
End Function
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Does the error happen after 9 seconds? You have the timeout set to 9 seconds. It looks like you are passing 9000 into the method maybe that needs to be a higher number? That is my guess.
Ben
|
|
|
|
|
Hi Ben, The error message i get is almost instant even if i boost the timeout intger to hundreds of thousands, its still instant. F1 isn't no good either, google justs hows how to create a FTP client etc etc
|
|
|
|
|
Just another shot in the dark, but is it some sort of rights thing, or is the file you are trying to up load open and being locked by another user. Couple of guesses, sorry I can't be more helpful.
Ben
|
|
|
|
|
I am currently on Vista so it maybe a permissions thing but i will play around with them. Why is it teh simple code that don't work
Thanks again
|
|
|
|
|
Okay I have kinda of got it working with a Try and End Try. The problem i am now facing is that it doesnt over write the file it only adds onto the existing text which i have erased and uploaded
|
|
|
|
|
Hi,
Please help me out to solve the following issue.
I created an MDI Form, and linked to many Child forms.
And created a Window menu with the 'mdilist' property set to TRUE.
But when i run the application, the window menu shows only numbers (like 1,2,3.....) and not the name of the child forms that i have loaded at runtime....
How to solve this Issue.
thanks
Krishnan
Krishnan
|
|
|
|
|
Resp Sir,
I am harshal Patil student of final year. I see you project, It is very nice and impressive. I want full project with source code for my study purpose. Full project means which draw at least four to five types of diagrams of uml. It is very important for me and my study. So please kindly understand my request.
Yours faithfully
Harshal Patil
(patil_harshal@hotmail.com)
harshal
|
|
|
|
|
You should try coding your project first and only post here problems your facing so that we can help.
|
|
|
|
|
harshpatil wrote: I want full project with source code for my study purpose
Sure thing. I'd estimate a cost of $5000 for me to write this for you, although I'd need to see a better spec to know if it would be more. Let me know.
Of course, if you try to do your own assignment, I'd be happy to help you, for free.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Despite our disagreement below, I like your answer to this one Christian.
Kevin
|
|
|
|
|
I came across a file that was in use (i was trying to delete the file using a application i made) but the file couldn't be deleted. Is their a way around this. Or is their a way that i can find what program is using this.
I would rather that any help did NOT envolve an application, but would be very greatful for examples or code that might help me.
Thanks for any help!
|
|
|
|
|
|
Hi guyz i have 3 buttons pk, and on the page load i want the backgorund of hte bttuon to be as i set in the database clolumn, for nstance ihabe a table Button and fields description and color
at the load i want the button background to be retreived from the table and be the backgound for this button ???! and ideas
Viper Investigates...
|
|
|
|
|
Does this mean it's an ASP.NET page ? If not, you can just set these properties any time you like. Which bit is causing you grief ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I developed my own custom web combobox component which used to display just fine in the VS 2003 designer. I also developed the designer for my component in VB.Net 2003. Unfortunately, while I was working on getting the properties in the component to work just the way I wanted them too, the component stop displaying properly in the designer, so now I get the gray box telling me that there was an error creating the component, and a pop-up saying that the style string for my component's button couldn't be set to the values in my ASPX page for all of the instances of the component in the page.
I've walked though the code using the debugger and don't get any errors, and the component renders properly with the settings that the designer is complaining about.
Anyone have any suggestions on how to debug this?
Thank you.
P.S., if anyone knows of some good resources on how to develop designer modules and property editors for the designer, please pass them along. I am in serious need of creating my own property dialogs for my component. Assuming it ever works in the designer again.
|
|
|
|
|
I have a form with no border and I want in a buttons click event
to Minimise the form. can this be done?
|
|
|
|
|
Yup,
Are you using images or standard buttons?
Use this to close the application:
Application.Exit()
and this to minimise the form:
Me.WindowState = FormWindowState.Minimized
These need to placed in the correct subs for the corresponding buttons.
Oli
|
|
|
|