Martin Zugec Posted July 22, 2005 Share Posted July 22, 2005 Hello there!Yesterday I decided to begin working with VB.NET (creating GUI in vbscript isnt comfortable)... But I encountered few problems, so I would like to ask few questions...1.) How to use another form??? I was thinking something like Dim Form2 as FormForm2.Show()But it is creating new form, not using existing one 2.) How to find out who created the file? I mean Owner property 3.) How to simply access XML configuration file? I think I should use XPath, I was thinking about something like WMI convention (Where Name="Logs" get Path)Are you using XML files?4.) Why isnt working MsgBoxStyle.Critical.OKOnly?When I enter numerical value, it is working just fine Link to comment Share on other sites More sharing options...
liquidplasmaflow Posted July 22, 2005 Share Posted July 22, 2005 I hated doing secondary forms, it was always a pain in the arse. And error 4, what are you trying to do with MsgBoxStyle.Critical.OKOnly ? Show me the whole line of code. Link to comment Share on other sites More sharing options...
Martin Zugec Posted July 22, 2005 Author Share Posted July 22, 2005 I am just trying to show critical box with OK button (or question with yesno etc.)... However even through IntelliSense will provide me with this options, they are not doing what they are supposed to do The middle section is ignored.About forms, I thought it is similar to VB6 (form.show), however as I can see it is working differently... From .NET logic I was thinking that I have to create form as form class (it is working), however I dont know how to manipulate with existing form Link to comment Share on other sites More sharing options...
liquidplasmaflow Posted July 22, 2005 Share Posted July 22, 2005 I think you need to make a new form in the designer (let's call it DesignedForm) and then do Dim myDesignedForm as New DesignedForm. Then Show() should work. Link to comment Share on other sites More sharing options...
Martin Zugec Posted July 22, 2005 Author Share Posted July 22, 2005 Thats it! Thank you Link to comment Share on other sites More sharing options...
Martin Zugec Posted July 22, 2005 Author Share Posted July 22, 2005 Hmmm, however I still have problems How to easily access buttons etc??? Like MyForm1.Label.Text = MyForm2.ComboBox1.Text??? Link to comment Share on other sites More sharing options...
dman Posted July 22, 2005 Share Posted July 22, 2005 Hi Martin,You need to declare the forms as public shared. this article should helphttp://visualbasic.about.com/od/usingvbnet/l/aa080703a.htm Link to comment Share on other sites More sharing options...
Martin Zugec Posted July 22, 2005 Author Share Posted July 22, 2005 Heh, thx dude, I already saw that article today, but I was thinking it is just about transparency key Link to comment Share on other sites More sharing options...
Martin Zugec Posted July 25, 2005 Author Share Posted July 25, 2005 Another question.I have two ListView objects... One is for finished installations, second is for running installations.I created few global variables, that are showing the selection (computer name etc.). However I am trying to find simple way how to determine if anything is selected? I imagine something likebIsSelected = list1.ItemSelected Link to comment Share on other sites More sharing options...
Martin Zugec Posted July 25, 2005 Author Share Posted July 25, 2005 Count property Link to comment Share on other sites More sharing options...
Martin Zugec Posted July 28, 2005 Author Share Posted July 28, 2005 Hello guys again I am planning to create something like timer for my work... So when I arrive to my office, I will simply turn it on and it will ring after I spend my usual 8 () hours at work... Have you implemented code similar to this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now