Cheesywillie's Q&A profile
.NET Development Determine space available on a network drive
I'm trying to determine if there's enough space for the file on the specified drive before I go ahead and start writing the file out. If the user specifies a local (or mapped) drive (i.e., "C:\Windows"), I can extract out the drive letter, create an instance of System.IO.DriveInfo and call its AvailableFreeSpace method. But, System.IO.DriveInfo apparently doesn't support URIs (i.e., " \\server1\users\adam "). I dug around the documentation, but I didn't see any other classes which would provide such information. Any suggestions anyone TIA, RichardR Don't think there is a managed class to do thi ...Show All
Visual Studio Tools for Office Enable/disable popups in main menu
Hi; We have an Add-In where we need to enable/disable a couple of menu items based on the location of the caret in the document. As an example, think of the Cut menu item in Edit - it is only enabled if text is selected in the document. Is there any event or any other method where we can enable/disable the menu items just before the menu is displayed. Possibly an event that occurs when the user clicks on the main level menu that will cause it's menu to drop down At present we use the select change event. But this is a bad solution both because it is fired all the time so we are using a lot of CPU cycles and because it does not fire when the ...Show All
.NET Development OLEDB - Slow Inserts
I have noticed that when using OLEDB (.Net 1.1) with an .MDB file the insert times are very slow. I did some testing using the same table layout and insert data with SQL2005 express edition and was blown away by how much faster it was. This presents a problem as the application that I wrote gathers lots of data via a TCP/IP socket and then stores it for later processing, etc. The release date for SQL2005 is ~ Nov so in the meantime is there anything I can do to try to improve the insert speed using an OLEDB (.Net 1.1) / .MDB solution I have removed the indexes, etc... Hopefully there is some undocumented parameter or something that ...Show All
Windows Forms Orientation of TabPage when TabControl.Alignment = Bottom?
Hi, I have a TabControl with some TabPages. I have set TabControl.Alignment= Bottom. But then my TabPages look silly, as they do not rotate 180 degrees when Alignment = Bottom. Also, I can't find any Orientation-property on the TabPage. Any idea how I can rotate the TabPage to make this look better (If I can't, then what is the idea of the Alignment-property... ) Thanks! PS! It is the tab "tip" I want to rotate, not the contents of the TabPage. Dear Torbjorn, Sincere thanks for your suggestions in the appearence improvement of TabControl Alignment. You know it's a kind of Enumeration ...Show All
Visual Basic How can I fill a bindingList of T ?
Hi, I hope somebody can help. I dont seem to figure out how to fill a binding list of t. I would like to point out that i have no problem if I do the following in the interface Function GetList() As BindingList(Of Employee) '//BUT I CANNOT MAKE IT WORK WITH Function GetList(Of T)() As BindingList(Of T) Scenario Load ComboBox with a list of all customers IGenericInterface 'With a generic bindinglist of t Customer 'Customer Class with properties like "Name,Surname" and mostly importantly "GetList" function Imports S ...Show All
Windows Forms Windows Forms
Hello All; I’ve got a problem with windows Forms. I want to know Is there any event which can be raised whenever a key pressed on the form for example Tab Key. I tested KeyPress event of form but it wasn’t applied. Any suggestion would be truly appreciated. Thanks. The problem here is that the currently focused control is processing the key event instead of the Form. But thankfully, there is a way for a Form to "see" the key event before the control: simply set the Form's KeyPreview property to true and set up the Forms Key handling as normal. To avoid problems, you may want to ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Torque Game Engine
After some carefull thought, I have decided to develop a game using C++ with an existing open source engine. Torque ( http://www.garagegames.com/products/1 ) was one reccomended option, and I was just wondering what everyone else thinks about it. Is it DirectX or what Torque is an awesome engine. There are alot of free native Engines out there and also Managed DirectX Engines . It's best to explore some of them to find one that suites you the best. I would suggest taking a look at Irrlicht as it seems very user friendly and really a breeze to work with. I have personally work with it and it was real ...Show All
.NET Development Pinvoke hangs when using .net remoting. Works otherwise.
I'm attempting to use remoting to call into an umanaged DLL we have written to interface with an existing C++ program my company has written. However I have a problem I can't figure out. When this method is invoked directly on the server it works without any problem. Public Function remote_vb_sys_check() As Integer Dim intResult As Integer 'MsgBox("I'm here!") Console.WriteLine("vb_sys_check() executing.") intResult = vb_sys_check() Console.WriteLine("vb_sys_check() done.") Return intResult End Function However the line intResult = vb_sys_check() will hang ...Show All
Windows Forms Remote Server Is Unreachable - New Install
I downloaded the install for the source today. I ran the install. Verified that the database was created and that the tables had been poplulated. Also verified the virtual web was created in IIS. Database and client are on the local system. After the solution was rebuilt and the project was executed I am prompted for a username and password. I ...Show All
SQL Server Simple Database - What is Best Option?
Hi, I am writing a simple program which runs on users xp machines and accesses a simple table on an NT Server. In otherwords, the database consists of just a single table with perhaps 4 fields and a maximum of 200 records, with low transaction activity (users periodically update their status or check on other users' statuses). Do I need to use SQL What is my best option for such a simple table / database. Your help would be appreciated. Hi, I'd need to learn about using XML first :) To see if it is worthwhile looking at this option (which sounds good because I presume there is no ...Show All
.NET Development OleDBCommand: what might be the problem?
Sorry you all if I bother you lately. I'm new to c# that's why I look out for assisatance often. I'm trying to insert user name and password into an access database through a create button. However, anytime I click on the create button there is an exception which suggests that there is a problem with my sql insert statements. I need help to ascertain what the problem is and how I can rectify that problem. private void btnCreate_Click( object sender, System.EventArgs e) { OleDbConnection sgConn = null ; string sgConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+"Data Source= C:\\Documents and Set ...Show All
Visual C++ good books on win32 programming
i am a computer engineering student and i have been a .net developer for a few years now. i want to delve deeper into the world of windows api programming using vc++. please suggest good introductory texts, books and resources for begining my journey. please recommend books for windows api porgramming and not introductory C++ stuff. i found this introductory tutorial for beginners at http://www.winprog.org/tutorial/ ...Show All
SQL Server Mapping columns in custom Destination component
I am working on a destination component where the columns in the destination are already set. I want to give the user the option to map columns, similar to the way the Excel destination component does it. So, the Available Input Columns could be mapped to Available Destination Columns. The Available Input Columns would come from a connection from some other component (either a source or a transformation component), and the Available Destination Columns would be generated from the Data Source. Is there a way to do this without creating a custom ui Man, I suspected it had to do with the ex ...Show All
Smart Device Development Removing Predictive Text on a Device
Hi all, I have written a Windows application for the QTEK device (CF1.0) and on the TextBoxes in my application my users are getting predictive text. Is there anyway I can stop the device from doing this Thanks Tryst Hi Aarthi, so is this snippit enough to satisfy my needs, or do I need to make use of all the code in the Solution Tryst ...Show All
Smart Device Development Problem Creating Tray Icon In C#
Hi there, I know that Windows Mobile 5 supporting tray icon on the today screen. I have a source code from the SDK but in C++ and i want to change it into C# and make it into component so it will be easier to use. The problem came out when i try to use "sizeof" statement. The first error came it tell me to use "Marshal.SizeOf" function to get the size of structure. For the notify icon i create class like this : public class NOTIFYICON { public int cbSize = 0; public int uID = 0; public int hWnd = 0; public int uFlags = 0; public int uCallbackMessage = 0; pu ...Show All
