Vegar Imsland's Q&A profile
Visual Studio Express Editions Copy image/graphic from panel/drawing surface to richtextbox
I have the following code which allows freehand drawing using a mouse. It uses a panel as drawing surface. I will add the ability to load background images on the panel so can draw on that bmp. Now after all the drawing, I want to ensure its one image, a bmp, copy to clipboard then paste it into a richtextbox on another form in the program. Now attempting this I have tried several approaches. None have worked at all. The online tutorials or samples to study I can find are many years old and many version of basic ago. None work of course. Here is my base code for drawing. Any advice, or directing me to a tutorial, sample, or a reference book would be greatly appreciated. From what I read, this should work. There wa ...Show All
Windows Forms Editing in Datagridview!
Wadup! I have a GUI with a datagridview . The user can select some data (out of an integrated table) and the selected data from this table will be automatically written into a row of the Datagridview. Now that the data has been entered in the datagridview row, i want to implement a feature in which the user can manually go to row( with a mouse click for example) and make some changes in the data (for example change age=23 to age =24) which was automatically transferred from the table based on user selection. so basically i want to implement edit functionality for a datagridview row on a mouse click event after some data has been entered in the row. Ho do i do it Cheers! The DataGridView de ...Show All
Software Development for Windows Vista Transaction Scope in WWF not working using WCF services
I do face a problem in using Transaction Scope of Windows Workflow Foundation with Windows Communication Foundation services. The scenario is that the Transaction Scope consists of a Custom Code Activity and two other normal code activities.The two code activities uses stored procedures to insert in the database whereas the custom code activity makes a normal insertion into the database. While using this I face the following problem,when the application is executed the first time it makes a successfyl entry in the database where as when executed continuously it does not insert in the database. I tried to implement it using the waitHandle.WaitOne() method,this method made an entry but also threw an service timed out exception fo ...Show All
Visual Basic What is a class
Absolute beginner to Visual Basic .net. I have experience of using Microsoft Access VBA and have managed to write a few applications which pull data from our system using ODBC. I am really self taught and have managed to develop what VBA skills I have using the internet - know what I wanted to do but didn't know how in VBA so found someone who had.... I am due to go on a beginners course on VS 2005 (VB.net) and would like to try to build some knowledge up in advance. Could someone (in plain English) please explain to me what a class is Appreciate this is probably basic stuff for you guys.... A class is an 'object' (a 'thing'). The typical example used is an 'Animal' class. The class can have properties. For exa ...Show All
.NET Development Copying files over a network - best way?
Okay, here goes... Machine A and Machine B are on the same LAN. There's a file, or more a series of files, in different formats on Machine A. On Machine B there is a Card Reader or USB type storage area. On Machine B, there is a .NET Application, not sure yet if it's going to be a smart or thin client. The job of the .NET App is to copy a file from Machine A to Machine B. Also, it would be nice if it showed a progress bar of the file coming across. I'm relatively new to .NET - any tips or ideas on the best way to go about doing something like this Mods - not sure if this is the correct area to post this thread in - please move if necessary If folders from which the files have to be co ...Show All
Visual Studio 2008 (Pre-release) GridSplitter in Style causes NullReferenceException
The following produces a NullReferenceException; however, if you remove the style and place the contents of the ControlTemplate in the window it works fine. Any ideas on what I'm doing wrong Thanks Doesn't work: <Window xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml " Title="Test" Height="300" Width="800"> <Window.Style> <Style BasedOn="{StaticResource {x:Type Window}}" TargetType="Window" > <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetTy ...Show All
Microsoft ISV Community Center Forums Sum of hours for month following submission date only
Hi - im a little stuck on one part of my system. Thanks to the help of others i can now get users to enter a submission date into the activity system that then restricts them from editing any activities prior to that submission date ( a field called 'datelastsubmitted'). However on that end of month submission form i also need to show the sum of all hours for the month that is to be submitted next. By this i mean that if a user last submitted on the 31/10/2006 then the next time he comes to submit he will see the sum total of activity hours he /she has entered for November 2006 i.e 01/11/2006 to 30/11/2006. The field is called 'availablehours' and the code i have written does sum up the availablehours for the user but im unsure as to how t ...Show All
Visual Studio Team System Issues in using reporting services we are using vs2005 and adding reports "*.rdlc", and are facing with follwoing issues
1:- There is one Main report having 2 subreports in it, each sub reoprt has it own header and footer but when its called from Master report, the header and footer of the sub report doesnt show on the Master report, how to make them visible. 2:- If we need to add some customize code for the report, we used the CustomCode tab that appear when Properties link of that report is clicked, how can we acess the items on the report under that code like if the report has the subreports, tables and want to acess their visibility is there any way. 3: -How can we check in the cutomcode of the main report that which subreport is being runned, is there any property through which subreport name can be acessed. ...Show All
Windows Forms how to put this...please helpme ..
hi all may be my question ll be easy for u but please tell me how to do this .. i having a grid view in my page .. am using select query and gettin the executed query in dataset and binding the gridview with this dataset i want to add a edit button at the end of the each row in gridview please tell me how to do this and how to call that editbutton for the code if i click on editing i should get tat window as like default edit comes with the gridview how to do this please help me out When you say 'page', is it a form, or a web page If it's a web page, you should ask at www.asp.net , ASP.NET questions are off topic here. ...Show All
Visual Studio Express Editions Counting Pixels in a 1-bit Image
I kind of brought this up before, but the topic headed off in a different (yet constructive!) direction. I have a 1-bit image. Of course, this means that pixels are either "on" or "off". Is there a way to quickly find out how many pixels are set on I don't need to know which bits are set, just how many. Is there a way to do this without using "GetPixel" on every pixel I was thinking I can read in each bit, then find the unique values (0 or 1), but the image is large (25M pixels) and this method may be too slow. Any other ideas As always...thanks! Well, as usual nobugz, you've given me a wealth of great information. And as usual, I've hit a road block with the ...Show All
Visual Studio 2008 (Pre-release) XmlDataSource + path set to 'Name' = what's going on?
Hi. Something's happening that I don't understand, and I wondered if any of you guys could shed some light on the situation. Consider a simple textbox, with a binding set as follows: < TextBlock Grid.Column = " 0 " Grid.Row = " 2 " x:Name = " TestText " Width = " 400 " Text = " {Binding Path=Name} " /> The data context is set to an XmlDataProvider defined in the code, into which I load some XML All pretty standard stuff. On running, the text box contains the name of the element the XmlDataProvider's Path is set to. How does it do this My understanding is that the "Path=Name" binding should bind the text attribute of the text box to an attribute of t ...Show All
Visual C# IEnumerable issue
Hello, I am trying to compile my code(a console application) with the following class, and it gives me the error (CS0536) as shown below. However, if the CityCollection class is implemented as a regular class without any inheritance from the IEnumerable interface, it compiles OK. Any ideas/thoughts Thanks!! Code: CityCollection.cs using System; using System.Collections.Generic; using System.Text; namespace TestIEnum { public class CityCollection : IEnumerable<string> { string[] m_Cities = { "New York", "Paris", "London" }; public IEnumerator<string> G ...Show All
Visual Studio Express Editions Winsock Where is it?
Where do I find the Microsoft Winsock Control 6.0 A website told me to load that component but I dont know how help please thanks. you would be better using the .NET Classes since they are easier and are specialized in some way as well as on the .NET platform, than using the "old" tools and classes/components http://msdn2.microsoft.com/en-us/library/system.net.sockets.tcpclient.aspx http://msdn2.microsoft.com/en-us/library/system.net.sockets.tcplistener.aspx http://msdn2.microsoft.com/en-us/library/system.net.sockets.networkstream.aspx examples and docs are included in the links. if you still want to, which I would advise against, use the WinSock control, you need to browse ...Show All
Visual Studio Team System Team System: Understanding Why we need to do Branching
I want to understand why and when need to do branching Here is my scenario: We have a main project in TS. When we do a release (version 1.0) and start developing for the next version(2.0), should the main development for the next version (v2.0) continue in the main trunk and the branch should be the release version (1.0.1, 1.0.2...) and maintain it for hot fixes or should the main trunk have the 1.0.1, 1.0.2.. and the branch be the 2.0 version so that when 2.0 is ready for release, merge it with the trunk. Is there any common practice for branching Thanks Thanks for information. We decided in using the 'Trunk' as development and the production version as a branch which will get updated every time we do a build to production. ...Show All
Visual C++ Why do I get 'System.ArgumentOutOfRangeException' with this code?
Create a WinForm project then replace code in Form1.h with the following code: (The code inserts a ListView, then add 5 ListViewItems to the list): ////////////////////////////////////////////////////////// #pragma once namespace test980987 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; public ref class Form1 : public System::Windows::Forms::Form { private : Generic::List<ListViewItem^>^ lst; public : Form1( void ) { InitializeComponent(); lst = gcnew Generic::List<ListViewI ...Show All
