Software Development Network Logo
  • VS Team System
  • Game Technologies
  • Visual C++
  • Visual Studio
  • SharePoint Products
  • Microsoft ISV
  • Visual FoxPro
  • .NET Development
  • Windows Vista
  • SQL Server
  • Audio and Video
  • Windows Forms
  • IE Development
  • Smart Devicet
  • Visual C#

Software Development Network >> Casper Thomsen's Q&A profile

Casper Thomsen

Member List

integerjohnsmith
John Wesley Harding
boaz_b
delas
Sunil_D
Wee Bubba
黃泓量 Jeremy Wong
dmadrian
AlexanderO
Kennon2005
Leifton
dotnetscot
Leon Mayne
ste72
chriserin
AeX
User_whatever12
ezikiho
ramseys
My Vizai
Only Title

Casper Thomsen's Q&A profile

  • Visual Basic Detection of Insertion and Removal of USB devices

    I am having problem with my FYP that my application is based on the detection of Insertion and Removal of a device. I am aware that this would happen using Win32_VolumeChangeEvent class or WMI. (Please notify me if I am wrong). Kindly solve this problem and send the code for Console Application in VB.NET. Please do not send code in any script language or C#. Also to get the device information. Hi, Rabtok, With your code, it is able to detect a mass storage device plugging/removing. For a non-mass storage device (e.g.: a microcontroller based USB control board), how can we detect a device plugging/removing When I plug/remove the USB device, the windows does raise m_MediaConnectWatcher.EventArrived event. Could you give me ...Show All

  • Visual Basic VBS Script "my network places"

    I have the following script I found on the MS site for adding my network places shortcuts which works great. I would also like to remove some shortcuts but I can't get it to work. At the bottom is my problem. I am a sys admin with little programming knowledge - pls help. Const NETHOOD = &H13& Set objWSHShell = CreateObject("Wscript.Shell") Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(NETHOOD) Set objFolderItem = objFolder.Self strNetHood = objFolderItem.Path strShortcutName = "Win2000" sreShortcutComments = "test" strShortcutPath = " \\win2000\share " Set objShortcut = objWSHShell.CreateShortcut _ (strNetHood & "\" & strShortcutName & ".lnk") objShortcut.TargetP ...Show All

  • Visual Studio 2008 (Pre-release) Chroma keying on video in WPF

    Hi, I'm wondering if it is possible to do chroma keying on video's in WPF. If it is possible, how do you do it (sample ). If it is not possible, is this feature on the roadmap Best regards, Kris Tom, thanks for the great news. Will the alpha channel support be there in the final release of the .NET Framework 3.0 Kris ...Show All

  • Visual Basic figuring out chars in a string (parsing)

    This should be a simple question to answer to the right person. I have been trying to figure out a way to do the foolowing but can't seem to come up with it. I have a string that will change (directory path). I want to know if the folder (at the end of the string is 'Desktop' even if it is 'Desktop\' How can I do this if I have the file path I figure i need something to get the variables on the right of the string somehow. Any help would be appreciated. Thanks! This is helpful but not exactly what I was looking for in my situation. I ended up using the following solution. I appreciate your help! Dim newstring As String = pathoffolder.Substring(pathoffolder.Length - 7) if newstring = &quo ...Show All

  • Visual Basic get CPU info

    Hello friendz I'm developping a little software(just for learning Visual Basic ) and I'm pretty far. I want a form with all the specifications of the CPU. I know that I have to do it with WMI or API. My preference goes to WMI so forget API I read a lot of threads and stuff like that, but I can't find how to do it. What I want: every information about the CPU(e.g. name, temperature{have sensor}, ...) Can you guys help me out Thanks in advance Marnik You can get a lot of the information from the registry or my.Computer: Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click txtPID.Text = My .Computer.Registry.LocalMachine.OpenSu ...Show All

  • SQL Server How can we manually change the scales displayed on ProClarity Perspective Views?

    Hi, all here, Thank you very much for your kind attention. I still think here should be an ideal place for me to put my post here for help for ProClarity (with SQL Server 2005 Analysis Services) Would please any expert here give me any guidance and advices for if it is possible for users to change scales displayed on ProClarity Perspective views And if it is possible, how can we change it Thanks a lot in advance for that. With best regards, Yours sincerely, Good luck Helen. Perspective is not a chart. Have a look at colour coding and see what you can do. In this tool you can select leaf level members in a product dimension and colour code them at a highet level, like product categories. It is used , as an exa ...Show All

  • .NET Development Unable to locate Assembly asdlfkjasdfkljasd

    OK, this one is a real head scratcher. I have a paticuarl application on my beta server that flips out almost every time I modify the source code. It gives me an error saying that the cached assembly doesnt exist. Sounds like a permission issue right But I've checked for all of that... and my other apps work just fine. So I google and find some info on app-pools, so i stick the app in its own app pool. Still.... same problems. I spent an entire day fighitng with this thing... all to no avail. It is a win 2k3 server with .net 1.1, and 2.0 installed. I have currently ONLY .net 1.1 apps setup in IIS. Could this be caused by a flaw in my code If so How This is extremely frustrating because its preventing me from coding :| Someone ...Show All

  • Software Development for Windows Vista Newbie question - Methods not available

    Hi folks, Forgive me if this is a real dumb question... I'm a newbie to MS Workflow Foundation, and have only today download the Visual Studio 2005 extensions. I am working through a book I've bought on the subject "Presenting Windows Workflow Foundation - Beta Edition", and have fallen more or less at the first hurdle. One of the very first example contains the following code: ====================================== Shared Sub Main() Dim workflowRuntime As New WorkflowRuntime() workflowRuntime.StartRuntime() AddHandler workflowRuntime.WorkflowCompleted, AddressOf OnWorkflowCompleted Dim type As System.Type = GetType (Workflow1) Dim parameters As Dictionary( Of String , ...Show All

  • Visual Basic Label ForeColor

    Everyone I've asked doesn't know how to do this. Even my programming teacher doesn't know!!! How do I change the ForeColor property of a label box from the code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.lbl_note.ForeColor WHAT GOES HERE End Sub In typing in your recommendation, I found that you can just type Me .lbl_note.ForeColor = Color. ColorName . Thanks for your help and inspiration though! ...Show All

  • Visual C# CheckListBox SelectedIndexChanged Event

    Hi, I have a checklist box and I have a method that is called when the SelectedIndexChanged event fires. Is there any way to know which item in the list caused the event to fire Thanks It will be the currently-selected item in the CheckedListBox, the same as with a ListBox. The event which tells you that an item has been checked is ItemCheck, which provides an ItemCheckEventArgs with the index of the item. ...Show All

  • Microsoft ISV Community Center Forums MergeSort for Double Arrays

    Hello There =) I made a MergeSort function for matrices with Double Data. I haven't found this on the web (one that works, that is), so I'm posting here, so ppl can watch, and maybe improve. To use with strings and other kinds of variables, you just have to change the compare statement, and the type (Double). The compare statements are bolded. Cya Public Function MergeSort(Doubles() As Double) As Double() Dim s As Long, i As Long, n() As Double, m() As Double Dim u As Long, l As Long, j As Long, x() As Double ' Only 1 element If (UBound(Doubles) - LBound(Doubles)) = 0 Then MergeSort = Doubles Exit Function ' Only 2 elements ElseIf (UBound(Doubles) - LBound(Doubles)) = 1 Then MergeSort = Ordena2 ...Show All

  • Visual Studio 2008 (Pre-release) How to change ListBoxItem DataTemplate based on ListBox state

    Basically what I want is to use different DataTemplates for items in a ListBox based on simple states of the ListBox, like SelectedItem, Enabled/Disabled ListBox, etc... - i.e., I would be defining the following types of DataTemplates: SelectedItemDataTemplate, EnabledItemDataTemplate, DisabledItemDataTemplate. Is there an easier way than using a DataTemplate Selector The problem with using a DataTemplateSelector is that it seems DataTemplateSelectors are used for applying different DataTemplates based on values of the ListBoxItem, not different states of the ListBox control itself - note that SelectedItem is a state of the ListBox control, not the ListBoxItem. To complicate matters, the ListBox control has been abstracted into a Us ...Show All

  • Game Technologies: DirectX, XNA, XACT, etc. How do I load a 3d mesh (.x file)?

    How do I load a .x mesh into my scene The space game seems to use its own format (which it names .swm), and there's nothing in the help. I've been scanning through through the classes in the Framework namespace, but I can't see anything obvious! Is .x the recommended format for objects like this (If not, I change my question to be about the recommended format :D) If anyone knows anywhere that has some nice .x meshes I can play with, that'd be cool too. The only one I have lying around is a chair, and that's going to look a bit funny running around my game :D Oh, bummer :( So the "old" method, that would've been used in the Managed DirectX stuff won't work I don't mind using the meshes f ...Show All

  • SQL Server Stored Procedures and C++

    I am using Visual Studio 2003 (C++) and have inherited a data acquisition app. The existing app has CAdoDatabase and CAdoRecordset classes, but they do not seem to be complete. The throughput is pretty high and we switched from using recordsets for adding new data to using SQL insert queries. These are better, but still not fast enough. Some of our installs are for SQL Server 2000 and some are for SQL Server 2005. I am fairly certain that I need to use stored procedures to increase the speed. Since the existing app is limited, is it possible to use the CAdoDatabase function that executes a SQL statement to execute the stored procedure All of the examples I have seen show a command class where all of the parameters have to be defined and an ...Show All

  • .NET Development VB.NET/XML Namespace parsing issues

    Hello, This is my first delve into XML namespaces and I'm having a VERY difficult time parsing the XML because of the Namespace. If I remove the namespace then I get no problems. It would really be appreciated if anybody out there can cure my headache! Here is my code: Dim xmlDoc As New System.Xml.XmlDocument() Dim resolver as XmlUrlResolver = new XmlUrlResolver() Dim datasource as XmlDataSource = new XmlDataSource() resolver.Credentials = New NetworkCredential("username", "password") xmlDoc.XmlResolver = resolver xmlDoc.Load("http://somedomain.com/webservicename") Dim xsn as XmlNamespaceManager = new XmlNamespaceManager(xmlDoc.NameTable) xsn.AddNamespace("t", "urn:ahw:itemlist") x ...Show All

©2008 Software Development Network