Cyber Axe

Member
  • Content count

    65
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Cyber Axe

  • Rank
    Geek
  • Birthday 12/27/1984

Contact Methods

  • Website URL
    http://www.cyberaxe.net/
  1. What I am attempting to do is when the appropriate DIV is clicked it adds a class that the CSS tells it how to display that bit works fine. What doesn't work is the fadeout that is supposed to occur after that #HeaderFade is the parent of #Header, what should happen is that the #HeaderFade's class is changed to the class that will display the appropriate background then #Header should be set to the same class afterwards so that it displays the same image after the fadeout occurs, then #Header is "invisibly" faded back in so that the next time it is clicked it will work for the next set of images. I've also been unable to figure out how to stop the previous delayed action from the previous click to stop if you click on another one so that it doesn't result in sporadic time changing. I know the following code is rather inefficient since I'm manually setting an event per ID instead of creating one function that can dynamically do it for each div but I've yet to figure out the best way to do stuff like that in jQuery. <div id="HeaderFade"><div id="Header" class="HeaderOffer1"><div id="Header-Overlay"><div id="Logo"><a href="#"><img src="m/t.png" title="Stephen Clark Fitness: Perthshire and Tayside personal training." alt="Stephen Clarke Fitness Logo" /></a></div><div id="OffersContainer"> <div id="Offers"> <div id="OfferContent"> <p id="Offer1Text" class="OfferText"><a href="#">Stephen Clarke fitness are now the health and fitness experts for Radio Tay and Perthshire online TV.</a></p> <p id="Offer2Text" class="OfferText Inactive"><a href="#">Read more about our Dundee Personal Training here.</a></p> <p id="Offer3Text" class="OfferText Inactive"><a href="#">The route to success begins with a KICKSTART, Full consultation, health check, nutrition review and exercise programme for just £80.</a></p> <div id="OffersBox"> <div id="Offer1" class="Offer OfferActive"></div> <div id="Offer2" class="Offer"></div> <div id="Offer3" class="Offer"></div> </div> </div> </div> <script type="text/javascript"> $('#Offer1').click(function(){ $('.OfferText').addClass('Inactive'); $('.Offer').removeClass('OfferActive'); $(this).addClass('OfferActive'); $('#Offer1Text').removeClass('Inactive'); $('#HeaderFade').removeClass('HeaderOffer2'); $('#HeaderFade').removeClass('HeaderOffer3'); $('#HeaderFade').addClass('HeaderOffer1'); $('#Header').fadeout(400, function() { $('#Header').removeClass('HeaderOffer2'); $('#Header').removeClass('HeaderOffer3'); $('#Header').addClass('HeaderOffer1'); $('#Header').fadein('fast'); }); $('#Offer1').clearQueue(); $('#Offer2').clearQueue(); $('#Offer3').clearQueue(); $(this).delay(7000).queue(function(){ $('#Offer2').trigger("click"); $(this).dequeue(); }); }); $('#Offer2').click(function(){ $('.OfferText').addClass('Inactive'); $('.Offer').removeClass('OfferActive'); $(this).addClass('OfferActive'); $('#Offer2Text').removeClass('Inactive'); $('#HeaderFade').removeClass('HeaderOffer1'); $('#HeaderFade').removeClass('HeaderOffer3'); $('#HeaderFade').addClass('HeaderOffer2'); $('#Header').fadeout(400, function() { $('#Header').removeClass('HeaderOffer1'); $('#Header').removeClass('HeaderOffer3'); $('#Header').addClass('HeaderOffer2'); $('#Header').fadein('fast'); }); $('#Offer1').clearQueue(); $('#Offer2').clearQueue(); $('#Offer3').clearQueue(); $(this).delay(7000).queue(function(){ $('#Offer3').trigger("click"); $(this).dequeue(); }); }); $('#Offer3').click(function(){ $('.OfferText').addClass('Inactive'); $('.Offer').removeClass('OfferActive'); $(this).addClass('OfferActive'); $('#Offer3Text').removeClass('Inactive'); $('#HeaderFade').removeClass('HeaderOffer1'); $('#HeaderFade').removeClass('HeaderOffer2'); $('#HeaderFade').addClass('HeaderOffer3'); $('#Header').fadeout(400, function() { $('#Header').removeClass('HeaderOffer1'); $('#Header').removeClass('HeaderOffer2'); $('#Header').addClass('HeaderOffer3'); $('#Header').fadein('fast'); }); $('#Offer1').clearQueue(); $('#Offer2').clearQueue(); $('#Offer3').clearQueue(); $(this).delay(7000).queue(function(){ $('#Offer1').trigger("click"); $(this).dequeue(); }); }); $(document).ready(function() { $('#Offer2').delay(7000).queue(function(){ $('#Offer2').trigger("click"); $(this).dequeue(); }); }); </script> </div> Thanks
  2. Ive Made a query and for one of the columbs i want to check if the data exists ont eh table if so then it will display that data if not then it will calculate the value between two dates, it works except for getting the value of the table data, all the date calulation and the check seems to work its just the second part of the iif that should display the code from the table [Client Data].[Number of Weeks] and botht eh names are correct but it jsut outputs #Error when it should output the value. Number of Weeks: IIf([Client Data].[Number of Weeks] != "", [Client Data].[Number of Weeks], DateDiff("ww", [Client Data].[start Date], DateAdd("d", 8-Weekday([Client Data].[Expected End Date], 2), [Client Data].[Expected End Date]))) Any help would be appriciated, thanks.
  3. Thanks. (sorry for late reply had troubles getting into my account)
  4. Does anyone know if its possible to make an installation disk that can install both home and pro and install various license versions? It's more important i can have multiple license types over having pro and home together As we have various license types and it would be nice to be able to use one disk to do everything
  5. the program i am making is basically an app that is an overhead map of the room layout with all the computers listed on it when you move the mouse over a button that corresponds to the pc it pings the pc to see if its on or off, if it is off then it doesn't do anything if it is on then it shows a context menu of options. the function works fine if the dns server has that hostname setup however if that hostname is not on the pc then it takes an unacceptable amount of time to complete, the ping timeout doesnt appear to effect dns response and so thats why i added the dns resolve code at the start to try and find a method around that. i just tried using the winapi stuff using gethostbyname however thats not really going to work for me it seems as it has problems when it comes to std::strings and System::Strings i'm getting conflicts i cant fix as it wants to convert one to the other or vice versa and fails.
  6. 5ms seems to be plenty of time when i ping any hostname on the lan and that hostname is valid and the computer accepts icmp echo requests then the reply is obtained usualy beteen 2 and 4 ms, this function will only be used on lan side the reason i'm doing a dns resolve before the ping is so i can see if the dns will resolve if it doesnt withing 5ms or possibly slightly longer delay then return false else let the code continue so it can ping. it's the dns resolve that takes ages if the dns hostname is invalid, which i want to get around by using async then after 5ms see if it has finished if not then return false
  7. trying to use asynchronus method again but cannot find a way of getting the status of the async attempt once it has began, so that if it hasn't resolved after sleep is finished it returns false and stops the attempt. bool pingTargetHost(System::String^ stringHostName) { System::AsyncCallback^ callback = gcnew AsyncCallback(ProcessDnsResults); System::Object^ state; Dns::BeginGetHostEntry(stringHostName, callback, state); System::Threading::Thread::Sleep(5); //ResolveState^ ioContext = (ResolveState^)( callback->AsyncState ); //ioContext->IPs = Dns::EndGetHostEntry( ar ) //System::IAsyncResult^ testresult = callback; //Dns::EndGetHostEntry(testresult); if (testresult->IsCompleted == false) { return false; } Ping ^ pingSender = gcnew Ping; int timeout = 5; PingReply ^ reply; try { reply = pingSender->Send(stringHostName, timeout); } catch (Exception^ exceptionPING) { String^ stringException = exceptionPING->Message; return false; } if (reply->Status == IPStatus::Success) { return true; } else { return false; } }
  8. Visual C++ 2008 (i put it in the subtopic) bool pingTargetHost(System::String^ stringHostName) { //try { // IPHostEntry^ host = Dns::GetHostEntry(stringHostName); //} //catch (Exception^ exceptionResolve) { // return false; //} Ping ^ pingSender = gcnew Ping; int timeout = 5; PingReply ^ reply; try { reply = pingSender->Send(stringHostName, timeout); } catch (Exception^ exceptionPING) { return false; } if (reply->Status == IPStatus::Success) { return true; } else { return false; } } The commented out bit i want to check for dns resolve first and have a timeout of like 5 milliseconds, i had deleted my earlier attempt at asynchronous version. Want to check that the hostname resolves first so that the ping doesn't have the same timeout problem in the event it can resolve.
  9. Does anyone know of an easy way to resolve a hostname to IP Address with the ability to time out? GetHostEntry just takes too long if it can't resolve, I've tried setting up a function similar to this using the Asynchronus version that would start lookup wait a certian amount of milliseconds then end though i dont really understand how it works properly so that attempt failed. Thanks
  10. I managed to figure out how to get the X and Y values though i now have the problem of that it seems to be offset to the curser the same amount as the width of the window border and the height of the window top border
  11. I'm using Visual C++ 2008 and am trying to create a context menu when clicking on a button, i have managed to get the context menu to show when the button is clicked however it appears offset to the window the same amount that the window is form the top left of the screen. I'm going to be reusing the code for various other buttons so do not want to use any button specific names in the code. i know i can get it appearing where i want it if i could subtract the values of this->Location from this->MousePosition but have been unable to get the specific X and Y values from them , and cannot find any decent info on Point's so i can convert them to integers. private: System::Void button_Click(System::Object^ sender, System::EventArgs^ e) { contextMenuPCOptions->Show(this, this->MousePosition); } Any Help would be appreciated, thanks.
  12. Thanks for the replies, will try them out on mnday (as i'm only there monday and tuseday) wish i knew about SteadyState sooner, i've been using a trial of 1st security agent to do what SteadyState seems to do for free (i've downloaded it but not looked at it yet in detail) Though most likley wont be able to use DeepFreeze as there si no budget whatsoever for PC stuff (charity funded everythng donated) Thanks
  13. I Administer a load of computers at a place I volunteer that all run windows XP Home, but one annoying thing keeps happening, people (well ok one person) has managed to get around all my blocks (disabling of the desktop properties and so forth) and can change the wallpaper. I believe she does it in internet explorer (which I thought I had managed to disable), and it’s annoying resetting it back to the one I want as I have to log out of the guest account log into the admin account disable the restrictions on the desktop so I can go back to guest and change it then put all the restrictions back again. I do have the ability of removing the right click menu from IE however that is not an option as the users need the ability to save images and such from time to time. Does anyone know of a way to remove the ability to set image as wallpaper in IE? Or does anyone know if it’s possible to set a desktop theme from the command line? Then I might be able to set it to the theme I want at start-up. Thanks
  14. i am trying to temporarily change a system colour and then change it back when the probram ends however all the SetSysColors seems to do is return a number it doesnt change any system colours or anything heres all the code for the system colour change Declare Function SetSysColors Lib "user32" Alias "SetSysColors" (ByVal nChanges As Long, ByVal lpSysColor As Long, ByVal lpColorValues As Long) As Long Public Const COLOR_SCROLLBAR = 0 'The Scrollbar colour Public Const COLOR_BACKGROUND = 1 'Colour of the background with no wallpaper Public Const COLOR_ACTIVECAPTION = 2 'Caption of Active Window Public Const COLOR_INACTIVECAPTION = 3 'Caption of Inactive window Public Const COLOR_MENU = 4 'Menu Public Const COLOR_WINDOW = 5 'Windows background Public Const COLOR_WINDOWFRAME = 6 'Window frame Public Const COLOR_MENUTEXT = 7 'Window Text Public Const COLOR_WINDOWTEXT = 8 '3D dark shadow (Win95) Public Const COLOR_CAPTIONTEXT = 9 'Text in window caption Public Const COLOR_ACTIVEBORDER = 10 'Border of active window Public Const COLOR_INACTIVEBORDER = 11 'Border of inactive window Public Const COLOR_APPWORKSPACE = 12 'Background of MDI desktop Public Const COLOR_HIGHLIGHT = 13 'Selected item background Public Const COLOR_HIGHLIGHTTEXT = 14 'Selected menu item Public Const COLOR_BTNFACE = 15 'Button Public Const COLOR_BTNSHADOW = 16 '3D shading of button Public Const COLOR_GRAYTEXT = 17 'Grey text, of zero if dithering is used. Public Const COLOR_BTNTEXT = 18 'Button text Public Const COLOR_INACTIVECAPTIONTEXT = 19 'Text of inactive window Public Const COLOR_BTNHIGHLIGHT = 20 '3D highlight of button Public Const COLOR_2NDACTIVECAPTION = 27 'Win98 only: 2nd active window color Public Const COLOR_2NDINACTIVECAPTION = 28 'Win98 only: 2nd inactive window color Public Commands As String = Command() Public Sub ChangeSystemColour(ByVal Red As Integer, ByVal Green As Integer, ByVal Blue As Integer) varColourChanged = True ' System Colours have Changed SetSysColors(1, COLOR_WINDOW, RGB(Red, Green, Blue)) End Sub
  15. i've written a wrapper for another app that basically just puts a window on top of another application so it is graphically more appealing Public Class frmWrapper Private Sub frmWrapper_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim Commands As String = Command() If Commands = Nothing Then MsgBox("You must specify the IPC File you wish to load.", MsgBoxStyle.Exclamation) ElseIf System.IO.File.Exists(Commands) = False Then MsgBox("Cannot find " + Chr(32) + System.IO.Path.GetFileName(Commands) + Chr(32) + ".", MsgBoxStyle.Exclamation) Else frmBackdrop.Show() frmOverlay.Show() Dim objWSH As Object objWSH = CreateObject("WScript.Shell") Commands = "WinIPAC.exe" + Chr(32) + Commands.Replace(Chr(34), Nothing) objWSH.Run(Commands, 1, True) frmOverlay.Close() frmBackdrop.Close() End If End End Sub End Class There are a few things I’d like to do but I don’t know if it’s possible or how to do them since I’ve not been able to find any info after searching first of all one thing I’d like to do is after a certain period of time like 10 seconds or so if the application is still running then I get my wrapper to close it and then rerun until it doesn’t need to be closed (the program that’s being run should only take about 3 seconds to run and but if it returns an error such as a timeout it wont go away till the user clicks the close button) Another thing I would like to do is the ability to resize and change the position of the window and finally if its possible get text from a textbox that the window has so I can echo it on my wrapper instead of having to depend on overlaying a window this would make the above 2 things redundant since I wouldn’t need to wait nor would I need to manipulate the window position or size Anyone got any info on how to do any of this?