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
J

Joshua Lunsford

@Joshua Lunsford
About
Posts
65
Topics
28
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • REGEX start and end
    J Joshua Lunsford

    T./?O

    C# question regex help tutorial

  • Scaling a Polygon
    J Joshua Lunsford

    I think I have to plug my values into a matrix and scale the vectors based off of a reference point(like you said) which I'm just going to cheat and find the average of the X coords and the Y coords for that reference point. But the Matrix.Scale method doesn't support a certain reference point so i would have to extend the method and thats a pain, or i'm just lazy. But if anyone has done such a thing(scaling a 2d polygon from a reference point) please assist. Thanks!

    C# help question graphics performance

  • Scaling a Polygon
    J Joshua Lunsford

    I have an application that creates hotspots for an imagemap in a asp page. It has the function to place rect, circle, and polygon(I.E. COORDS="639, 161, 671, 129, 699, 160, 669, 190") hotspot shapes. Another function on my mapping tool increases/decreases the sizes of the hotspots. This function is easy with rects and circles(increase radius or add/subtract the points on the rect), but I'm having an issue the polygon translation. I didn't want to instance the drawing class and have to convert to a in memory polygon object and translate back to a the coords... So, question is... anyone know the math to make this happen quickly? Looking for the quick fix with little overhead for my app.

    C# help question graphics performance

  • getting XY coords of mouse click from a ImageMap Control
    J Joshua Lunsford

    in the click event of a ImageMap control I need to know the x y position of the click relating to the Image(not the window)... Any know of a way?

    ASP.NET question

  • DetailsView control customizing
    J Joshua Lunsford

    I want some fields the edit/insert Mode in a DetailsView control to be multiline textboxes... There is no apparent option for this... anyone know a quick work around?

    ASP.NET question

  • Rotate array data question
    J Joshua Lunsford

    if i have a array string[] myArray = {"Wes","Josh","Dave"}; and i want to rotate the order ever so often programmically what is the best way to do that? The program will know when it wants dave to be first but then wes needs to be second and so forth.

    C# question data-structures

  • Detecting Framework executables and versions
    J Joshua Lunsford

    I want to be able to detect .net framework applications and version needed(1.0,1.1,2.0,3.0) applications,executables,and dlls on a PC. Is this possible?

    .NET (Core and Framework) csharp dotnet question announcement

  • Poll : average ASP.NET form dev time?
    J Joshua Lunsford

    because i like to build whole apps in one page(lots of panels).

    ASP.NET csharp css asp-net design help

  • Calender Control In ASP.NET
    J Joshua Lunsford

    the most basic: in the aspx page: lastyear nextyear in the code behind: private void Page_Load(object sender, System.EventArgs e) { if(!IsPostBack) Calendar1.SelectedDate = DateTime.Now; } private void LinkButton1_Click(object sender, System.EventArgs e) { Calendar1.SelectedDate = Calendar1.SelectedDate.AddYears(-1); Calendar1.VisibleDate = Calendar1.SelectedDate; } private void LinkButton2_Click(object sender, System.EventArgs e) { Calendar1.SelectedDate = Calendar1.SelectedDate.AddYears(1); Calendar1.VisibleDate = Calendar1.SelectedDate; } -- modified at 18:31 Tuesday 20th June, 2006

    ASP.NET csharp asp-net help tutorial question

  • execting .bat file.
    J Joshua Lunsford

    are you programming in a limited xp account? is so then dont. or is this running in a secure NT network? if so... what kind of premissions do you have and what external(things other than your computer) resources are you trying to reach.

    C# csharp help security question

  • Deploying SQL .MDF File [modified]
    J Joshua Lunsford

    emran834 wrote:

    My Reomote server (Lunarpages)

    probably doesn't use integrated security. Ask there tech support

    ASP.NET csharp help asp-net database sql-server

  • can you help me do ma first web page please ?
    J Joshua Lunsford

    most likely you have a invalid connection string to your database. make sure your premissions to the db are set correctly.

    ASP.NET help csharp asp-net database question

  • Calender Control In ASP.NET
    J Joshua Lunsford

    i would format a table around the calendar and place two linkbuttons on either side add have them add/subtract years from the cal object selected date and the onclick of those buttons change the selected date for the cal... sound ok?

    ASP.NET csharp asp-net help tutorial question

  • execting .bat file.
    J Joshua Lunsford

    using Microsoft.Win32; ... string fileName = "c:\\MYBATFILE.BAT"; string args = "YOUR ARGUMENTS GO HERE"; System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents=true; proc.StartInfo.FileName=fileName; proc.StartInfo.Arguments=args; proc.Start(); proc.WaitForExit(); proc.Close();

    C# csharp help security question

  • Windows Service with threading issues
    J Joshua Lunsford

    I have an issue with stopping threads in a windows service application I was wondering if anyone can help. let me set it up for you. In a windows service you have to use the OnStart method to initialize your application... but you cannot run any loops or sequence of events that contain loops or the state of the application will be in an "starting" service mode indefinitely. So I start a thread call Maint to handle the application. The application has threee main functions at the moment that interface with WAN file shares and a sql db. I run these parallel each in there own thread(and they dont interact with eachother). so in the OnStart method: maint Maint = new maint(); maintThread = new Thread(new ThreadStart(Maint.start)); maintThread.Start(); in that start method i call: importassets ia = new importassets(); importThread = new Thread(new ThreadStart(ia.importasset)); importThread.Start(); updatereg ur = new updatereg(); updateThread = new Thread(new ThreadStart(ur.runupdate)); updateThread.Start(); forcelogins fl = new forcelogins(); loginThread = new Thread(new ThreadStart(fl.runlogins)); loginThread.Start(); //This section forces the importThread to restart hourly int startTime = System.Environment.TickCount; int runTime = startTime+3600000; while(true) { int nowTime = System.Environment.TickCount; FAISservice fs = new FAISservice(); if(!fs.isRunning) break; if(runTime < nowTime) { importThread.Abort(); Thread.Sleep(3000); startImport(); runTime = nowTime+3600000; } Thread.Sleep(10000); } Now, all works fine until the OnStop() method gets called by the service being stopped or restarted. in the OnStop() method i run: isRunning = false; maintThread.Abort(); maint Maint = new maint(); Maint.stop(); and in the stop() method i call: importThread.Abort(); updateThread.Abort(); loginThread.Abort(); Now I'm locked in a "STOPPING" state and i have to kill the process... any clues? also... my above 3 threads start while(true) loops that only BREAK when isRunning=false.

    C# database help question workspace

  • Keeping the position on the page
    J Joshua Lunsford

    if using IE try SmartNavigation = true;

    ASP.NET question

  • Is this a bad way to multithread?
    J Joshua Lunsford

    Thread[] workerThread = new Thread[someInt]; for(int i = 0; i < someInt; i++) { string keyInfo = someKeyInfo().ToString(); workerThread[i] = new Thread(new ThreadStart(DoSomeWork(keyInfo))); workerThread[i].Start(); } foreach(Thread t in workerThread) { while(t.IsAlive()){} }

    C# question

  • Expanded Remote Registry Editing Issues
    J Joshua Lunsford

    Dave Kreskowiak wrote:

    Are you running in a domain environment? Does the account you're using have Administrator rights to the remote machine?

    Yes. Yes.

    C# csharp windows-admin help announcement

  • Expanded Remote Registry Editing Issues
    J Joshua Lunsford

    Having issues find solution in for Remote Registry editing. Yeah i got the remote viewing under control... With remote editing, I can do it with VBscript easy: Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") objReg.SetStringValue HKEY_LOCAL_MACHINE,strPointerKey,strPointerEntry,strPointerValue objReg.CreateKey HKEY_LOCAL_MACHINE,strMyKey surely .NET can do it. this is what i tried: RegistryKey LM = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,WSID); RegistryKey inventoryKeys = LM.OpenSubKey("SOFTWARE\\CompanyName\\AppName"); inventoryKeys.SetValue("ValueName","Value"); and the error message is: Get REG values: System.UnauthorizedAccessException: Cannot write to the registry key. at Microsoft.Win32.RegistryKey.ValidateState(Boolean needWrite) at Microsoft.Win32.RegistryKey.SetValue(String name, Object value) at testReg.Class1.update() in c:\projects\testreg\class1.cs:line 48: 03/24/20 06 02:41:01 PM

    C# csharp windows-admin help announcement

  • Remote Registry editing?
    J Joshua Lunsford

    Yeah i got the remote viewing under control... With remote editing, I can do it with VBscript easy: Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") objReg.SetStringValue HKEY_LOCAL_MACHINE,strPointerKey,strPointerEntry,strPointerValue objReg.CreateKey HKEY_LOCAL_MACHINE,strMyKey surely .NET can do it. this is what i tried: RegistryKey LM = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,WSID); RegistryKey inventoryKeys = LM.OpenSubKey("SOFTWARE\\CompanyName\\AppName"); inventoryKeys.SetValue("ValueName","Value"); and the error message is: Get REG values: System.UnauthorizedAccessException: Cannot write to the registry key. at Microsoft.Win32.RegistryKey.ValidateState(Boolean needWrite) at Microsoft.Win32.RegistryKey.SetValue(String name, Object value) at testReg.Class1.update() in c:\projects\testreg\class1.cs:line 48: 03/24/20 06 02:41:01 PM -- modified at 14:58 Friday 24th March, 2006

    C# csharp windows-admin question announcement
  • Login

  • Don't have an account? Register

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