Tom B's Q&A profile
Windows Forms How to make Invoice Form
By using VB.net How I can design Invoice form Belongs Customers Thanks and waiting your replay After your advise the configure of my updating code is:- Private Sub UpdateQuantity() Dim sqlconnection1 As New SqlConnection Dim sqlcommand1 As New SqlCommand sqlconnection1.ConnectionString = _ "Data Source=xp-pro;Initial Catalog=Northwind;Integrated Security=True" sqlconnection1.Open() sqlcommand1.CommandText = _ "DECLARE @ValueToUpdate int " & _ "SET @ValueToUpdate = " & txtQuantity.Text & _ "UPDATE dbo.Products " & _ "SET UnitsInStock = UnitsInStock-@ValueToUpdate WHERE ProductID = " & txtProductID.Tex ...Show All
SQL Server rank Ordering
Hey guys, this is a repost of an old question, but with a different idea. I have created a rank measure to rank customers in terms of their sales. This has worked. Now, i have a reporting requirment, which says i must show YTD, MTD and Prior YTD figures in the one report, along with the customer rank. I have built the report with my time calculations as columns, and customers as rows. I have put sales amount and customer rank in the data section. Is there a way in the MDX Rank function to say Order it by the YTD Sales Amount value. and not the MTD value. At the moment, i cannot sort on anything. As if i choose YTD, it just sorts the headings and not the data. same if i say Sort the Customer based on the Sales Amount, it just do ...Show All
Audio and Video Development Disabling all Selectable Elements
I want to disable all buttons at once from script. What is the best way to do this Can I pass an xpath expression like so: document[class('foo')] What is the best method for disabling Setting state:enabled to false If you mean only the navigational buttons, then you could set focus to an empty button which goes nowhere. <button id="lx" style:x="1px" style:y="1px" style:width="1px" style:height="1px" style:position="absolute" style:navUp="none" style:navDown="none" style:navLeft="none" style:navRight="none" > Don't know if it is possible to disable every button on the remote with one single line. ...Show All
.NET Development TimeSpan data type in DataTable.Select
Hello, I need to filter a data table based on TimeSpan values in a column Is there any one who could help me on the syntax to use I have tried the following: ColName<='10:00:00' =>Error : Cannot perform '<=' operation on System.TimeSpan and System.String ColName<=Convert('10:00:00',System.TimeSpan) =>Error : The String '10:00:00' is not a valid TimeSpan value The following works about the syntax but gives wrong results Convert(ColName,System.String)<='10:00:00' So, what is the right expression Hi! I'm assuming that ColName is variable of type TimeSpan. Now with following statement you can do the comparison which will return bool. ColN ...Show All
Windows Forms Problem with my custom control crashing the Windows Forms Designer
If i add my control with this.controls.add(Mycontrol) in form_load i have no problems but if i add it from the toolbox, the designer crashes. Here is the code for my control: enum ScrollDirection { Up, Down }; public partial class ScrollingText : Control { private int _LineSpacing; private Timer _timer; Bitmap b; int yPos; ScrollDirection _direction; int _scrollAmount; bool _scrolling; public ScrollingText() { InitializeComponent(); _LineSpacing = 2; this .Text = "Testing Line #1" ; for ( int i = 0; i < 20; i++) this .Text += "\nTesting Line #" + (i + 2); this .Size = new Size (50, 50); _timer = new Ti ...Show All
Windows Forms sorting datagrid view on update
Me .BillDataGridView.Sort( Me .BillDataGridView.SortedColumn, Me .BillDataGridView.SortedColumn.SortMode) hi, if i sort my grid and update a value in the grid, i have to call the sort method again for the grid to display properly. then it is only setting the sortmode to descending. if it is ascending, it still changes to descending. why is this happening got the solution and i think it is stupid from the developpers part. the sorted column ordering is 1 and 2 for asc and dec while the sort order function for the view take 0 and 1 resp. Me .BillDataGridView.Sort( Me .BillDataGridView.SortedColumn, _ Me .BillDataGridView.SortOrder - 1) ...Show All
.NET Development VisualStudio : start application directly without build ???
Hi, is there a way in Visual Studio.NET 2005 to start an application without VS to first start the build-process Even when the previous compile didn't result in errors or warnings or the source code hasn't change, he nevertheless executes the build-steps first. So, I would like to skip the build-process since I'm using a lot of projects in my solution and it always takes a long time to restart the application, even when I didn't change any source code. thanks Chris Hi Michael I'm new to VS2005 but an old hand with Visual Interdev I have a very mature website with a million files on it so waiting half an hour to start work as VS2005 opens the project is not an option Visual Inte ...Show All
Smart Device Development Wireless emulation (802.1X)
Is there a way to emulate a wireless network device using the device emulator so i can access the 802.1X settings (EAP) Regards, Tom Rixom Not planned in near future. However if you need urgently, there is a shared source of device emulator in which you can build for yourself one http://www.microsoft.com/downloads/details.aspx FamilyID=faa8c81d-7316-4461-a0ed-6c95b261ddcd&DisplayLang=en . -Thanks, Mohit ...Show All
.NET Development OLEDB Transaction
Hi, I'm new on this. I would like to know ho to do a transaction in VB 2005 with OLEDB conection, I need something like this: BeginTrans Try TableAdapter1.Insert(xxx) TableAdapter2.Update(xxx) ComitTrans cacht ex as Exception RollBack End Try I can't find clear info (or basic) for me, if someone can help it would be great. Thank You IlCapo Transactions are properties of both the OleDbCommand and the OleDbConnection. You need to try something like this: OleDbTransaction oTrans = Me.MyConnection.BeginConnection() Me.MyCommand.Transaction = oTrans - and then to commit or rollback, just use oTrans oTrans.Commit() oTrans.Rollback() ...Show All
Visual Studio Express Editions Opening a Slideshow from a C# application
I am creating a math application to drill students on particular arithmetic skills. The application is fine and working well but I want the student to be able to view a powerpoint slide show that I had created previously if they want more help. How do I create a button in a c# windows form that will open a .pps file on the machine do you mean embedding it in the application or just start a seperate process to start a seperate process, use the System.Diagnostics.Process class to start that process: System.Diagnostics.Process.Start("path\\file.pps"); this will launch the file in its default registered application. you can further customize the way the process should be started/imp ...Show All
.NET Development How to save file with name of the data in the textbox of the window form?
Hi I am try to save an xml file with the name of the data entred into the textbox of the windows form. 1.I am currently using the below code the save the file with GIVEN name(highlighted in blue) Me.saveXML(Me.SDLTDataSet1.Tbl_SDLT1, "..\ SDLM .xml") My question is: How to save file with name of the data in the textbox of the window form example: Me.saveXML(Me.SDLTDataSet1.Tbl_SDLT1, "..\ <texbox-form control> .xml") thank in advance Vaish wrote: Hi Seregy Thanks for you help. Please read I explaind in detail below. 1.I have a windows form. 2. Access database with 'SdID' as the autonumber of the table 3.I am getting this autonumber (numbers) colum to a 'textbox ' in ...Show All
Visual Basic How to process Large Binary Files
I'm trying to read Test.bin but I keep getting out-of-memory error The file size is >300MB. I can read smaller files well - but large files are a problem. Anyone has a good snippet fileContents = My .Computer.FileSystem.ReadAllBytes( "C:\Test.bin" ) Thanks. Thanks... I tried it but it was very, very slow. Perhaps I need to read and write in blocks instead of bytes. ...Show All
Visual Studio Express Editions Can't re-install VC++ or VC#
A little background before I ask my question. I bought a new hard drive (WD Caviar SE 7200 RPM), installed it and partitioned it with 3 seperate partitions (20 gig NTFS, 20 gig FAT32, and 280 gig NTFS). I transferred all files from my old hard drives to the new one via a utility provided on the CD that came with the hard drive which I purchased. After getting everything transferred, Windows XP SP2 ran just fine but when I went to run VCExpress or VC#Express they wouldn't run. I attempted to reinstall them but the images I mounted on CD wouldn't run either. I get the following error message: The Windows installer package: e:\vs_setup.ms_ could not be opened. Choose Retry to try again. Choose Cancel for exit setup. I co ...Show All
Microsoft ISV Community Center Forums If your users reference an XLA on the network, can that XLA reference DLLs not on users' machines?
I couldn't figure out how to make my question any shorter, and I pretty much say it all above. But here are specifics I'm thinking about: I'm building an XLA that will reside on a shared network drive. The network administrator has access to every user's Registry. He will grant individual users access to this XLA by placing the XLA's path in the Registry as an Add-In to be automatically referenced when the Excel Application is opened. No one will have a local copy. I would like to use some objects that live in Type Libraries that I can't guarantee will be on every user's machine. In particular, I'd like to use the VB6 Timer object, and if possible, the .NET ArrayList object. Can I install the appropriate dlls on the network machine w ...Show All
Visual Studio Team System Add reference to a separate team project
We're building several libraries that we're going to use in many of our upcoming projects. One of them needs to use a library that is in a separate team project. What's the best way of doing this What I'd like is to be able to add a reference from the team foundation server's copy (because that'll be the checked-in release copy), and any time someone checks in a new version and builds a release DLL, it'll update that project. Is that possible Any other ideas Thanks, Johann MacDonagh We ended up solving this by standardizing the location of our local copies of team projects and adding references to DLLs built in the Release folder of projects. So although the "Path" to external reference DLLs i ...Show All
