
hog
Avatar/Signature-
Posts
1011 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by hog
-
OK..it makes no difference:) So I get what you mean now, but am struggling trying to achieve it:( I haven't created a control class before and have tried this but it errors....no suprises there :) Public Class clsPictureBox Inherits System.Windows.Forms.PictureBox Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub End Class I then read a thread which said about adding a user controls or inherited user controls but am getting more lost as I go:(:(
-
DOH! in fact thinking about this I did create it in the IDE. I added an XML file to my project, typed in the bits and saved it. So did I do something else wrong??
-
OK I tried this: Me.SetStyle(ControlStyles.DoubleBuffer, True) and this Me.SetStyle(ControlStyles.DoubleBuffer Or ControlStyles.UserPaint Or ControlStyles.AllPaintingInWmPaint, True) Me.UpdateStyles() both with no success:( so I suspect your sentence re the controls may be relevant, but dumbo here appears to be in the dark regarding these things:( any chance of another gentle nudge:)
-
Aha, righty ho ta muchly, I shall play with this and get back to you thanks. You were right I created the xml file in notepad, so silly question....where should I create?
-
Dumb question coming....erm how?
-
I asked this before (I think) but here goes.. I have code in a forms Paint event that draws a non regular shape form and fills the backcolor property. This on its own works fine with no flicker. But say I add six controls to the form and also have code to set their backcolor property. Now I get a flicker as each control is modified and I can see each control in turn change colour. Question is this: Is there a way to disable screen refresh so all the modifications take place then the screen is refreshed in one go?
-
Woooh too much in one hit dude! Your talking to someone who is just starting to use xml so I don't get what you are talking about. The xml below I created manually: <?xml version="1.0" encoding="utf-8" ?> <config> <location>Pluto</location> <notify>0</notify> <notifypreriod>3</notifypreriod> </config> I am now using this to obtain the three values of location, notify and period: Dim xPath As XPathNavigator Dim strXMLcfgPath As String = Application.StartupPath Dim strXMLcfg As String = strXMLcfgPath & "\MaSCScfg.xml" ' check whether the cfg file exists, create it if it does not. If System.IO.File.Exists(strXMLcfg) Then ' open the xml file which stores the required config data Dim xpathConfig As XPathDocument = New XPathDocument(strXMLcfg) ' create a path navigator xPath = xpathConfig.CreateNavigator ' move to the first child node in the file xPath.MoveToFirstChild() xPath.MoveToFirstChild() ' get the location of this running apps data source m_strLocation = xPath.Value xPath.MoveToNext() ' get the boolean to determine notification choice m_blnNotify = xPath.Value xPath.MoveToNext() ' get the notification week period value m_intPeriod = xPath.Value Else ' code to create xml file to go here End If is this correct? seems weird having to call xPath.MoveToFirstChild() twice??
-
Weird as from the book I am reading I would think that config was the parent and the others were child nodes. But the messagebox confirms that config is the first child? a_jam, so how do you go about reading an xml file into a dataset?
-
Ok I am missing something here as I am not being able to get single values from an XML file. The file contains this: <?xml version="1.0" encoding="utf-8" ?> <config> <location>Pluto</location> <notify>0</notify> <notifypreriod>3</notifypreriod> </config> I am trying to read in the three node values, location, notify and period using this code: Dim xpathVersion As XPathDocument = New XPathDocument(strXMLcfg) ' create a path navigator xPath = xpathVersion.CreateNavigator ' move to the first child node in the file I presume it to be location xPath.MoveToFirstChild() ' get the location of this running apps data source strLocation = xPath.Value xPath.MoveToNext() blnNotify = xPath.Value xPath.MoveToNext() intPeriod = xPath.Value MessageBox.Show(strLocation & ControlChars.CrLf & blnNotify & ControlChars.CrLf & intPeriod) On the line that assigns xPath.Value to strLocation rather than just Pluto being assigned it gets PlutoNo3, then the code falls over at the line where it attempts to assign the next xPath.Value to blnNotify as it is still PlutoNo3 The messagebox is there purely for test purposes. So am I missing somethin fundamental here:confused:
-
OK thnx. What I am finding though is that when the code that changes the form backcolor and all the controls backcolor values I get a lot of flicker, but if I leave the controls alone no flicker occurs?
-
I once heard Coke was originally created as cure for engine knock:)
-
Just to add however that you can still write some pretty snazzy games in VB.Net, ok not the Quake or Doom variety, but still good all the same:)
-
Thnx.... This is how I have done it: Me.ColorDialog1.ShowDialog() clrColour = Me.ColorDialog1.Color Dim mColour As Color = Color.FromArgb(150, Me.ColorDialog1.Color) Me.picBackground.BackColor = mColour
-
Does anyone know of a way to calculate a lighter/darker version of a colour selection returned from the colour picker control? So if a user picked a shade of blue which would be the new colour of the form, then I want to set all the controls backcolor property to a different shade of the chosen colour.:)
-
Yeah, I think I'll need to do some major reading on the topic. Thanks for the advice guys:)
-
OK....the deal is this. If I place a database on a file server, where do I place my web application? I mean for example, do I have a folder for data then another for web app and the users direct their browser to the folder where the app is? You can see I now next to nothing about this :)
-
Thx for the advice chaps, this is how I'm doing it for now: Private Function CheckVersion() As Boolean Dim xPath As XPathNavigator Try Dim xpathVersion As XPathDocument = New XPathDocument(gstrVersionXML) xPath = xpathVersion.CreateNavigator xPath.MoveToFirstChild() gstrUserVersion = Microsoft.VisualBasic.Left(System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString, 3) If gstrUserVersion = xPath.Value Then Return True Else gstrNewVersion = xPath.Value Return False End If Catch objException As Exception ShowError("Location: Class frmMain" & ControlChars.CrLf & ControlChars.CrLf & _ "Procedure: CheckVersion() " & ControlChars.CrLf & ControlChars.CrLf & "Error Text: " & _ objException.Message) Return True End Try End Function It's on a LAN so will suffice me thinks:)
-
Thx Divil. I'm not getting this XML stuff completely at the moment...this is what I have so far: Private Function CheckVersion() As Boolean Dim docVersion As XmlDocument = New XmlDocument docVersion.Load(gstrVersionXML) Dim rdVersionReader As XmlNodeReader = New XmlNodeReader(docVersion) While rdVersionReader.Read If rdVersionReader.Name = "currentversion" Then MessageBox.Show(rdVersionReader.Value) End If End While End Function This is the XML file content <?xml version="1.0" encoding="utf-8" ?> - <mascsversion> <currentversion>1.0</currentversion> </mascsversion> Thing is when I run the code it displays two blank message boxes instead of 1 showing the value 1.0 Where am I going wrong??
-
there's loads of info on this site on this topic, but basically you need to create a setup project which the users will use to install your app and they need the .Net Framework installed on their PC too
-
Thn Divil. So regarding 3. are you saying that only the .exe file would require replacing so no setup.exe would need to be run?
-
Might be a stupid question....but what s sourcesafe?
-
I'm using VS2003 on W2K Pro SP3 and have'nt experienced this?
-
OK, I know nothing on this, but want to:) What is needed inorder to create a web application that will run on our intranet? If I write an app which use an Access database for example how do I get it out to users? I have no control over our sites servers let alone any other site. Do I need to have admin access to my own sites server in order to setup a web app?
-
Inform users that a newer version is available? My theory is this, but was wondering does anyone know/use a better method. Proposed method: Users open the application on their PC. When it opens it checks it's version against the version number held within a hidden XML file on the server where all the install files are held. If the version number in the XML is newer the user is informed that a newer version is availble. 1. I presume there is an internal app version number that the app can query without the need for me to create one? 2. Still haven't done anything with XML so unsure as to how easy/hard this would be? 3. Is it possible to give the user a button that when they click it it closes the current application and installs the newer version? Thx :)