Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

barney_1972

@barney_1972
About
Posts
23
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Calling Windows App from command line prompt?
    B barney_1972

    Did'nt copy ALL the DLL's but only got an error message for one of the DLL's. Anyway, i have now created a MSI install which works better. Thanks

    Visual Basic question csharp testing beta-testing

  • Publish OR install project
    B barney_1972

    I am creating a VB.NET windows application and am unsure at whether i should be publishing the final executeable or creating a install/deployment project. I have tried the publish route (both to a web url and a directory) and the program installs fine. However i want to control where the exe file is sent and the publish does'nt seem to give me that. Is this what the install/deployment route will give me? Or is there a valid reason for using one over the other? (Yes, i am a .NET newbie) Regards

    Visual Basic csharp sysadmin question

  • Calling Windows App from command line prompt?
    B barney_1972

    I have a VB.NET windows app that i have built an exe file for. I orignally put the .exe file on the c:\ for ease of testing but the app didn't work. It complained 'PublicKeyToken=null or one of its dependencies. The system cannot find the file specified.' I have solved this by Publishing and installing the application, instead of just copying the exe file and config file across. However the publish wizard gives me the option of were to publish the install to but not where the install puts the exe file. How can i do this?

    Visual Basic question csharp testing beta-testing

  • App.Config??
    B barney_1972

    I intended to have the App.config file as a sort of config.ini file and have set up many application variables there. However i noticed that the .exe file does'nt complain if the app.config file is not around, so i can only assume that the file is embeddded into the exe file when the solution is built. Is this so or can i update the app.config file for different situations without having to change code? Regards

    Visual Basic question announcement

  • Start up module for VB.NET Windows Application??
    B barney_1972

    AliAmjad Thanks, i do have a book and have seen the code you mention before. But for some reason it is not in my current form. When i select 'show all files' im the solution explorer, a plus sign appears next to my form which, if expanded, show me a Form.Designer.vb file and a Form.resx file. I can see some code with 'Mybase.Disposing' in the Form.Designer.vb file but cannot find the form constructor anywhere. I can create a constructor, with the same code as your comment and the IDE doesn't complain, but i would like to know why it is'nt there in the first place. I have also tried adding in another form, just in case the code was accidentily deleted but this was the same.

    Visual Basic csharp question discussion

  • Start up module for VB.NET Windows Application??
    B barney_1972

    When i uncheck the 'Enable application framework' though what implication does this have?

    Visual Basic csharp question discussion

  • Start up module for VB.NET Windows Application??
    B barney_1972

    I'm having difficulty finding the windows generated code. I can see the code from the forms designer but that does not contain the constructor.

    Visual Basic csharp question discussion

  • Start up module for VB.NET Windows Application??
    B barney_1972

    In VB6 i used to start my project from a Sub Main() which resided in a module. This codei n sub main then initialised many things and called various forms, ie splash screen and so on. However i cannot get the VB.NET windows application to start in this way. The property settings require that the start up be a form, unless i use a different app type (ie console app or other). I'm new to VB.NET so would appreciate any best practice advise on this matter and how other developers are currently handling this. Many Thanks

    Visual Basic csharp question discussion

  • Try Catch inside of functions
    B barney_1972

    Many thanks , think i'll try applying the return at the end of the function.

    Visual Basic data-structures xml help question lounge

  • Try Catch inside of functions
    B barney_1972

    Some help on good practice would be appreciated. I have the following function and similar functions, but often get a squigly line somewhere in the functions which tells me the function does not return a value on all paths. Public Function ConvertToXmlDocument() As XmlDocument 'Alter the return type to suit - either stream or file or other Dim FileLineString As String Dim LineNumberInteger As Int32 Dim XmlSequenceCount As Int32 'Create xml envelope Dim XmlOutputDocument As New Xml.XmlDocument Try 'Intialise Xml Document If InitialiseXmlDocument(XmlOutputDocument, "Flat file" Then 'Loop array / reading each line of file content For Each FileLineString In Me.FileContentString 'Line count LineNumberInteger += 1 'Retrieve xml node....... 'Unformat retrieved node against file line.... Next Return XmlOutputDocument End If Catch ex As Exception Return Nothing End Try End Function Should i use multiple returns (ie another return statement after the end try) or is their a much better way in general, not just specific to this function? Many Thanks

    Visual Basic data-structures xml help question lounge

  • ByRef the ByVal way ??
    B barney_1972

    Thanks, i'm currently upgrading from VB6 to .net and want to start off on a firm footing employing some good practices. I agree with Dave's response, anybody else with an opinion more than welcome though. Many Thanks

    Visual Basic xml performance question

  • ByRef the ByVal way ??
    B barney_1972

    I have an XmlDocument (System.Xml) that i want to add to and do various other stuff but i want to split the routines down. I've read that ByVal is 'safer' to use and possibly quicker than byref so i am proposing to layout my functions as below... Imports System.Xml 'Declaration Dim XmlDocObject as New XmlDocument XmnlDocObject = InitialiseXml(XmlDocObject) Private Function InitialiseXml(ByVal v_XmlDocObject as XmlDocument) as XmlDocument 'Temp object Dim TempXmlObject = v_xmlDocObject 'Do something with temp object...... 'Return object now processing is finished Return TempXmlObject 'Destroy temp object TempXmlObject = Nothing End Function What i would like to know is if the above is good / bad practice? Anything thing wrong with this way? Is this the preferred way as opposed to using Byref or am i creating extra objects which will lie around in memory (until GC see fit to get rid)? Regards

    Visual Basic xml performance question

  • Constant Module Or File ?
    B barney_1972

    :-DExcellent, thanks. Just the thing i was looking for.

    Visual Basic csharp sysadmin xml question

  • Constant Module Or File ?
    B barney_1972

    When i first started VB6 i used to hard code constants into a separate Module. Then i moved on to using an ini file instead as this allowed me to change server paths and server names plus other info without the need for recompiling code. Now i'm onto and new to VB.NET i want to adopt a good practise and have started using an xml file instead which i then read into the application to initialise certain system properties. What i want to know is what other people are doing or is there a better standard that folks are using? Many Thanks

    Visual Basic csharp sysadmin xml question

  • Enumerator Class help
    B barney_1972

    Guy, Thanks alot - just needed a good example - could'nt see the Forest because the trees were in the way!!:-D Thanks

    Visual Basic csharp help tutorial question

  • Enumerator Class help
    B barney_1972

    I understand Polymorphism better than before because of your explanation, thanks. I am still confused how this applies to my Enums though. Do you have an exact example of how this would apply using enums? Thanks Ps:- To be honest what i was trying to do in the first place was probably bad practise, trying to put enums all in one place. I think as mentioned by someone ealrier they should be contained in each class.

    Visual Basic csharp help tutorial question

  • Enumerator Class help
    B barney_1972

    I do have a reasonable knowledge of OOP concepts and can understand why to put the enums into their respective classes, however i am a bit confused over the mention of polymorphism. I have read the link on Wiki. Can you elaborate further why i need to undertand polymorphism in this case for moving the enums into their own classes? Thanks

    Visual Basic csharp help tutorial question

  • Enumerator Class help
    B barney_1972

    Thanks for the reponse. I had already created the class but in light of your reponses i think i'll dispose of it and follow a better practice after reading up a little. Cheers

    Visual Basic csharp help tutorial question

  • Enumerator Class help
    B barney_1972

    I want to create a class to hold the many enums i have created, instead of having them in various applications. I have need where somewhere where the class contents can be accessed without instantiating the class, for example. Instead of.... Dim EnumObject as New EnumeratorClass Dim Integer as int32 Integer = EnumObject.FileActionEnum.Open I want to do......... Imports SomeNamespace.EnumeratorClass (or something similar) Dim Integer as Int32 = EnumeratorClass.FileActionEnum.Open Can anybody give me a nudge in the right direction? (Yes i am new to VB.NET) Thanks

    Visual Basic csharp help tutorial question

  • XFlat
    B barney_1972

    I'm currently on XP using VB.NET 2005. The organisation uses an older version of SAP which outputs flat files which need processing into other systems. I've looked at xsd validation which is useful for validatiing xml files and will be useful when we eventually upgrade SAP. However i need a generic way (or as much as possible) for reading from and creating flat files. I was wondering if there was a way of specifiying the structure of the flat files using xml files as some sort of schema. If not, is it possible i could de-serialise the flat files, maybe into objects and then later serialise them to (possibly) a different structured files? This is where i was wondering whether an xml type schema could be used. Any help, greatly appreciated.

    XML / XSL database xml question discussion
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups