Search Results

Search found 110 results on 5 pages for 'dario silva moran'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • refactor LINQ TO SQL custom properties that instantiate datacontext

    - by Thiago Silva
    I am working on an existing ASP.NET MVC app that started small and has grown with time to require a good re-architecture and refactoring. One thing that I am struggling with is that we've got partial classes of the L2S entities so we could add some extra properties, but these props create a new data context and query the DB for a subset of data. This would be the equivalent to doing the following in SQL, which is not a very good way to write this query as oppsed to joins: SELECT tbl1.stuff, (SELECT nestedValue FROM tbl2 WHERE tbl2.Foo = tbl1.Bar), tbl1.moreStuff FROM tbl1 so in short here's what we've got in some of our partial entity classes: public partial class Ticket { public StatusUpdate LastStatusUpdate { get { //this static method call returns a new DataContext but needs to be refactored var ctx = OurDataContext.GetContext(); var su = Compiled_Query_GetLastUpdate(ctx, this.TicketId); return su; } } } We've got some functions that create a compiled query, but the issue is that we also have some DataLoadOptions defined in the DataContext, and because we instantiate a new datacontext for getting these nested property, we get an exception "Compiled Queries across DataContexts with different LoadOptions not supported" . The first DataContext is coming from a DataContextFactory that we implemented with the refactorings, but this second one is just hanging off the entity property getter. We're implementing the Repository pattern in the refactoring process, so we must stop doing stuff like the above. Does anyone know of a good way to address this issue?

    Read the article

  • AjaxControlToolkit Resource Files Not Copied To Output in MSBuild Script

    - by Dario Solera
    I'm new to MSBuild, but I managed to setup the following simple script: <Project ToolsVersion="3.5" DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> </PropertyGroup> <ItemGroup> <SolutionRoot Include=".." /> <BuildArtifacts Include=".\Artifacts\" /> <SolutionFile Include="..\SolutionName.sln" /> </ItemGroup> <Target Name="Clean"> <RemoveDir Directories="@(BuildArtifacts)" /> </Target> <Target Name="Init" DependsOnTargets="Clean"> <MakeDir Directories="@(BuildArtifacts)" /> </Target> <Target Name="Compile" DependsOnTargets="Init"> <MSBuild Projects="@(SolutionFile)" Properties="OutDir=%(BuildArtifacts.FullPath);Configuration=$(Configuration)" /> <MakeDir Directories="%(BuildArtifacts.FullPath)\_PublishedWebsites\RDE.XAP.UnifiedGui.Web\Temp" /> </Target> </Project> The solution has 23 projects, 4 of which are WebApps. Now, the script works fine and the output is generated correctly. The only problem I counter is with two WebApp projects in the solution that use the AJAX Control Toolkit. The toolkit has a set of folders (e.g. ar, it, es, fr) that contain localized resources. These folders are not copied in the bin directory of the WebApps when the solution is built in MSBuild, but they are copied when it is built in Visual Studio. How can I solve this in a clean manner? I know I could write a (quite convoluted) task that copies the directories after the compile, but it does not seem the right solution to me. Also, neither Google, SO and MSDN could provide more details on this kind of issue.

    Read the article

  • Learning XNA for Game Development. Is it worth It?

    - by Nipuna Silva
    It seems that most of the popular games in the world are developed using C++. But Microsoft's game platform, XNA Studio is based on programming in C# and I didn't find any popular game which was developed using XNA. Also there are fewer Ebooks you find on XNA and even the google search for a problem won't give you much help. Does people doesn't use XNA as a gaming platform? Is it worth learning XNA for game development or should I consider some other platform?

    Read the article

  • What's the best practice way to convert enum to string?

    - by dario
    Hi. I have enum like this: public enum ObectTypes { TypeOne, TypeTwo, TypeThree, ... TypeTwenty } then I need to convert this enum to string. Now Im doing this that way: public string ConvertToCustomTypeName(ObjectTypes typeObj) { string result = string.Empty; switch (typeObj) { case ObjectTypes.TypeOne: result = "This is type T123"; break; case ObjectTypes.TypeTwo: result = "This is type T234"; break; ... case ObjectTypes.TypeTwenty: result = "This is type last"; break; } return result; } Im quite sure that there is better way do do this, Im looking for some good practice solution. Thanks in advance.

    Read the article

  • Is it safe to lock a static variable in a non-static class?

    - by Dario Solera
    I've got a class that manages a shared resource. Now, since access to the resource depends on many parameters, this class is instantiated and disposed several times during the normal execution of the program. The shared resource does not support concurrency, so some kind of locking is needed. The first thing that came into my mind is having a static instance in the class, and acquire locks on it, like this: // This thing is static! static readonly object MyLock = new object(); // This thing is NOT static! MyResource _resource = ...; public DoSomeWork() { lock(MyLock) { _resource.Access(); } } Does that make sense, or would you use another approach?

    Read the article

  • Advice on designing and building distributed application to track vehicles

    - by dario-g
    I'm working on application for tracking vehicles. There will be about 10k or more vehicles. Each will be sending ~250bytes in each minute. Data contains gps location and everything from CAN Bus (every data that we can read from vehicle computer and dashboard). Data are sent by GSM/GPRS (using UDP protocol). Estimated rows with this data per day is ~2000k. I see there 3 main blocks. 1. Multithreaded Socket Server (MSS) - I have it. MSS stores received data to the queue (using NServiceBus). 2. Rule Processor Server (RPS) - this is core of this system. This block is responsible for parsing received data, storing in the database, processing rules, sending messages to Notifier Server (this will be sending e-mails/sms texts). Rule example. As I said between received bytes there will be information about current speed. When speed will be above 120 then: show alert in web application for specified users, send e-mail, send sms text. (There can be more than one instance of RPS). 3. Web application - allows reporting and defining rules by users, monitoring alerts, etc. I'm looking for advice how to design communication between RPS and Web application. Some questions: - Should Web application and RPS have separated databases or one central database will be enough? I have one domain model in web application. If there will be one central database then can I use the same model (objects) on RPS? So, how to send changed rules to RPS? I try to decouple this blocks as much as possible. I'm planning to create different instance of application for each client (each client will have separated database). One client will be have 10k vehicles, others only 100 vehicles.

    Read the article

  • Code golf: Reverse Polish notation (postfix) evaluator

    - by Dario
    After having had code-golf contests on ordinary mathematical expressions, I just thought it would also be quite interesting how short an evaluation function for postfix notation (RPN) can be. Examples for RPN: 1 2 + == 3 1 2 + 3 * == 9 0 1 2 3 + + - 2 6 * + 3 / 1 - == 1 3 2 / 2.0 + == 3.5 To make things shorter, only +, -, * and /, all just in their binary version, must be supported. Operators/Operands are delimited by one space, divsions by zero don't have to be handled. The resulting code should be a function that takes the postfix string as input and returns the resulting number.

    Read the article

  • WCF Service error on IIS with metadata

    - by Bruno Silva
    Hi, I'm trying to publish a service to IIS, it builds and runs OK on the ASP.NET dev server. When running in IIS I can get to the metadata by navigating to the service or by adding service reference in Visual Studio. But when I call a method from my client app it crashes with a internal server error. So I went to the Event Log and found this: WebHost failed to process a request. Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/8810861 Exception: System.Web.HttpException (0x80004005): There was no channel actively listening at 'http://mysite.net/soundhubservice.svc/$metadata'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening. ---> System.ServiceModel.EndpointNotFoundException: There was no channel actively listening at 'http://mysite.net/soundhubservice.svc/$metadata'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening. at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) Process Name: w3wp Process ID: 1080 My Web.Config looks something like this: <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <services> <service name="SoundHub.Services.SoundHubService" behaviorConfiguration="StreamingServiceBehavior"> <host> <baseAddresses> <add baseAddress="http://localhost/SoundHubServive"/> </baseAddresses> </host> <endpoint address="service" binding="basicHttpBinding" bindingConfiguration="httpBuffering" contract="SoundHub.Services.ISoundHubService"/> <endpoint address="stream" binding="basicHttpBinding" bindingConfiguration="HttpStreaming" contract="SoundHub.Services.ISoundHubStreamService"/> <!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />--> </service> </services> <bindings> <basicHttpBinding> <binding name="HttpStreaming" maxReceivedMessageSize="67108864" transferMode="Streamed"/> <binding name="httpBuffering" transferMode="Buffered" /> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="StreamingServiceBehavior"> <serviceMetadata httpGetEnabled="True"/> <serviceDebug includeExceptionDetailInFaults="False"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration> Tried several combinations of settings I found while searching online but nothing helped, always the same error. Thanks Bruno

    Read the article

  • How to handle request-wise DB transactions in ASP.NET MVC?

    - by Dario Solera
    I'm using SubSonic 3.0 (SimpleRepository) to handle database access in my ASP.NET MVC 1.0 application. It would be nice to handle a transaction for every web request, committing if everything went smooth and rolling back in case of exception. Is this possible? If so, how? I know this topic has been discussed many times, but I just couldn't find a satisfactory answer. I have built my own solution (create a TransactionScope in the controller, then commit/rollback in OnActionExecuted), but it turns out to be very unreliable.

    Read the article

  • How to "know" of iisreset on a webservice.

    - by Francisco Silva
    I have a webservice where I want to do something when a the application pool ends, so I thought I'd do: Application_End() { // Some logic here } What happens is if I stop the application pool, this logic is executed. On the other hand, if I just call iisreset, it is NOT. So my question is: where should I put my code so that it is executed in both cases?

    Read the article

  • How can I "git log" only code published to trunk?

    - by Russell Silva
    At my workplace we have a "master" trunk branch that represents published code. To make a change, I check out a working copy, create a topic branch, commit to the topic branch, merge the topic branch into master, and push. For small changes, I might commit directly to master, then push. My problem is that when I use "git log", I don't care about my topic branches in my local working copy. I only want to see the changes to the master branch on the remote, shared git server. What's more, if I use --stat or -p or one of their friends, I want to see the files and changes associated with the merge commit to master, not associated to their original branch commits (which, like I said, I don't want to see at all). How do I go about doing this?

    Read the article

  • getelementbyid issue with radio button

    - by Nelson Silva
    I'm trying to make an alert with the value of the selected radio button, but I allways get the first of them, regardless the one I choose...(Acompanhado); html: <form/> <input type="radio" class="simple_form" name="grupo_1" value="Acompanhado" id="saida"/> <span class="texto">Acompanhado</span> <input type="radio" class="simple_form" name="grupo_1" value="Individual" id="saida"/> <span class="texto">Individual</span> </form> js: function save() { var saida_js = document.getElementById('saida').value; alert("Tipo de saida: " + saida_js); } Any idea ?

    Read the article

  • Experiences with D-programming-language

    - by Dario
    Has someone here ever had experience with the D programming language? It seems to have many nice features but will it ever reach the popularity of those currently widespread languages like C++, Java or C#? So is it worth learning or is it an isolated language with minor prospects.

    Read the article

  • In what circumstances are instance variables declared as '_var' in 'use fields' readonly?

    - by Pedro Silva
    I'm trying to understand the behavior of the fields pragma, which I find poorly documented, regarding fields prefixed with underscores. This is what the documentation has to say about it: Field names that start with an underscore character are made private to the class and are not visible to subclasses. Inherited fields can be overridden but will generate a warning if used together with the -w switch. This is not consistent with its actual behavior, according to my test, below. Not only are _-prefixed fields visible within a subclass, they are visible within foreign classes as well (unless I don't get what 'visible' means). Also, directly accessing the restricted hash works fine. Where can I find more about the behavior of the fields pragma, short of going at the source code? { package Foo; use strict; use warnings; use fields qw/a _b __c/; sub new { my ( $class ) = @_; my Foo $self = fields::new($class); $self->a = 1; $self->b = 2; $self->c = 3; return $self; } sub a : lvalue { shift->{a} } sub b : lvalue { shift->{_b} } sub c : lvalue { shift->{__c} } } { package Bar; use base 'Foo'; use strict; use warnings; use Data::Dumper; my $o = Bar->new; print Dumper $o; ##$VAR1 = bless({'_b' => 2, '__c' => 3, 'a' => 1}, 'Foo'); $o->a = 4; $o->b = 5; $o->c = 6; print Dumper $o; ##$VAR1 = bless({'_b' => 5, '__c' => 6, 'a' => 4}, 'Foo'); $o->{a} = 7; $o->{_b} = 8; $o->{__c} = 9; print Dumper $o; ##$VAR1 = bless({'_b' => 8, '__c' => 9, 'a' => 7}, 'Foo'); }

    Read the article

  • In what circumstances are instance variables declared as '_var' in 'use fields' private?

    - by Pedro Silva
    I'm trying to understand the behavior of the fields pragma, which I find poorly documented, regarding fields prefixed with underscores. This is what the documentation has to say about it: Field names that start with an underscore character are made private to the class and are not visible to subclasses. Inherited fields can be overridden but will generate a warning if used together with the -w switch. This is not consistent with its actual behavior, according to my test, below. Not only are _-prefixed fields visible within a subclass, they are visible within foreign classes as well (unless I don't get what 'visible' means). Also, directly accessing the restricted hash works fine. Where can I find more about the behavior of the fields pragma, short of going at the source code? { package Foo; use strict; use warnings; use fields qw/a _b __c/; sub new { my ( $class ) = @_; my Foo $self = fields::new($class); $self->a = 1; $self->b = 2; $self->c = 3; return $self; } sub a : lvalue { shift->{a} } sub b : lvalue { shift->{_b} } sub c : lvalue { shift->{__c} } } { package Bar; use base 'Foo'; use strict; use warnings; use Data::Dumper; my $o = Bar->new; print Dumper $o; ##$VAR1 = bless({'_b' => 2, '__c' => 3, 'a' => 1}, 'Foo'); $o->a = 4; $o->b = 5; $o->c = 6; print Dumper $o; ##$VAR1 = bless({'_b' => 5, '__c' => 6, 'a' => 4}, 'Foo'); $o->{a} = 7; $o->{_b} = 8; $o->{__c} = 9; print Dumper $o; ##$VAR1 = bless({'_b' => 8, '__c' => 9, 'a' => 7}, 'Foo'); }

    Read the article

  • Why a thread is aborted in ASP.NET MVC (again)?

    - by Dario Solera
    Here is what I do in a controller action: create and start a new Thread that does a relatively long processing task (~30 seconds on average, but might be several minutes) immediately return the page response so the user knows processing has started (trivially, a Json with a task ID for polling purposes). At some random point, ThreadAbortException is thrown, so the async task does not complete. The exception is not thrown every time, it just happens randomly roughly 25% of the times. Points to note: I'm not calling Response.End or Response.Redirect - there isn't even a request running when the exception is thrown I tried using ThreadPool and I got the same behavior I know running threads in ASP.NET has several caveats but I don't care right now Any suggestion?

    Read the article

  • SQL AND operator not working properly

    - by Chandana De Silva
    I have following two tables LandParcels Table Blockid ParcelNo storPri ======= ======== ======= 52000105 3 State 52000105 4 Private 52000105 5 State Actions Table Blockid ParcelNo ActionTaken ======= ======== =========== 52000105 3 Received 52000105 3 Send to Computer 52000105 4 Received 52000105 5 Received I want to find the records Received but not Send to Computer Here is my query select l.blockid, l.parcelno from landparcels l left join actions ac on l.blockid = ac.blockid and l.parcelno = ac.parcelno where ac.actiontaken = 'Received' and ac.actiontaken <> 'Send to Computer' and ac.blockid = 52000105 The result is Blockid ParcelNo ======= ======== 52000105 3 52000105 4 52000105 5 I want ParcelNo 4 and 5

    Read the article

  • Hide Crystal Report Header

    - by Chandana De Silva
    Hi all, in my Crystal Report have a Page Header(section Page Header "a" and Page Header "b") and Groupe Header #1 and #2 My problem is, I want to hide Page Header "a" when Group #2 have more records, I want to print records next page without Page Header "a" Please reply me , its an urgent one.. Thanks in advance

    Read the article

  • How can I pipe two Perl CORE::system commands in a cross-platform way?

    - by Pedro Silva
    I'm writing a System::Wrapper module to abstract away from CORE::system and the qx operator. I have a serial method that attempts to connect command1's output to command2's input. I've made some progress using named pipes, but POSIX::mkfifo is not cross-platform. Here's part of what I have so far (the run method at the bottom basically calls system): package main; my $obj1 = System::Wrapper->new( interpreter => 'perl', arguments => [-pe => q{''}], input => ['input.txt'], description => 'Concatenate input.txt to STDOUT', ); my $obj2 = System::Wrapper->new( interpreter => 'perl', arguments => [-pe => q{'$_ = reverse $_}'}], description => 'Reverse lines of input input', output => { '>' => 'output' }, ); $obj1->serial( $obj2 ); package System::Wrapper; #... sub serial { my ($self, @commands) = @_; eval { require POSIX; POSIX->import(); require threads; }; my $tmp_dir = File::Spec->tmpdir(); my $last = $self; my @threads; push @commands, $self; for my $command (@commands) { croak sprintf "%s::serial: type of args to serial must be '%s', not '%s'", ref $self, ref $self, ref $command || $command unless ref $command eq ref $self; my $named_pipe = File::Spec->catfile( $tmp_dir, int \$command ); POSIX::mkfifo( $named_pipe, 0777 ) or croak sprintf "%s::serial: couldn't create named pipe %s: %s", ref $self, $named_pipe, $!; $last->output( { '>' => $named_pipe } ); $command->input( $named_pipe ); push @threads, threads->new( sub{ $last->run } ); $last = $command; } $_->join for @threads; } #... My specific questions: Is there an alternative to POSIX::mkfifo that is cross-platform? Win32 named pipes don't work, as you can't open those as regular files, neither do sockets, for the same reasons. 2. The above doesn't quite work; the two threads get spawned correctly, but nothing flows across the pipe. I suppose that might have something to do with pipe deadlocking or output buffering. What throws me off is that when I run those two commands in the actual shell, everything works as expected. Point 2 is solved; a -p fifo file test was not testing the correct file.

    Read the article

  • set up way of getting mysite.$domain

    - by jose silva
    Hi I have several domains, only one website and one databse table for each domain. example: wbesite.us - data from USA goes to database table main_usa wbesite.co.uk - data form UK goes to database table main_uk Only have one database with name of the website. Having only one website structured, and having variables like $sql="select * from main_".$countrycode." where bla..bla..., and many other variables to catch the domain extension, and so on... Now, instead of having one full website for each domain, how can set a script and wher do I put it in order to detect the domain that the user uses. In my server root do I create something like website.$domain ? Something like website OLX but for different purposes. I hope I made myself clear. Thank you.

    Read the article

  • Lightweight version control software on Linux

    - by I'm Dario
    I'm working with a shell account in a shared system and I would like to use some version control software for my bash scripts and config files. It must works on Linux with no dependencies, just unpack it in my home dir. I don't need remote checkout, branching or other fancy tricks. I want to be able to commit my changes and restore them if needed.

    Read the article

  • How do I propagate an exception thrown by croak in forked child to parent/foreground process?

    - by Pedro Silva
    Throwing an exception via croak in a forked child process seems to print the error as a background process would. That is, it clobbers the shell prompt. If I die instead of croak, the the error message pops up as a foreground process. I've trying to find out why that is in the Carp documentation without any luck. Here's what I mean. The croak version: $ perl Wrapper.pm $ error: ... does not exist at Wrapper.pm line 624 The die version: $ perl Wrapper.pm error: ... does not exist at Wrapper.pm line 515. I tried trapping the fork and printing $@ to STDERR and exiting, but that didn't have an effect. Any ideas? I'd like to be able to use croak in this particular case.

    Read the article

  • Picture changing in vb6

    - by Dario Dias
    I was trying this script from a pdf file.I got stuck where the target image should change to exploding image if clicked but the target image does not change from the standing image.Please Help! Option Explicit Dim fiPlayersScore As Integer Dim fiNumberofMisses As Integer Dim fbTargetHit As Boolean Private Sub Form_Load() Randomize imgTarget.Enabled = False imgTarget.Visible = False cmdStop.Enabled = False lblGameOver.Visible = False lblGameOver.Enabled = False End Sub Private Sub cmdStart_Click() Dim lsUserResponse As String Dim lbResponse As Boolean lsUserResponse = InputBox("Enter a level from 1 to 3." & _ (Chr(13)) & "" & (Chr(13)) & "1 being the Easiest and 3 being the " & _ "Hardest.", "Level Select", "1") lbResponse = False If lsUserResponse = "1" Then Timer1.Interval = 1500 lbResponse = True ElseIf lsUserResponse = "2" Then Timer1.Interval = 1000 lbResponse = True ElseIf lsUserResponse = "3" Then Timer1.Interval = 750 lbResponse = True Else MsgBox ("Game Not Started.") lbResponse = False End If If lbResponse = True Then cmdStart.Enabled = False imgTarget.Picture = imgStanding.Picture frmMain.MousePointer = 5 fbTargetHit = False Load_Sounds cmdStop.Enabled = True fiPlayersScore = 0 fiNumberofMisses = 0 lblScore.Caption = fiPlayersScore lblMisses.Caption = fiNumberofMisses Timer1.Enabled = True lblGameOver.Visible = False lblGameOver.Enabled = False End If End Sub Private Sub cmdStop_Click() Unload_Sounds frmMain.MousePointer = vbNormal Timer1.Enabled = False imgTarget.Enabled = False imgTarget.Visible = False cmdStart.Enabled = True cmdStop.Enabled = False cmdStart.SetFocus lblGameOver.Visible = True lblGameOver.Enabled = True End Sub Private Sub Form_Click() MMControl1.Command = "Play" MMControl1.Command = "Prev" fiNumberofMisses = fiNumberofMisses + 1 lblMisses.Caption = fiNumberofMisses If CheckForLoose = True Then cmdStop_Click lblMisses.Caption = fiNumberofMisses Exit Sub End If End Sub Private Sub imgTarget_Click() MMControl2.Command = "Play" MMControl2.Command = "Prev" Timer1.Enabled = False imgTarget.Picture = imgExplode.Picture '**I AM STUCK HERE** pauseProgram fiPlayersScore = fiPlayersScore + 1 Timer1.Enabled = True If CheckForWin = True Then cmdStop_Click lblScore.Caption = fiPlayersScore Exit Sub End If lblScore.Caption = fiPlayersScore fbTargetHit = True imgStanding.Enabled = False imgTarget.Visible = False imgTarget.Enabled = False Timer1.Enabled = True End Sub Public Sub Load_Sounds() 'Set initial property values for blaster sound MMControl1.Notify = False MMControl1.Wait = True MMControl1.Shareable = False MMControl1.DeviceType = "WaveAudio" MMControl1.FileName = _ "C:\Temp\Sounds\Blaster_1.wav" 'Open the media device MMControl1.Command = "Open" 'Set initial property values for grunt sound MMControl2.Notify = False MMControl2.Wait = True MMControl2.Shareable = False MMControl2.DeviceType = "WaveAudio" MMControl2.FileName = _ "C:\Temp\Sounds\Pain_Grunt_4.wav" 'Open the media device MMControl2.Command = "Open" End Sub Private Sub Timer1_Timer() Dim liRandomLeft As Integer Dim liRandomTop As Integer imgTarget.Visible = True If fbTargetHit = True Then fbTargetHit = False 'imgTarget.Picture = imgStanding.Picture End If liRandomLeft = (6120 * Rnd) liRandomTop = (4680 * Rnd) imgTarget.Left = liRandomLeft imgTarget.Top = liRandomTop imgTarget.Enabled = True imgTarget.Visible = True End Sub Public Function CheckForWin() As Boolean CheckForWin = False If fiPlayersScore = 5 Then CheckForWin = True lblGameOver.Caption = "You Win.Game Over" End If End Function Public Function CheckForLoose() As Boolean CheckForLoose = False If fiNumberofMisses = 5 Then CheckForLoose = True lblGameOver.Caption = "You Loose.Game Over" End If End Function Private Sub Form_QueryUnload(Cancel As Integer, _ UnloadMode As Integer) Unload_Sounds End Sub Public Sub Unload_Sounds() MMControl1.Command = "Close" MMControl2.Command = "Close" End Sub Public Sub pauseProgram() Dim currentTime Dim newTime currentTime = Second(Time) newTime = Second(Time) Do Until Abs(newTime - currentTime) = 1 newTime = Second(Time) Loop End Sub

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >