bolle's Q&A profile
Windows Forms How do I get the active item in a listview?
I'm trying to make a method where I doubleclick on a listview item, and a button should then be added on a panel with the listview item's text Thanks for the answers. I did it this way; ListViewItem activeItem = new ListViewItem(); activeItem = listView1.SelectedItems[0]; MessageBox.Show(activeItem.Text); This only writes yout the first element in the list of selected ...Show All
Visual Basic Assembly Side-by-Side Version
I Have 2 Assembly with the same name First is MCIT Ver 1.0 Second is MCIT Ver 2.0 I already make a sign key for both and installed to GAC I want to switch between the two assembly in run time please help ...Show All
Visual C# How to get total memory of computer
How to get total memory of computer by using C#. Can you instruct me, thank you very much. Reece Williams wrote: Is "Environment.WorkingSet" what you're looking for No, Environment.WorkingSet contains the number of bytes of meomory that are mapped to the process. You can use WMI, here is a working example and article. ...Show All
Visual Studio FormatDateTime expression
I'm trying to use the expression editor to show just the date component of a date/time field. This is the expression that shows the whole date/time: =Fields!OrderDate.Value So I tried =FormatDateTime(Fields!RequiredDate.Value,"MM/dd/yyyy") which returns ##error. Ok, so I tried DateFormat.ShortDate, which won't compile. I tried it in quotes. I've tried just about everything. What does work is setting the format property of the textbox to MM/dd/yyyy, I'd still like to know how to use the FormatDateTime function to do the same thing. try this: http://forums.microsoft.com/ ...Show All
Windows Forms How to add design-time support for custom control "wrappers"
Adding design-time support for custom controls (i.e. MyButton) is well-documented. But the problem I am having is my control is just a wrapper (interface, that is implemented by a class which inturn holds a reference to the actual control) around the original control. Let me set the context first and then onto my question: We are using multiple sets of 3rd party control libraries (the standard winforms controls is one of them). Since we have different UI (for the same app), it wasn't feasable to have users (developers, end-user, etc) interact with the actual control and modify its properties/add children. So we have basic interface ...Show All
Software Development for Windows Vista Ifelse activity in workflow
How can I set the condition for the ifelse activity . how do I invoke the branching based on the condition. Raskal, I ended up writing an IfElseActivity of my own, due to an additional requirement I had. My requirement was to select multiple conditions for the branch, and I also wanted to pass parameters to the conditions. So I implemented an ifelse activity that takes conditions in the form of activities that implement an interface called IConditionActivity. You can go have a look and download the solution at: http://dotnet.org.za/hendrik/archive/2006/07/04/53953.aspx ...Show All
SQL Server Can't compile mkacls.cpp as suggested in BUG #: 374329 (SQLBUDT)
from cl.exe I get a bunch of linker errors: /out:mkacls.exe mkacls.obj mkacls.obj : error LNK2019: unresolved external symbol __imp__CryptGetProvParam@ 20 referenced in function "struct _SECURITY_DESCRIPTOR * __cdecl GetSecurityDesc Dacl(unsigned long)" ( GetSecurityDescDacl@@YAPAU_SECURITY_DESCRIPTOR@@K@Z ) mkacls.obj : error LNK2019: unresolved external symbol __imp__GetSecurityDescrip torDacl@16 referenced in function "struct _ACL * __cdecl GetDacl(struct _SECURIT Y_DESCRIPTOR *)" ( GetDacl@@YAPAU_ACL@@PAU_SECURITY_DESCRIPTOR@@@Z ) mkacls.obj : error LNK2019: unresolved external symbol __imp__SetEntriesInAclA@1 6 referenced in function "s ...Show All
Visual Studio IVsSolution::GetProjectOfUniqueName returns E_FAIL
Hello, I'm trying to use IVsSolution::GetProjectOfUniqueName to get the IVSHierarchy of a named project. I've used IEnumHierarchies to verify there is only one hierarchy in the solution, but when I call IVsSolution::GetProjectOfUniqueName, it returns E_FAIL. What might cause this problem Thanks, Notre Hi Notre, thanks for the excellent repro steps. So on the call to project.UniqueName returns a name like project2. Usually project systems like vb or C# will return a uniquename like project2\project2.vbproj or project2\project2.csproj. When we call GetProjectOfUniqueName, it will ...Show All
Visual Studio Express Editions directory listing into an array or file
I apologise if this has been asked before but i have been trying to use the search for over an hour now and cant find anything. I have made a tree view window, that gets populated with the files found on the computer. then when one directory is selected it location is displayed in a textbox. i am now trying to get all of the files from that selected directory into a file, or an array so i can then compare them, as i am doing this twice. sorry no source code, as i am finding it hard to find a site that will show the syntax for GetFiles(), and GetFileList() to see if these can solve me problem, if you know of any please tell m ...Show All
Visual Basic Processing Serial Data
I need the reduce the processing time in a uMicrocontroller to allow faster sampling times. This has creates a problem in the data collection routine in VB. The old system collected the analog data a converted it to a decimal format before sending it to the serial port. This data is collected and saved using Hyperterminal. The VB program would, when run, would open this file and process the decimal data by graphing it. What I need is to capture the data directly and process a binary word. All attempts to run the graph program have failed! I'm sure it's in the way I'm reading the data. I've not been able to find much informatio ...Show All
Visual Basic A Modest Proposal for Microsoft
I've been a Basic programmer for over 30 years and that whole time I've endured the constant reminder that I'm not a "real" programmer. I know better and you know better but still there's that stigma associated with being a Visual Basic programmer vs. being a C++ or a C# programmer. Now that I use VB.Net it really couldn't be further from the truth since VB.Net does everything any contemporary OOP language does. So here's my suggestion, since Visual Basic.Net is about as much like Visual Basic as C# is like C, why not change the name of Visual Basic.net to B# Now instead of being a VB programmer, I'm a B# programmer. Sound ...Show All
.NET Development mixing generics and unsafe code
public unsafe virtual T Read<T>( ) where T: struct /*Do I need write something other */ { byte * data = stackalloc byte [ sizeof ( T ) ]; ... if ( invert ) for ( byte * left = data, right = data + sizeof ( T ) - 1; left != right; left++, right-- ) { byte tmp = *right; *right = *left; *left = tmp; } ... } Is it possible to get size (in bytes) of generic type This example returns an error during compilation If you know ahead of time the possible types that T might be, another option is to have a block at the beginning of the metho ...Show All
Visual Basic Working with "File Selection" in VB Express
I'm having trouble finding and understanding the proper way to work with selecting files/directories in VB Express. How would I create a string that represents the filenames and/or directory names that are selected from a "WebBrowser" control. (For instance - Viewing a web page (or in this case a local directory), selecting one or more particular files/directories, and having those filenames/directory names display in a Textbox Any help would be appreciated... John John - Have you looked at the FileOpenDialog component It is designed for selecting files, and you can use the FileName or FileNames ...Show All
Visual Basic Image list stopping a form being loaded
Hi I have just started a project using the explorer form template as my main form. This template has an imagelist for the treeview I have just added an imagelist for the Listview but if i add any images to it My form wont load and i get an unhandled error exception with the error as "index out of range" ! aaaa This is before i tie the listview to any control! as an experiment i tried adding another image to the treeview imagelist and got the same error i tried linking the list to the listview but nothing makes any difference , I cant find out where the error is being initiated as its in the form code. Any idea's would be appreciated Thanks ...Show All
Visual Studio Express Editions Running VB 6, VB.NET 2003, and VB Express 2005 on the same PC
I currently have VB 6 and .Net 2003 Installed on one PC. Can I install VB Express on it as well without any issues Yes, it appears to work just fine on my development PC: I have all three installed, including C#2005, VWD (2005), SQL Server 2000/MSDE and SQL2005 Express. I seem to recall a Microsoft article indicating that VB6 and 2002/2003 will co-habit with no problems, and one saying that 2003 and 2005 co-habit together also, so I guess VB6 and 2005 should be ok. phew! ...Show All
