Vitaliy Kochubiy's Q&A profile
Visual Studio Express Editions VB6 - Can't convert Received data to Hex
I'm using Visual Basic 6.0 I can output hex data ok to my device via the serial port and it responds by sending a hex packet back. I can see the hex being received by my computer via a comport monitor program. When I try to convert this data to hex I get a type 'mismatch error' Private Sub Form_Load() MSComm1.InputLen = 1 MSComm1.PortOpen = True End Sub Private Sub Command1_Click() Dim StrOut As Variant 'sends StrOut to DUT '********************************** StrOut = Chr(&H24) & Chr(&HDB) & Chr(&H0) & Chr(&H0) _ & Chr(&H1) & Chr(&H4) & Chr(&HF7) & Chr(&H75) MSComm1.Output = StrOut b1 = MSComm1.Input b2 = MSComm1.Input b3 = MSC ...Show All
Software Development for Windows Vista Is there any wat to get the GUID for the underlying DirectSound device out of a DirectShow DirectSound audio renderer?
I have an application that needs to be able to play sounds of all different types, and that needs to support different libraries. It's sound configuration uses DirectSoundEnumerate() to run through the list of DirectSound devices, and uses the GUID of the DirectSound device to uniquely identify it. (This GUID gets saved into configuration files and persists between app restarts) Some of the audio that my application plays is run through DirectShow, however, and I want to guarantee that the DirectShow audio comes out of the same audio device as the rest of the system (which uses DirectSound directly). DirectShow offers a DirectSound Renderer filter for each DirectSound device in my system, but I haven't been able to find a reliable ...Show All
.NET Development Down file throught Http
I need download a file throught http. My question is after download a file, how to keep the date same as the one on remote server. Right now, I use webResponse to get stream and write to a new file. The date of the file is when I created the file. Any help Thanks you can't really I believe since the date/time of creation of the file will be the time it was written to disk locally. I guess one way would be to get the createdate of the file of the remote file, then once written to disk locally, access it and modify the creation date. To do this, the FileInfo class will help you, which lives in the System.IO namespace. ...Show All
.NET Development problems sending the query LIKE @param to sql
I am sending this query from .net 2005 to sql express 2005: select URLItem FROM FetchedURLItem WHERE URLItem LIKE @parameter I want to get all the varchars that contain "msn.com". I am concating in the C# % (on the begining and the end of the parameter) so, I am sending as a parameter: %msn.co.il% . (after deleting the http://www. , the original string was: http://www.man.com ) I am getting null returned to the .net (the query is working fine at the SQL express) thanks First of all, code does not show how you execute your query and it could be issue there. Based on posted code, it is possible that URL string will contain not just domain name bu ...Show All
Visual Studio Express Editions Refresh DataGridView after Filter
HI, I've created a filter based on a selection from 2 comboboxes and displayed the filtered results in a DataGridView. However the results of the filter stay in the DataGridView as well as the 2 comboboxes, and I can't selected anything new or created a different filtered result. How can I refresh the data so that everything goes back to the it way before the filter, like a refresh button. Thanks Peter We'll it works. It was from a post that Spotty answered and provided the code. It takes the selections from the 2 comboxes and filters the data based on those selections and displays it on the DataGrid. Here was the original post: http://forums. ...Show All
Visual Basic SQL Express and VB.NET 2006
Hello everyone. I have a login form which has a username, password, and login type (i.e. user,admin) fields and I want to add the code in the LOGIN button. I am still pretty new to SQL Express and VB.NET, so how would I go about making a connection to the SQL database called Users.mdf I want it to check whats in the username, password, login type fields to what is in the Users.mdf. If they select admin and have admin priv then they can go into either admin or the system and if not admin priv. then they can only login to the system. there are a few examples about this sort of stuff. make a connection to SQL: Dim theConnectionString as new SqlConnection("Server=.\SQLExpress;AttachDbFilen ...Show All
SQL Server PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE
I tried to create a sp on one of the databases on my lap top and got this: Pls help i need it bad Msg 10314, Level 16, State 11, Procedure ap_Hello, Line 5 An error occurred in the Microsoft .NET Framework while trying to load assembly id 65695. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: System.IO.FileLoadException: Could not load file or assembly 'vbtriggers, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x80131 ...Show All
Visual Basic ActiveX Cant Create Object
Hi All, I use automation in my access application for creating emails, word documents etc, now suddenly for whatever reason on my development machine, I get the error "ActiveX Cannot Create Object"... I thought it might be the fact that some references were changed by another developer, however my older versions of the apps which only I have changed and have all my references is having the same issue. I am sorry for the lack of reproducing this error, im at a bit of a blank and dont know where to start... Any ideas Barry Andrew wrote: Hi All, I use automation in my access application for creating emails, word documents etc, now suddenly for whatever reason on my development machine, I get the error &qu ...Show All
Smart Device Development Transparent listbox
hi all, Is there any way to have transparent list box coz i want to implement gradient style in that according to the theme selected.please help needed Actually listview control support gradient - just set the ex style to LVS_EX_GRADIENT: public static void ListViewSetGradient(ListView lv) { SendMessage(lv.Handle, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_GRADIENT, LVS_EX_GRADIENT); } private const int LVS_EX_GRADIENT = 0x20000000; private const int LVM_FIRST = 0x1000; private const int LVM_SETEXTENDEDLISTVIEWSTYLE = (LVM_FIRST + 54); ...Show All
Visual Basic Centering Form2 inside Form1
How I have centering Form2 inside Form1. CenterToParent() doesn't work. Blader wrote: How I have centering Form2 inside Form1. CenterToParent() doesn't work. Blader, 1) Use Design View of Form2 2) Select the Form in the properties window 3) Change the "StartPosition" property to: CenterParent Note: This will only work if Form2 is the child to Form1. To accomplish the relationship I would have Form1 load and show Form2. Thank you, James ...Show All
Windows Forms BindingSource and INotifyPropertyChanged on a non-UI thread
Hi, while working on my entry for Code'n My Way to PDC, I have encountered two problem that are not easy to work around. Here's the situation - I have a master/detail "views", master is DataGridView bound through BindingSource to an IEnumerator<Detail> (where Detail is some class) and detail is a user control with a few Labels bound through another BindingSource to properties of Detail object. I manually track which Detail object is "current" by responding to PositionChanged event of the first BindingSource object. Due to the nature of application, I receive asynchronous callbacks on threads from a thread pool and update the values in Detail object(s) accordingly. Then I (naturally) fire PropertyChanged (Detail implements INotif ...Show All
Visual Studio Manual binding example
I have a lot of RDL reports that I would prefer not to convert to RDLC. www.gotreportviewer.com mentioned manually binding data sources to these reports, but I could not find an example of how to do this. Does anyone have an example of this Thanks At runtime ReportViewer control can't tell an RDL file from an RDLC file. The extra information in RDLC files is relevant at design-time only. ...Show All
Windows Forms Copy data from Datagrid (VS .NET 2003)
How do I copy a row of data (user selected) from a Datagrid control so that it can be pasted into an Excel document So far I could only find information on DataGridView and none for DataGrid. I could do it with ctrl+c without any coding, but I would like to have the right click -> Copy option for novice users. Thanks, JH Thanks bola shokry, but how exactly do I copy the data Do I use Clipboard.SetDataObject ...Show All
.NET Development DataGridView and DataTable external manipulation
Hello all, Maybe I am going about this all wrong, but here goes... I have a MySql database, which I use a DataGridView to show the data. I use a DataReader to populate a DataTable, and then bind the DT to the DGV, sounds normal. The catch, is that I insert, delete and update using my own commands on the database itself. The problem that I am having is that when I clear the DT, and repopulate it, the machine keeps on growing in memory. When I used .NET Profiler, it shows that DataGridViewTextBoxCells and DataGridViewComboBoxCells are growing in instanciation, but not being GC'd... any ideas Much thanks, Dave ps: It used 3.5GB of memory the other day! ...Show All
SQL Server Cursor or Temp table
Hi Chaps, I want to write a stored procedure in which I will update the all calendar week values (stored in a table). And to achieve this I will have to loop through all the records present in calendar table. I am just wondering that should I use Cursor or TEMP table (caz of performance issues) As it will be part of data warehouse so all the processing will be carried out at SERVER ( means no client) Can any one tell me that which would be the best solution ( Cursor or Temp table) in my case and WHY Note: I am using SQL Server 2005 standard edition waiting for quick reply. regards, Anas You don't need a cursor at all. Just use some Date functions: Update CALENDAR Set WeekNo = ( DateDiff( dd, @startDa ...Show All
