Vinod Sa's Q&A profile
.NET Development Table Adapter and multi-user environment
I am writing my first .NET application after years of using VB 6.0. As I understand it, the new table Adapter takes a "snapshot" or "cache" of the records in the table, until you TableAdapter.Update. Is this OK in a multi user environment I am writing an inventory program. I want to avoid the following problem... POS computer A sells an item, so my program changes it's quantity from 12 to 11. Two minutes later POS computer B sells one of that same item. It's Table Adapter's cache or snapshot may still think there are 12 of that item, and it would do the same calculation, and it would appear like there were 11 of th ...Show All
Visual Basic Rotating an image or bitmap object
Hello, I'm looking to (through code) rotate an image or bitmap object. It has to be to any angle, too, not just 45 or 90 degree intervals. I HAVE code to do this, however, the centerpoint for rotation ends up being the top-left corner of the bitmap. I need it to rotate from the centre. Thanks in advance to anyone who can help. You need to do a translate transform by half the width and height of the bitmap, so that the point of rotation is the very centre. Then translate back when you've rotated it. ...Show All
Visual C# Adding formatted text to a RichTextBox at runtime
Hey, I have a form with a RichTextBox and two buttons. When I click button one it adds the words "THIS IS RED" with a red forecolor to it. When I click button two it adds the words "THIS IS BLUE" with a blue forecolor to it. Now lets say I click the Red button, it all works out fine, I then click on the Blue button, it still all works fine. Now I click on either the red or blue button, the first two lines turn red while the last line is either red or blue, depending on the button I pushed. Heres how I'm appending the textbox: string add = "THIS IS RED" + "\r\n"; int start = richText.Text.Length; richText.Text += add; ri ...Show All
Smart Device Development Can I call InvokeMember in Windows CE
I am pulling my hair out - i am trying to use the InvokeMember in a Windows CE application and cannot get it working - I keep getting System.NotSupportedException exception - the code I am running is very simple There is a function within the class that I am executing code it is called UpdateText(pasStr as string). I am running the below code to try and execute it and it does not work. Can anyone help me out me.GetType.InvokeMember("UpdateText",nothing,nothing,me,new String(){"Hello"}) Please see this: http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/browse_frm/thre ...Show All
Visual Basic Copying data from one listbox to another
Does anyone have idea the best way to copy the data that is in one listbox to another one Hi there, Well the .Items property of a list box is read-only so you can't do something like: ListBox2.Items = ListBox1.Items Whenever I have to do this a loop seems the easiest way: Dim iter As Integer For iter = 0 To (ListBox1.Items.Count - 1) ListBox2.Items.Add(ListBox1.Items.Item(iter)) Next I'm sure one of the gurus around here knows a better way though. Hope that helps a bit, but sorry if it doesn't. ...Show All
.NET Development Communicating with USB port using a .dll file
I am using a .dll file to communicate with the USB port and can anyone tell me how to use the below two lines of code in the program. Bind Dll to the program ---------------------------------------- hInstDLL = LoadLibrary(“ABCLib.dll); To Initialize ----------------------------------- status = ABC_Init(hInstDLL, DLL_MESSAGE_OFFSET); Willfin You need to call GetProcAddress() to obtain the address of the UST_Init() function. Google for this API to get examples. Instead of using LoadLibrary, consider statically linking to the DLL by including the ...Show All
Visual C# Instanciate class from independent assembly
Hi, I'm trying to do a somehow dynamic application. It's like a calculator of functions. A function has parameters (in an XML file) and a class that loads them and does some tricks. So the scenario is: the user opens an xml file and the app instanciates the class it refers to. Now, this works just fine if the class is in my original assembly (by Type.GetType("name of the class in the XML"). But, what if the user wants to add another class in the future I don't want him to mess with my app. I want him to refer to my dll, create the class he want (by extending a common interface for all the functions, just defined in my dll), compile his ...Show All
Visual Studio Express Editions Include an Access database in VB express project
Hello, does anybody knows if it is possible to include an Access database into my project (created with VBExpress 2005) so that automatically copied to bin and exe folder each time I debug or compile my project or it does not matter where the database has been located in my disc hi, yes you can , simply add a new item to your project and select database the wizard will open change the database type from sqlserver to msaccess and follow up with the wizard hope this helps ...Show All
Windows Forms Snappable grid
Hi, Im new to VB .net and I have two questions: Is it possible to create shapes on the form in design mode There doesn't seem to be a way to do this except in code. How can I create a grid that I can then snap objects too If any can help me get started with these two questions, I would be most gratefull. ...Show All
Visual Basic Refresh the Winows OS from within Visual Basic
I've made some program in Visual Basic 2005 that works with changing files and folders. After I've finished it, the main problem is to refresh the Windows OS. I mean the same thing as when we press F5. Than everything refreshes and if we have made changes, they are immediately shown. Could someone help me with this matter A possible solution or maybe an idea how to do that Thanks, After I've finished it, the main problem is to refresh the Windows OS. Erm... no. The OS equivalent to F5 is rebooting. There is no program after which when it's run that should necessitate rebooting. More specifically, wh ...Show All
Software Development for Windows Vista customError in webconfig file
hi i have uploaded my website on another server. now i m running that site from that server. its getting some error but i m not able to see it. so made following changes into webconfig file. <customErrors mode="Off" /> but then also it wont work. so plz help me how can i come to know what the error is thanks kavita Hi Kavita, You need to go and ask this question in an ASP.NET forum. Click to http://www.asp.net/forums . You are off-topic for this forum. Regards, Paul ...Show All
Visual C# Properties Collection
Hi all, I wonder if one of you kind people would be able to point me in the right direction. I have a class with quite a few properties and I thought it would be quite useful to be able to iterate through the classes collections with a foreach loop and return information about each property (such as name, type etc) and its value . However, this is where I come unstuck as I can't find an out-of -box way to do this. I guess I need a collection of properties, but I'm not sure how best to implement it - can anyone advise TIA Martin. Here is a little example that prints out all the types and there properties in ...Show All
SQL Server Connection failed!
Hi guys, I have problem with this code: TCHAR szCurrentDir[250]; TCHAR szDataDir[250]; lstrcpy(szDataDir, TEXT( "DRIVER={SQL Native Client};SERVER=.\\sqlexpress;Trusted_Connection=Yes;DATABASE=MyDic;AttachDBFileName=" )); GetCurrentDirectory( sizeof (szCurrentDir), szCurrentDir); lstrcat(szCurrentDir, TEXT( "\\Database\\Data.mdf;" )); lstrcat(szDataDir, szCurrentDir); SQLDriverConnect(hdbc, hWnd, szDataDir, SQL_NTS, szConnStrOut, sizeof (szConnStrOut), &cbConnStrOut, SQL_DRIVER_COMPLETE); When I run my program, I get this message: --------------------------- Microsoft SQL Server Login -------------- ...Show All
Windows Forms TaskVision client destroyed my PC!
I've decided to repost this message as separate thread cos I don't think it's getting the attention I deserves. Here's the problem... I installed the TaskVision client about a week ago, and immediately after started noticed weird things happening to my PC - suddenly lots of application were missing files. I checked the Program Files folder where they wer ...Show All
Visual Studio Express Editions Compile without using .NET-Framework
Hallo everybody, I want to develop with Visual Basic. I saw that Visual Basic is OOP since Version 7.0... right But I want to compile the application that it works (for example) on Windows 2000 where the .NET-Framework isn't installed. Is it possible to re-configure the Compiler-Settings that the application is independet to the .NET-Framework I hope you understand my bad english :) Cheers, Adrian Adrian85 wrote: Hallo everybody, Is it possible to re-configure the Compiler-Settings that the application is independet to the .NET-Framework No that's not possible. ...Show All
