Search Results

Search found 714 results on 29 pages for 'anthony johnston'.

Page 11/29 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • VB.NET: short cuts in code

    - by Craig Johnston
    Why is the following VB.NET code setting str to Nothing in my VS2005 IDE: If Trim(str = New StreamReader(OpenFile).ReadToEnd) <> "" Then Button2.Enabled = True TextBox1.Text = fname End If OpenFile is a Function that returns a FileStream

    Read the article

  • keep only GUI when converting vb6 app to c#?

    - by Craig Johnston
    I have a large VB6 app which I want to convert to C#. The majority of the code in VB6 is quite badly written. I thought that a good strategy would be to keep the GUI design since it is adequate and would be a pain to recreate. But I would want to rewrite the code behind the GUI and the data layer. I could keep the GUI design by using one of the VB6 to .NET converters provided by Microsoft. Would this be a good strategy?

    Read the article

  • How to speed up 'cold start' of .NET component called from VB6 app

    - by Craig Johnston
    I have a VB6 app which brings up a form by invoking a .NET DLL, but the problem is that this form takes almost 5 seconds to appear after a menu item in the VB6 app is selected. How can I speed this up? I'm thinking that one possible solution is to load the Form from the .NET DLL during the splash screen of the VB6 app but make invisible or somehow not show it, and then when the menu item is selected I will make it show or visible. What are my options?

    Read the article

  • WCF JSON Service returns XML on Fault

    - by Anthony Johnston
    I am running a ServiceHost to test one of my services and all works fine until I throw a FaultException - bang I get XML not JSON my service contract - lovely /// <summary> /// <para>Get category by id</para> /// </summary> [OperationContract(AsyncPattern = true)] [FaultContract(typeof(CategoryNotFound))] [FaultContract(typeof(UnexpectedExceptionDetail))] IAsyncResult BeginCategoryById( CategoryByIdRequest request, AsyncCallback callback, object state); CategoryByIdResponse EndCategoryById(IAsyncResult result); Host Set-up - scrummy yum var host = new ServiceHost(serviceType, new Uri(serviceUrl)); host.AddServiceEndpoint( serviceContract, new WebHttpBinding(), "") .Behaviors.Add( new WebHttpBehavior { DefaultBodyStyle = WebMessageBodyStyle.Bare, DefaultOutgoingResponseFormat = WebMessageFormat.Json, FaultExceptionEnabled = true }); host.Open(); Here's the call - oo belly ache var request = WebRequest.Create(serviceUrl + "/" + serviceName); request.Method = "POST"; request.ContentType = "application/json; charset=utf-8"; request.ContentLength = 0; try { // receive response using (var response = request.GetResponse()) { var responseStream = response.GetResponseStream(); // convert back into referenced object for verification var deserialiser = new DataContractJsonSerializer(typeof (TResponseData)); return (TResponseData) deserialiser.ReadObject(responseStream); } } catch (WebException wex) { var response = wex.Response; using (var responseStream = response.GetResponseStream()) { // convert back into fault //var deserialiser = new DataContractJsonSerializer(typeof(FaultException<CategoryNotFound>)); //var fex = (FaultException<CategoryNotFound>)deserialiser.ReadObject(responseStream); var text = new StreamReader(responseStream).ReadToEnd(); var fex = new Exception(text, wex); Logger.Error(fex); throw fex; } } the text var contains the correct fault, but serialized as Xml What have I done wrong here?

    Read the article

  • Why would a error get thrown inside my try-catch?

    - by George Johnston
    I'm pushing a copy of our application over to a new dev server (IIS7) and the application is blowing up on a line inside of a try-catch block. It doesn't happen locally, it actually obey's the rules of a try-catch block, go figure. Any idea why this would be happening? Shouldn't it just be failing silently? Is there something environmental I need to enable/disable? Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Line 229: Try Line 230: Here >> : _MemoryStream.Seek(6 * StartOffset, 0) Line 232: _MemoryStream.Read(_Buffer, 0, 6) Line 233: Catch ex As IOException End Try Although it doesn't matter for answering this question, I thought I would mention that it's third party code for the Geo IP lookup.

    Read the article

  • VB6: Question about version numbers of dependent OCXs

    - by Craig Johnston
    Is it important for a VB6 app to refer to certain OCX versions? I have noticed that if I put my VB6 app code through the IDE on one machine then the form files will refer to different version of some OCXs than if I use another machine. What is the rule of thumb with this? Is it safe to assume that most of these old OCX versions will be compatible with each other and so I shouldn't worry? Some of the OCXs in question are: RICHTX32.OCX v1.1 and v1.2 COMCTL32.OCX v1.2 and v1.3

    Read the article

  • Providing an application data update from a website

    - by Craig Johnston
    I need to provide an update to application data as a download from a website. The update would actually just be the replacing of some data files with some updated ones. The update, which I assume would be some sort of setup package type program, would need to be able to do the following: access the file system and registry to determine where files should be copied to supply the files to be copied provide strong security so the data files cannot be downloaded or used by the wrong people What would be best way to achieve all of the above?

    Read the article

  • How to quickly analyse large MDB file

    - by Craig Johnston
    I need to know how to quickly analyse a large MDB file (about 1GB) to see which tables are causing it to be so big. Is there something will easily allow me to show a breakdown of which tables are responsible for how much data. I need to know whether it is just this one customer who is using the application differently, or whether there is genuinely a lot of data in the MDB. This MDB is currently causing the VB app to crash, and I need to know why it is so big so that I can maybe think about how to put some of the data into another 'archival' MDB. Migrating to SQL Server is not an option, unless the use of linked tables from an MDB is a realistic option.

    Read the article

  • 3 Dimensional Array

    - by George Johnston
    I don't know why I'm experiencing so much trouble with this, but I would like to have an array that basically represents a layer number and x,y coordinates so I could essentially say, int i = array[layer,x,y] and get the corrisponding value per layer. I create the array.. int[,,] myarray ...initialize it myarray = new int[0,width, height]; ...and it blows up when try and grab a value. int n = myarray[0,1,1] What am I missing?

    Read the article

  • How to suppress jqgrid from initially loading data?

    - by Steve Johnston
    I have a page that has a couple of jqGrids on it, along with a few other fields. I want to make one AJAX call myself that pulls back a JSON object that has the data that should be used to fill the entire page. So, I would like to make the call myself, populate the "other fields" and then pull a couple of collections off of the main JSON object that was returned and populate each of the jqGrids with those collections "manually". I have this much working, but I can't get jqGrid to stop attempting to make an AJAX request itself. Shouldn't there be a way to tell jqGrid to NOT attempt an AJAX call when it is initialized? I found a similar question asked here: http://stackoverflow.com/questions/1850159/how-to-suppress-jqgrid-from-initially-loading-data But I don't have the option that solved it for the poster. It seems pretty logical to me that some people may want to use this plugin without having the table attempt to get its own data upon initialization. Am I missing an option somewhere in the documentation (wiki - options)? Thanks.

    Read the article

  • Help with django filters

    - by Cato Johnston
    In a django template, I want to get an value from the first object in a list's field. I have the following code {{ list.object|first.field }} But it results in an error. Is there a way to achieve this without writing a loop or doing it in the view?

    Read the article

  • C#: proprietary DLLs requiring access to my assemblies

    - by Craig Johnston
    My solution uses a proprietary assembly, which when debugging the solution throws an Exception saying it can't find an assembly that is meant to be one of the projects in my solution. I cannot add a reference to the proprietary assembly because all I have is the DLL. When I compile everything into a single application directory and run the app it works fine, but I want to debug. Where should assemblies be placed if you want a proprietary assembly in the solution to see them? I assume the issue is that there is no path specified and it is just looking in a default directory of some kind.

    Read the article

  • can not access MovieClip properties in flashDevelop

    - by numerical25
    I know there is something I am doing wrong. In my controls I have keydown events that control my hero. As of right now, I am trying to rotate my hero but he refuses to turn . Below is my Hero Class, my control class, and gameobject class. pretty much all the classes associate with the controls class. package com.Objects { import com.Objects.GameObject; /** * ... * @author Anthony Gordon */ [Embed(source='../../../bin/Assets.swf', symbol='OuterRim')] public class Hero extends GameObject { public function Hero() { } } } Here is my Controls class. This is the class where I am trying to rotate my hero but he doesnt. The keydown event does work cause I trace it. package com.Objects { import com.Objects.Hero; import flash.events.*; import flash.display.MovieClip; /** * ... * @author Anthony Gordon */ public class Controls extends GameObject { private var aKeyPress:Array; public var ship:Hero; public function Controls(ship:Hero) { this.ship = ship; IsDisplay = false; aKeyPress = new Array(); engine.sr.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener); engine.sr.addEventListener(KeyboardEvent.KEY_UP,keyUpListener); } private function keyDownListener(e:KeyboardEvent):void { //trace("down e.keyCode=" + e.keyCode); aKeyPress[e.keyCode] = true; trace(e.keyCode); } private function keyUpListener(e:KeyboardEvent):void { //trace("up e.keyCode=" + e.keyCode); aKeyPress[e.keyCode]=false; } override public function UpdateObject():void { Update(); } private function Update():void { if (aKeyPress[37])//Key press left ship.rotation += 3,trace(ship.rotation ); ///DOESNT ROtate }//End Controls } } Here is GameObject Class package com.Objects { import com.Objects.Engine; import com.Objects.IGameObject; import flash.display.MovieClip; /** * ... * @author Anthony Gordon */ public class GameObject extends MovieClip implements IGameObject { private var isdisplay:Boolean = true; private var garbage:Boolean; public static var engine:Engine; public var layer:Number = 0; public function GameObject() { } public function UpdateObject():void { } public function GarbageCollection():void { } public function set Garbage(garb:Boolean):void { garbage = garb; } public function get Garbage():Boolean { return garbage } public function get IsDisplay():Boolean { return isdisplay; } public function set IsDisplay(display:Boolean):void { isdisplay = display; } public function set Layer(l:Number):void { layer = l; } public function get Layer():Number { return layer } } }

    Read the article

  • How do I disable zoom on control-scroll in Visual Studio 2010?

    - by Lawrence Johnston
    Visual Studio 2010 adds a zoom setting on the bottom left of the text editor (to the left of the horizontal scroll bar) and also adopts the control + mouse scroll idiom for zooming in and out. The former is fine, but I dislike the latter as I am occasionally still holding control when I start scrolling my source code (which results in the text size radically changing and completely throwing me off whatever I was doing). How do I disable it?

    Read the article

  • What's the best Mac custom disk image creation app?

    - by Lawrence Johnston
    I'm looking for a custom disk image creation app that I can integrate into the build process for my app (which means I need to be able to run it from the command line if possible). My desired features are that it will size the image for me, let me set the location of my icons when the image is opened, set a custom background/icon, etc. Free would be nice but if there's something that does exactly what I need I'll pay for it.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >