Answer Questions
Sander Smeenk strange behaviour
Hi guys, I am definitely a newbiew to .Net, and am having a problem that I cannot seem to get around. I have a single Windows form app that loads several (probably about 10) datatables into a dataset. The dataset is defined as a public. Eventually the data is summarized into a datatable that is displayed into a datagrid. At first I could not get the double-click to work, and eventually tried to add a context menu control to capture a right click. Once I got things wired up, when the menuitem click event fired, I wanted to create a dataview from one of the datatables in the dataset and filter accordingly. To my surprise, the dataset variable has a value of nothing while in the click event. I then figured out how to capture a double ...Show All
Pooja Katiyar ADO.net dataadapter.fill
Hi, I have two tables in my database: tb1 and tb2. tb1 will be inserted into tb2 with these conditions: 1.) if primary key to be inserted is already existing in tb2, then the data in tb2 will just be updated using values of tb1 2.) if primary key to be inserted is not yet existing in tb2, a new recorded will be created in tb2. I used a dataadapter to fill the datatable and a bindingsource. Also, I used execute non-query command to insert/update the data in tb2. everytime i update/insert a record in the database, my datatable still contains old table records (it doesn't have the data i inserted and contains old data before updated). in this case, i have to issue another da.fill(mydatatable) to refresh.... which is so slow espe ...Show All
Sundararajan 'PlaySound' function and sound events
Hello, I'm developing a program in VB6 where I need do play a wave file assinchronously and 'be advised' when the execution of the sound has finished (receiving an event). P.S.: Now I'm using the function PlaySound (winmm.lib) to play the wave file, but I don’t find a way to check if the sound have already been played entirelly or not. Any idea on how to do that Thanks! VB6 questions should be posted in the link below since these forums are for .NET Development :-) http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx dg=microsoft.public.vb.general.discussion&cat=en_us_ab067bc0-bda5-4921-a1ec-e76402873945&lang=en&cr=us ...Show All
ZeroSerenity COM Interop Exception: Type Mismatch
Hello, I was accessing a property named "Equality" of an ActiveX component through VB 2005 interop. In the object browser, the property was displayed as: Property Equality(ByVal index As Integer) As Integer I tried to access "Equality" with the following statement: 'Assuming pRenderer is a valid reference. Dim retVal As aims.imsEquality = pRenderer.Equality(1) The statement execution resulted in Type Mismatch exception. I looked around MSDN and the closest thing I could find was http://support.microsoft.com/ kbid=316138 . Does anyone have any idea how to properly access a property of an ActiveX component that takes an argument Thanks. Hi Alex, I tried to view the Ac ...Show All
DotNetDoctor ImageLists and html
First, my appologies in advance if this isn't the right spot for this post. I tried looking around and searching the forums and didn't spot what I was looking for. I am not into the "html" side all that much and what I would like to do is place the images I have into an ImageList control rather than being stored in a folder someplace. Small GIF and JPG type files. That I can do and understand. If I am writing to a HTML document within my application, how can I address putting those "graphics" into the document. Normally you would use something like <img src="angry.gif" alt="Angry" />. How can I specify that the image source is a location within an image list control rather than a 'file lo ...Show All
Chidu FileSystemWatcher - Created events fires too early
I have been playing with a FileSystemWatcher, to start processing files as soon as one arrives in a folder. Specifically, I'm looking for a zip file, then unzip it. However, when I try to unzip a file as soon as I get the Created event, the file has often not finished being written, and therefore I get an error when I try to unzip it. This time period is very short, a tight loop without pauses trying to open it for write will return OK in 3 loops. Question ======= How do I get FileSystemWatcher to raise an event when a file has FINISHED being written, instead of START being written ugly but functional will do for me thanks Jim You say you get 2 events I only get one! Have you added event ...Show All
DMottorn Recieving 'i??' character symbols when loading text files not containing them
I am writing a cross-platform application and I am using Visual Basic 2003 Standard for the Windows XP version of the application. My Windows Mobile version writes information out to a text file and my Windows XP version can load and modify them. The text files do not contain the i symboles, but when I load the text files into my Visual Basic application each file loaded has those symbols attached to the begining of the first line I read into my XP application. Does anyone know why this is happening At first I thought my Windows Mobile Program was the culprit but considering the fact that those symbols are not in the text file when I view them (I used 3 different text editors to make sure) so I am assuming it's something I need to ...Show All
mig16 How to get context menu for webBrowser control
I am using the webBrowser control to do ftp and this works great... When i right click on a folder in the browser window i am presented with the standard menu items.. I have alredy worked with the ShellAPI and have project that wraps a treeview so that i can get the shellFolder that is assoisated with the treeNode...The code below is what i use to get the context menu for a shellFolder. I would like to get be able to capture the context menu and add items, then handle the commands with the system.windows.forms.webBrowser.. how do i capture the context menu so that i can add items.. thanks erik public static bool GetIContextMenu( IShellFolder parent, IntPtr [] pidls, out IntPtr iContextMenuPtr, ...Show All
DIMIS283 Converting an Integer to String
Im trying to convert some integers to a string (which works fine) For example My Funciton MKI is working ok as far as i can tell Dim v1 as String = MKI(116) V1 then equals "t I wish it to equal "t" Can anyone offer any suggestions please Kinda, a propietary date format to save a few bytes. You can use Chr() to go from a 16-bit integer to a string and Asc() to go back. However, the generated string would not be the same, it would just have one character in it. This is only a problem if you need to read data that the old program generated... Only use RtlMoveMemory on unmanaged memory locations. Even then, there are some .NET functions which offer better h ...Show All
eldiener Problem with “data bound ComboBox” with “Visual Basic 2005”
It seems that there is a problem with “data bound ComboBox” with “Visual Basic 2005” Please try this… (I used SQL 2005 Express for database.) Create a new Windows Application. Add a new database named “ComputerUsers.mdf” In the DataSource Configuration Wizard, click cancel (since there’s no table yet) In Server Explorer, create two tables Users and UserTypes with the following definitions: Users table FirstName varchar(50) notnull LastName varchar(50) notnull UserType int notnull UserTypes table UserTypeId int notnull primaryKey UserTypeName varchar(50) notnull In th ...Show All
NoobestNoob Procedure View in VB.net 2005 ?
In VB6 you could set your IDE to either Full Module View or Procedure View. Procedure view is preferred because it allows you to have just the code for just the active procedure in front of you. VB.net defaults to full module view (which floods the text editor with code I'm not currently working on). But how do you switch it to Procedure View I realize Microsoft has removed the SDI interface (which is superior to either the MDI or Tabbed interface they currently have), but surely they haven't left us with just the full module view Well, we don't have procedure view anymore but we do have regions and outlining that helps tremendously in organization and cutting down on the clutter ...Show All
Terry Wang Delay of 1 sec in code
Hi In my application , I want to execute a code then wait for 1 sec then again execute with some changes and again wait and so on I used Sleep API but i am unable a print a status that loop is running even if i had written before the loop could execute. is there any other way to have a delay of 1 sec other than what i had used Help Hi Thank u for your concerned reply We are working on MsComm Control of VB. We actually want to have delay in reading the transmitt buffer by the device . Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Sub Command2_Click() For i = 2 To 900 y = "Command to be executed on the dev ...Show All
Nate00 Access 2000-2003
Hi, I need to know how to set a window for a form in screen depending the resolucion of a display, I mean, if a have a resolution of 800 x 600 or 1024 x 768 i need to adjust the window size of a form. Thank you, but "...PrimaryScreen..." don't work. raise an error You just check the screen bounds and respond as necessary. An example might be: Select Case Screen.PrimaryScreen.Bounds.Width Case 800 Me.Width = 800 Case 1024 Me.Width = 1024 Case 1920 Me.Width = 1920 End Select Select Case Screen.PrimaryScreen.Bounds.Height Case 600 Me.Height = 600 Case 768 Me.Height = 768 Case 1200 Me.Height = 1200 End Select ...Show All
cgpl How to count the amount of numbers equals in a database per line
I need to develop a program in Visual Basic 2005 express to count the numbers that repeat in the lines of a database in a excell sheet, compared with a specific array, ie: 21 1300 3400 6000; 21 500 560 6000, 23 400 570 6000 answer : 2 and 1 Thanks Dman 1, Can I use it to save in a database, and write it in a combobox When using numbers in variables like A(5)= ( 12 230 450 1500 6000), can I use it to compare the items the same way pseudo: XLSheet . Range ( "A1" ).select() For x As Integer = 0 To HoweverMany TheCellValue = XLSheet . Selection . Value For y As Integer = 0 To MyArray . Length - 1 If ...Show All
Guennadiy Vanine Safe threading
I am threading a section of my application and i get this error Cross-thread operation not valid: Control 'main' accessed from a thread other than the thread it was created on. how can i thread this saftly Public Class Home Dim contthread As New Threading.Thread( AddressOf fillControl) Private Sub Home_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load curUser.Text = Login.UserLabel.Text Call acctsCall() contthread.Start() End Sub Public Sub fillControl() dep = New DepositControl main.Controls.Add(dep) wid = New wdrawd widCont.Controls.Add(wid) mng = New Managecontrol mgnCont.Controls.Add(mng) End Sub ...Show All
