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
K

kasik

@kasik
About
Posts
53
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • BIOS Flashing
    K kasik

    Hi, Thanks for the suggestions, I shall look into them soon (I'm a bit busy at the moment with a big coursework project).

    Sebastian Schneider wrote:

    Probably not a good idea. If the power fails during the flash, chances are that the laptop will keep running from the battery.

    Very good point, I shall charge it and leave it in.

    Sebastian Schneider wrote:

    I don't believe the BIOS is the problem of your recurring start-up trouble. If it was, the boot sequence should fail every time.

    Really? I did some research into the issue, before I came to the conclusion it was my BIOS, and found this PDF[^] which talks about the introduction of 48bit addressing support in ATA-6. On page 6 in the "Solutions exist!" section:

    Solutions exist!

    Most motherboards have built-in connectors for the hard drive and CD-ROM drives. 40-pin ribbon cables connect the drives to the motherboard. These motherboard connectors are often labeled IDE Channel 0 and Channel 1. They are also called Primary Port and Secondary Port. Both are the same. The system BIOS auto-detects the hard disc drive and issues an inquiry to get the drive's number of LBAs. The largest number it is prepared to receive may be 137GB. In this case you might check with your system manufacturer for a BIOS upgrade. Many namebrand systems have the ability to "flash" the BIOS with new firmware.

    This is what my BIOS is doing. It's reading the size of the hard drive as 137GB exactly. Also from the same page of the pdf:

    Solutions exist!

    Without proper support, writing or saving data past the boundary line will wrap around to the front of the file system and overwrite all of your file system information, effectively erasing your drive.

    This is the part that made me think it's the problem I'm having - I exceed the 137GB limit and end up writing data over the MBR, etc. Please say so if you still think I'm wrong about this, but to me it looks like this is the issue I'm having Many thanks, Will.


    “Accept that some days you are the pigeon, and som

    Hardware & Devices adobe help question

  • BIOS Flashing
    K kasik

    Thanks for the tips :)

    Dave Kreskowiak wrote:

    Attach it to AC power and make sure the machine is charging the battery.

    Do you think it would be better to remove the battery and have it run purely on AC power?

    Dave Kreskowiak wrote:

    right after you type your password and hit Neter, hold down the Shift key to stop Windows from loading all the automatic startup junk.

    I never knew you could do that - very handy :)

    Dave Kreskowiak wrote:

    You can take all the precautions in the world, but that's no guarantee that the upgrade won't fail.

    Yeah, I guess I'm just going to have to do it hope for the best. Thanks for all the help, Will


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent

    Hardware & Devices adobe help question

  • BIOS Flashing
    K kasik

    Thanks for the reply,

    dan neely wrote:

    For a desktop you can generally get the mobo maker to send a replacement chip for a small ($10ish) fee/deposit. for a laptop though I suspect you may have to send it back to the manufacturer.

    My laptop's quite a long while out of warranty which is worrying. Hmm I guess I'm just going to have to bite the bullet and just do it :sigh: Thanks again, Will


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent

    Hardware & Devices adobe help question

  • BIOS Flashing
    K kasik

    Hi, I've recently upgraded my (Dell Inspiron 8500 - about 3 years old) laptop's internal hard drive to a 160GB Seagate. I've had it for a few months now and every month or so when booting it would get passed the POST, then leave me with a flashing underscore in the top left. Windows wouldn't start (even after playing with fixmbr and fixboot in the recovery console) so I've had to reinstall. This has happened twice since I installed it. After playing around and trying to think of reasons why this was happening, I noticed that the BIOS reported the size of the hard drive as 137GB and not the full 160GB (not even the 149GB after formatting). After some googling I'm fairly certain it's because of a lack of 48bit LBA support (ATA-6). This seems to be fixed in most cases by upgrading the BIOS (i'm on v3 currently and the newest available is v8, so it should, hopefully, work). I am a little anxious about performing a BIOS flash because if it were to go wrong I'd be left with an expensive paper-weight, wouldn't I? What's your experience with upgrading BIOSs? The program that performs the flash is advertised as being able to be run straight from Windows (and it will shut down, reboot, flash, then reboot for you) or from a bootable pure DOS disk. Are there advantages to the latter technique? I've heard people say that it's safer, but I can't really see why. Many thanks for any help :) Will.


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent

    Hardware & Devices adobe help question

  • What OS are you?
    K kasik

    "You are Apple Dos 3.1. Simple and primitive with a good understanding of the common man. You're still a work in progress, but a good start." :(


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent Cheers, Will

    The Lounge javascript php css com linux

  • Read location in .lnk (shortcut) file
    K kasik

    You can use the Windows Script Host Object Model COM library for this. If you're using Visual Studio, add a reference to it by selecting the COM tab from the Add Reference dialog and select "Windows Script Host Object Model". This will create an interop assembly called Interop.IWshRuntimeLibrary and will reference that. Then you can use the following code to extract the target file from a .lnk file...

    using IWshRuntimeLibrary;
     
    ...
     
    WshShell shell = new WshShell();
    IWshShortcut link = (IWshShortcut)shell.CreateShortcut( linkPath ); //where linkPath is the filepath to the .lnk file
     
    Process.Start( link.TargetPath ); //link.TargetPath points to the file the link targets

    Hope that helps :)


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent Cheers, Will

    C# adobe question

  • more assemblies to one assembly
    K kasik

    Take a look at ILMerge[^] :)


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent Cheers, Will

    C# question

  • Embarrassed - Simple Form Question
    K kasik

    Angel1058 wrote:

    'Close()'. Does that destroy the window?

    If you mean will secondform be a null pointer after it's called, then no. Close() disposes the form and it's contents, and destroys it's window handle, but comparing secondform to null (like you're doing in your OnClickEvent() method) will return false. You can use the IsDisposed property of the Form to check to see if the form has been disposed, and that should work (but you'd have to check if it's null first)...

    if ( secondform == null || secondform.IsDisposed )
    secondform = new MyForm(data_for_form_listbox)

    Hope that helps :)


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent Cheers, Will H

    C# csharp question c++ tutorial

  • Short Keys to Window Form
    K kasik

    If you want to catch Ctrl+S you can override ProcessCmdKey in your Form derived class, like this...

    protected override bool ProcessCmdKey ( ref Message msg, Keys keyData )
    {
        const int WM_KEYDOWN = 0x100;
        
        if ( msg.Msg == WM_KEYDOWN && keyData == ( Keys.Control | Keys.S ) )
        {
            MessageBox.Show("You have pressed Ctrl+S");
            return true;
        }
        
        return base.ProcessCmdKey( ref msg, keyData );
    }
    

    Hope that helps :)


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent Cheers, Will

    C# csharp question

  • Speech programming
    K kasik

    I'm sorry, but I have never used this method. I haven't used XML files for use with SAPI either. I think your best bet would be to ask again in the forums, or just try and attempt it and see what happens. Sorry I couldn't be of more help.


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent Cheers, Will H

    C# csharp graphics docker

  • PInvoke stack balance detected?
    K kasik

    Rashar wrote:

    Private Declare Function InternetAttemptConnect Lib "wininet" (ByVal dwReserved As Long) As Long

    Try changing that to...

    Private Declare Function InternetAttemptConnect Lib "wininet" (ByVal dwReserved As Integer) As Integer

    Hope that helps :) In fact I think InternetOpen will also throw this error - you will need to change the parameters lAccessType As Long and lFlags As Long to be Integers, as well as the return value. You can use pinvoke.net[^] to look for Win32 API method signatures in C# and VB.Net.


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent Cheers, Will H -- modified at 13:32 Thursday 4th May, 2006

    Visual Basic algorithms data-structures tutorial question

  • C# GDI+
    K kasik

    You could try setting the Graphics.SmoothingMode property to HighSpeed before you draw the lines, like this...

    e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed;

    Hope that helps :)


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent Cheers, Will H

    C# graphics csharp winforms performance tutorial

  • Speech programming
    K kasik

    From what I can see, you dont appear to have started grammar (I assume button2_Click is the method that you want to start the recognition). Try placing the following code at the end of that method...

    grammar.DictationSetState(SpeechRuleState.SGDSActive);

    Just a guess :)


    “Accept that some days you are the pigeon, and some days you are the statue” -- David Brent Cheers, Will H

    C# csharp graphics docker

  • Find File Owner Using .NET 2.0
    K kasik

    is251rd wrote:

    Dim user As NTAccount = s.GetOwner(NTAccount)

    Change that to

    Dim user As NTAccount = s.GetOwner(GetType(NTAccount))

    is251rd wrote:

    The For-Next loop is just to keep the console window open long enough to see what was written.

    Have you tried Console.ReadLine()? That'll keep the window open until you hit enter :) Cheers, Will H

    Visual Basic csharp c++ com security help

  • How to detect the style of user window?
    K kasik

    To add it to a module you'll have to do two things... 1) Change the line

    Private Shared Function IsThemeActive() As Boolean

    to

    Public Function IsThemeActive() As Boolean

    (i.e. remove the word Shared and change the functions visibility to Public) 2) Add

    Imports System.Runtime.InteropServices

    to the top of your file. I havent done any VB.Net in a while so I hope that works :) Cheers, Will H

    Visual Basic question tutorial

  • How to detect the style of user window?
    K kasik

    You can P/Invoke UxTheme.dll which controls the window styles in XP like this...

    <DllImport("UxTheme.dll", _
    CallingConvention:=CallingConvention.Winapi, _
    CharSet:=CharSet.Auto)> _
    Private Shared Function IsThemeActive() As Boolean
    End Function

    If this function returns true, the user is running a theme, if it returns false then the user is running 'Windows Classic Style' - no themes. Hope this helps :) Cheers, Will H

    Visual Basic question tutorial

  • progressbar problem
    K kasik

    Ravi Bhavnani wrote:

    this.DoEvents();

    You mean

    Application.DoEvents();
    

    no? :) Cheers, Will H

    C# help

  • programing Internet Explorer
    K kasik

    ranzask wrote:

    since the script is local on my computer, it do not alert any security issues when i execute a program using Shell.run("blabla.exe")

    That seems like a much better way than my idea. I'm glad you've got it sorted :) Cheers, Will H

    C# question

  • programing Internet Explorer
    K kasik

    I'm sorry but I have no experience with JavaScript at all. It seems to be quite difficult to launch an external program from a script though, for security reasons. I did, however, find this[^] discussion. There is one part that may interest you:

    IF you have access to each client to add a regsitry key you can do what you want seamlessly ...
    To execute c:\my prog\prog.exe %a %b %c

    Add to a new key to HKEY_CLASSES_ROOT called 'myprog'
    Add an empty string to this key called 'URL Protocol'
    Add the sub-keys: \shell\open\command
    Set the value of the default string inside the command key to: "c:\my prog\prog.exe %1"

    On your web page have your link as:
    <A HREF="myprog: %a %b %c">run myprog</A>

    (%a, %b and %c are arguments i think). I know you are doing this from a script, but you can probably do some sort of redirect to call the link. I have no idea, but

    location.href= "myprog: %a %b %c";

    might work. Maybe you could try asking about how to run a program on the client computer when you have access to the registry in a JavaScript specific forum. Sorry I can't be of more help. Cheers, Will H

    C# question

  • programing Internet Explorer
    K kasik

    You might want to take a look at this[^] article from MSDN. You will need to use 0x20 as the value of your Contexts registry key so that it only works on links. Once you've added the necessary registry keys, you're going to need to write a script that loads your C# application and passes it the information about the link clicked (take a look at number 2 of the "Implementation Steps" section of the link above for some links about writing this script). Hope this helps :) Cheers, Will H

    C# question
  • Login

  • Don't have an account? Register

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