Answer Questions
Florent SANTIN Reading Bits
I am pulling an 'int' data type out of SQL Server with a length of '4' which I want to read the bits. I have no clue on where to start on this as far as declarations or methods to use...I need to be able to read each bits to see whether it is set or not. Possibly the easiest way I see is to store each byte as an array of bits so then I could just loop through and do my comparisons. I do not need to write, just read. Thanks a ton! Dim I As Integer = 10 Dim b As New BitArray ( BitConverter . GetBytes ( I )) For x As Integer = 0 To b . Count - 1 Dim TheBit As Boolean = b ( x ) Next can I just ask - is the data ty ...Show All
Tryst NotInheritable -> but I want to Inherit :)
Hi! I'm trying to add a property to System.Windows.Forms.HtmlElement I've created a class that inherits HtmlElement. Howerver, HtmlElement is NotInheritable...so the question is: Is there any way of overriding NotInheritable so that I can make my HtmlElementWithProperty object (having all the features of HtmlElement + my string property ) Any other workarounds that might help Regards, Alex You'll have to fall back on the "aggregation" principle. Create you're own class that contains a HtmlElement and use it. ...Show All
olgaF How to debug windows paint messages within and across applications
Hello, I am using Windows XP and VS 2005 with VB.net and I am writing a solution consisting of a set of applications, all running at the same time, with other applications. I have 4 monitors, which means a lot of real estate for applications. I have observed that my applications cause other applications to redraw their screen. This is most frequently when I use the DataGridView control. Scrolling the DataGridView at one point causes a burst of redraws in those applications, and I have to wait until the storm is over. Question: how can I catch and eliminate the messages that are obviously sent from my application to Windows (and thus to the other applictaions). The other problem with paint messages: Within one application, I ...Show All
HariAdu Merge files
In the old dos days you could combine 2 files as save to a third file: copy file1 + file2 file3 It still works in a dos shell. I did this: Shell("copy " & file1 & " + " & file2 & " " & file3) I got an error that file3 cannot be found. I know it doesn't exist I want to create it. So I created a bat file: copy %1 + %2 %3 and called it as such: Shell("ccopy " & file1 & " " & file2 & " " & file3) I still get the error that file3 cannot be found. First I don't see how it can tell from the shell that file3 is a file. How do I do this otherwise Do I have to create a blank file before calling it I think to use a .NET code is better than using shell command, because this wouldn't work i ...Show All
Dave198026 MediaPlayer and Read Movie Files
I want to read media files and this files show as link in datagrid. example C:\Movies Movies directory in exist all files break into to datagrid Thanks For Help This simple app - populate the datagridview with a list of files in a folder. When you select an item and click the play button it will open that file with the default application for that file extension. If you specifically want to play in media player then you can modify the line Process.Start("wmplayer " & Me.DataGridView1.SelectedCells(0).Value) and it will play the file with media player - but as different users may have configured t ...Show All
project2n5e0o1 Load 1997 V6.0 MSMAPI32.OCX so upgrade Wizard will work?
Dear VB Community, I am a hobbyist trying to help out at work with an old VB6.0 program that we want to move to VB .NET. The one and only VB6.0 programmer we had left along with our VB6.0 compiler. So, I have Visual Studio 2005 and VB .NET and do not want to start from scratch. Here is the error I get when I run the upgrade wizard: "Visual Basic Upgrade Wizard error Upgrade failed: Exception occurred: Could not load referenced component: MSMAPI32.OCX (1.1.0) You need to install this component before you upgrade the project. It is recommended that you install VB6.0, with all referenced components, and ensure the application compiles and runs before upgrading." Thanks for any help/guidance you can give. ...Show All
Manoj Verma What To Install From VB Installation CD To Let Users Run My Application And Not Enter VB
The best way for me to do what I want to do is install on all PCs (using VB installation CD) the minimal requirements to run my application which uses VB 2005, ADO.NET to read/write to an Access database, and Crystal Reports. I ask you what, specifically, should I install on all these PCs from the VB 2005 installation CD After that the next thing I will do is I give each PC user a shortcut file (having a nice icon that says database on it) which runs the exact same executable on a shared drive. My application already has the capability to tell users if someone is already actually using the database via a warning message. The hope is that only one person will use the database at a time. There aren't many users so this sho ...Show All
Zai Visual Basic - Passing data from a child to a parent form
Please reply with Visual Basic solutions. I am clicking on a Panel in a child form (BW3) and creating a label giving me the mouse position on the panel. The mouse down event on the panel(BW3.Panel1) needs to also pass this variable onto the parent form(PARENT1)controls(txtwidth and txtheight) text boxes , which is part of a large data set that is going to be sent to a database. I am very new at OOP and class writing so please be gentle Looking forward to an early reply as this is a small part of a big project Dave If I understand correctly what you are trying to achieve I think the following will do the job. Just paste the whole code into a new project, replacing the Public Class Fo ...Show All
Stéphane Beauchemin Finding the applications .exe folder in code
If I use SourceDir = My.Computer.FileSystem.CurrentDirectory at the start of my application's first Load event I reliably get the folder where the .exe is situated so I can easily locate some other key files there .... unless it has been invoked by the user double-clicking a working data file, when If My .Application.CommandLineArgs.Count > 0 Then (etc.) allows me to investigate the calling situation but then SourceDir = My.Computer.FileSystem.CurrentDirectory only provides the location of the actuated file and not the application. How can I determine the application's folder in code under these circumstances Thanks Nick B Thank you Stephen - sometimes it's so simple! Nick ...Show All
MeierLink Downgrade Confusion
The website (http://msdn.microsoft.com/vbasic/previous/downgrade.aspx) used to say "If you require a previous version of Visual Basic, you may purchase Visual Basic .NET and then downgrade to a prior version." We did this, and I still have the printout from earlier this year. Now the same website says, "If you require a previous version of Visual Basic, you may purchase Visual Studio 2005 Professional and then downgrade to a prior version." Are we still legal to use the Visual Basic .NET to downgrade, or do we now have to purchase Visual Studio 2005 To downgrade, you have to make a support call, anyway. They are the best people to help you. VS2005 is the latest version of Vis ...Show All
olgaF C:\Documents and Settings\...\My Documents\Visual 2005\...\bin\debug\Reports *Spaces will not let me open .doc file in word*
Hi, if someone on here could help me, I'd really appreciate it. I am currently building a program that will be able to open excel and word documents in their appropriate programs. Heres my code: Dim Job As String = txtJob.Text Dim str2File As String str2File = "" str2File = Application.ExecutablePath str2File = str2File.Substring(0, str2File.LastIndexOf( "GaugeHelper.EXE" )) Dim wordstart As New Process wordstart.StartInfo.FileName = "winword.exe" wordstart.StartInfo.Arguments = str2File & "\Reports\" & Job & "\" & Job & ".doc" w.Start() I can get it to work, except for one thing, When you use the common folder name \Documents and Settings\ Word will try to ...Show All
gharen1234 Selecting a TreeNode by RIGHT CLICKING on it, I m using VB.Net, VS2003
causing the AfterSelect() TreeView event by right CLICKING the TreeNode I m using VB.Net, VS2003 The AfterSelect event [say, Private Sub TreeView _AfterSelect() ] is called when we first time LEFT CLICKS a tree node in the treeView, right clicking the node doesn't selects the desired node. How can we cause the system to select the desired node when we RIGHT CLICK on it Also can we create a Node_Click event for treenodes / treeview in VB.Net [like there was one in VB6] Also if this post is not relevant to the thread topic, please guide me where should i ask questions about configuring various controls ok, tks very very much for the reply but will the mouse down event catch the RightMouseButton ...Show All
Philip Jaques Window size when using multiple monitors. Form centre center scren.
I have a Matrox Parahielia 3 monitor video card. Whenever I open a new window in the IDE it stretches it across all three screens. Is there a way to make the windows open onto the center screen at a certain size in a certain position for any new window so I don't have to resize every window to work with them Thanks see solution here: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1119885&SiteID=1&mode=1 I am having the problem while writing code in the IDE and not when the application is running. I can position windows in the application with no problem. When I open say the locals window it covers the full three screens and I have to resize it down to be able to work wit ...Show All
Colin Hardie run application in back ground
hi all i have prepared an application which dose not take any user input and the aim of the application is to take screenshots at a regular interval of 5 min i am using vb.net 2005 for this i have taken a form and in that form i have placed a timer control and in timer trick i am calling the function which takes the screen shot my requirement is to set up this application and this should run in the back ground and the user should not be able to cancel or stop the running of the application can any one suggest me how to do this the application should run in the background it self and this should start when ever the system boots this is showing a following exception of "the handle is invalid" when i start ...Show All
suryany VB Upgrade Wizard problem
Hi, Am having issues upgrading from VB6 to VB.Net 2003. I am getting error messages and the following output (the names have been change to protect the guilty ): < xml version="1.0" encoding="utf-8" > <UpgradeLog Upgraded = "True" > <Settings> <Setting Name = "LogFile" Value = "test.log" /> <Setting Name = "GenerateInterfacesForClasses" Value = "FALSE" /> <Setting Name = "ProjectName" Value = "test" /> <Setting Name = "OutputName" Value = "test.vbproj" /> <Setting Name = "OutputDir& ...Show All
