I have purchased Visual Studio .Net 2003 and i like it, it's quite easy yo use, but i have a few problems i cannot solve.
Im assume that some of the problems are solved somewhere in here, but i am in an internet cafe, i dont have an internet connection home so i dont have the time to search through the forum... :-s
1: If i make a button to CLOSE the application i just have to type "END" into the [private sub button_click... / end sub], but what if i want to make a button to minimize the window ? (I hope it's just a short word, like "END").
I tried Me.Close (that works like END) and Me.Hide... but "hide" really hides the window and i must stop debugging and restart the application to maximize it again. :p I'm sure it's very simple.
2: How can i make one form move if i drag it, wherever i would click on it? I mean, i can move a window only if i grab the bar (the thing with minimize, maximize and close buttons). But HOW can i move the window by clicking and draging anywhere on it ?
I tried something with Ctrl+arrows to move the window and it works:
If e.KeyValue = Keys.Left Then Me.Left = Left - 25 If e.KeyValue = Keys.Up Then Me.Top = Top - 25
But how can i do something similar with the mouse? I tried to make Private Sub Form1_DragDrop and the only thing it had to do was to MsgBox("You drag-dropped the form"), but whatever i do, i dont see the msgbox, so i'm doing something wrong.
3: How can i launch one .mp3, or .avi, or .doc from my application ? I dont want to make a video player or a MS Word clone. I just want the file to open with media player (for mp3), or word (for doc).
I really need the most efficient way, to open the files very fast.
4: I've learned one method to read XML files... but how can i WRITE some data into a XML file ? Lets suppose i have:
<grandma> <mother> <daughter> She has a little toy. </daughter> </mother> </grandma>
(Lol, this is the first example that popped up in my mind.) I want to read "She has a little toy." and write "She has a BEAR." instead.
Any method would do, since i don't know too many... My only method of reading is this:
Dim ShownTEXT as String Dim Doc As New XmlDocument Dim Nav As XPath.XPathNavigator Dim Iterator As XPath.XPathNodeIterator Doc.Load("..\Data.xml") Nav = CType(Doc, XPath.IXPathNavigable).CreateNavigator() Iterator = Nav.Select("grandma/mother/daughter") Iterator.MoveNext() shownTEXT = Iterator.Current.Value MsgBox(shownTEXT)
There is also another type of XML i would like to read, but i have no idea HOW !:
<root> <example name="horse"> <this_animal_eats>grass</this_animal_eats> </example> <example name="wolf"> <this_animal_eats>meat</this_animal_eats> </example> </root>
How can i read what example named "Wolf" eats, instead of reading what "Horse" eats ? Then, how can i write anything else instead of "grass" and "meat" ?
Please help. Thank you very much.