gavinm's Q&A profile
Visual C# Opening CD tray from C#
I know it sounds bizar, but a friends teacher asked them to do that for a programming job, no no calculators, or a simple text editor, he wants a program that opens a CD tray... Now, I'm not asking for source code, I'll come up with that myself, but the question is... Is this even possible Yes ... use MCISendString API (require pinvoke). http://www.daniweb.com/code/snippet350.html includes an example (and is also the first link if ...Show All
Visual C# Non file based configuration settings
Is there any way to use the .Net configuration framework to read/write configuration values from a database or other non-file based resource I though the original Configuration Application Block allowed you to specify providers. Maybe I was mistaken about this. If you are referring to the new client configuration APIs in .NET FX 2.0, then yes, you can persist application settings in other locations than in the app/user.config files by us ...Show All
Visual Basic StopWatch Sample in 101 samples
Just downloaded and modified the stopwatch from 101 samples, nice job! I am a PE teacher, and want to create a Timer for this stop watch ap. Count Down timers are very important, and I have a Large Screen in my Gym/Smart Board that I would love to display a countdown timer on, and of course the StopWatch I - you created. How would I implement the timer functionality I know how to get the time into a text box or Label (Web), but how do I s ...Show All
.NET Development Working with Web Services in Visual Studio 2005
H i all, I'm new to ASP.NET and web services. I'm able to create a web service successfully.And i tried to add it as a web referrence to another ASP.NET application.The Add Web Referrence dialog window displays my web service,but when i clicked the link to add it,i got this error: "Server cannot access application directory 'C:\WebSites\MyWebService\'. The directory doe ...Show All
Visual C++ What happens inside CryptDeriveKey?
I am translating the CryptDeriveKey to Java but the algorithm implemented doesn't work correctly. The code in Java is: private static byte [] CryptDeriveKey( byte [] key, int size, int algorithmType) throws Exception { byte [] buffer1 = new byte [64]; byte [] buffer2 = new byte [64]; Arrays.fill(buffer1, ( byte )0x36); Arrays.fill(buffe ...Show All
Smart Device Development Windows CE5.0: unable to hide command bar!!!
I developed an application for critical healthcare that must run in fullscreen mode. Now I'm trying to migrate to Windows CE 5.0, but I can't hide the bottom bar (command or menu bar ). I already tryied various combinations of CCommandBar SHFullScreen SHFindMenuBar CommandBar_Show ecc... this issue will jeopardize the entire project. Hope someone can help me...... Sorry, this isn't an answer but more of a uh yea..... I've also ...Show All
Windows Forms Combobox problem?
I have 2 tabpages,each of which is having a combobox,which displays same category of data.ie for eg. place. New residence place is displayed on ist combo and old one on 2nd combo.I specify different datasources(esentially of same data) to the respective& ...Show All
Visual Basic Weird Change in Form's Height
Hello ... I've a Project where all my forms are set to 1024*768 (FormBorderStyle= 0-None) when i run the program I see that it doesn't cover all the screen when i check the height i see that it's 753 even when i end the Program and get back to the visual basic i findout that it had been resetted to 753 ! Now I've searched the Web if there is a Limit to the height when using 1024 as an example ... but i didn't find any clue I can fix this by set ...Show All
Visual Studio Team System Team Build - PublishRun Error
My first Team Build build, errored out on "Build process and custom task errors". I get: Error PublishRun: Only one usage of each socket address (protocol/network address/port) is normally permitted My code does nothing with sockets which leads me to believe this is an internal TeamBuild error. Building just one configuration at a time is a fine workaround for now. Thanks. ...Show All
Microsoft ISV Community Center Forums how to add CheckBox?
i want to add several CheckBox into Form. the numbers of checkBox is depends on the user input. i had already data on the ExcelSheet that represent one table of selected database. then the entire column name will be listed in userForm. i need to know how to add checkBox into the userForm (in uncertain range, depends on how many column in the table) and of course including the label beside it. This code is ...Show All
.NET Development SqlDataSource/DataField Bug in 2.0 ?
I've come across an odd situation. If someone has a table where a column name contains a space, and you generate a SqlDataSource on that column, some interesting things happen if you try to bind them. When I tried to bind, (in a GridView), the column name First Name via DataField="[First Name]", it gave a runtime error stating that [First Name] cannot be found in the sqlDataSource. Oddly enough, I took the brackets out and just sent i ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Enumerating Video Cards
How The IDirect3D9 interface supplies functions you can use to enumerate adapters. You can use the GetAdapterCount function to find out how many there are and then just loop through them getting the information you want (e.g. using a for loop like for(int i = 0;i < numAdapters; ++i) {//code here}). Check the documentation for more details. ...Show All
Visual Studio Team System Again Problem in FxCop when Adding Custom Rules...
Hi... I m adding new custom rule by the Add Rule.. I have 13 Custom Rule and I developed in visual studio project. After I complied the Project and Make a .DLL File. That DLL file i put in Rule directory where MicrosSoft FxCop 1.32 is located in Rule Directory. After wards i am starting Fxcop Software that time Custom Rule Displaying with the 13 Rule in tree View. When i am analysing the Project .DLL by adding new Target That time it ...Show All
Visual FoxPro Serial Communication
Dear Experts There is a Weight Bridge having an Indicator to show Weight. Is there any simple way to get data from Indicator through Serial Communication while using Microsoft Communication Control Please Help Tariq, Check UT downloads section for 'serial.zip' from Marc Grajover (lastname is what I remember, might be spelled wrong). It has details about MScomm control and sample to use with a weight meter. ...Show All
SQL Server List all your connection managers
Hello, I'm building a custom task which has a property ConnectionManager which obviously allows you to select which connection manager you're goinng to use. I know how to get the list of connection managers but how do I make them appear in a combo-box in the properties pane Anyone got some code for that Hopefully this is fairly trivial for you developer types out there. Thanks Jamie I believe that the key is the TypeConverter property of p ...Show All
