Jas98004's Q&A profile
Visual Basic Something's wrong with the bitmap.FromStream method --- can anybody help
Good day guys, I have here a code that loads an image from a database. It converts it into a byte array and writes it into a memory stream. then I tried loading the memory stream into a bitmap class. but everytime I use the Bitmap.FromStream() method i get the following exception. System.ArgumentException: Parameter is invalid can anybody tell me what's wrong with my code. thanks ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Dim myByteArray() As Byte = dtEmployee(0).Picture_IM If myByteArray.Length > 0 Then '' Create a new MemoryStream and write all the information from ' ...Show All
Windows Forms execute click button's event as a reguler method
I need to execute click button's event from other method. I have a click method where is a lot of database instructions, but from another part of my program I need to execute same procedure, so, Can I call Click button's method as a normal procedure. I try : button1.Click(this, EventArgs.Empty); but I get an error that Click only must appear at left side..... ok, how can I call it thanks in advance for your help, Edward Yes, you can use the button.PerformClick() method to invoke the click event of your button, and this works fine. But i recommend to you to extract all the logic of "button1.Click" to another method. Then you can to call this method from another methods or objects events such as ...Show All
Visual Basic Common Language runtime detected an invalid program
We have developed a Window Application in VB.NET (Framework 1.1) with Back-End MSDE and with Crystal Reports. We haven’t got any issue as long as we run the application in our development machine. Also we deployed it in many clients and it works fine But in only one client place, we got the following error ‘ Common Language runtime detected an invalid program’. The application contains many forms with many controls (More or less 100) But the issue comes only in one form when it is opening Configuration of the Client Machine Processor : AMD OS : XP professional We will be thankful if any one provides solution for this… Hi DMan1 Thanks for your reply. ...Show All
Visual Studio Team System Set up: Set Permissions Work Item
The "Agile" template says that you should add Team Members to one of the four security groups: Build Services, Project Administrators, Contributors, or Readers. Technically you shouldn't add Team Members to Build Services because this group is for service accounts only. ...Show All
SharePoint Products and Technologies I want to Add Multiple Template in Document Library
hi all, I was trying to add Multiple template (doc,powerpoint ,Excel) in Share point Document Library . i created content Type programmatically. but i couldn't upload the Document Template. to the ContentType i was trying with feature .xml but thats also not working is there is any way to add multiple templates in document library. http://blog.henryong.com/2007/02/12/how-to-create-document-templates-for-document-libraries/ ...Show All
SQL Server Using CASE in WHERE statement
Hello, This is what I'm trying to do : ALTER FUNCTION [dbo] . [CAExportSelectAll] ( @CodeLabel nvarchar ( 255 ) ) RETURNS TABLE AS RETURN ( SELECT CodeLabel FROM CAExportPreSelect WHERE ( CASE WHEN @CodeLabel = 'CLASSIQUE' THEN CodeLabel = 'NV' ELSE CodeLabel = 'MT' END ) ) It doesn't work, and tells me there's something wrong in the WHERE statement. Where am I going wrong Thanks very much. ALTER FUNCTION [dbo].[CAExportSelectAll] ( @CodeLabel nvarchar(255) ) RETURNS TABLE AS RETURN ( SELECT CodeLabel FROM CAExportPreSelect WHERE (@CodeLabel = 'CLASSIQUE' A ...Show All
Visual Studio 2008 (Pre-release) WCF for high troughput scenarios?
Hi, I was wondering if WCF is usable in scenarios where high throughput has to be achieved . For example a financial market data service that broadcasts market data via UDP (roughly 10k messages/sec). It's important that packets are as small as possible .. can this be achieved with WCF or is there always a high message size overhead Thanks, Tom I think that's not really what I was looking for. My question is targeted more on the message size and throughput efficiency. How much of an overhead in bytes does WPF add to messages in its most optimized way I need data broadcasted via UDP, reliablity is not really an issue, but it's a lot of data and minimizing the latency is essential. Thanks, Tom ...Show All
Windows Forms How to handle errors?
Hello, If some programming state is not okay (like finding that a SerialPort is not open prior to sending data) I would like to show some error message. I would like to handle all error messages-displaying in a central place by a single function. How do I achieve this (As a newby in C#, in Borland C++ I was used to use a global string for storing the error messgae which is displayed when all nested functions return false). But C# does not allow a global string( ), or what other mechanism is usually applied for this purpose All tips and hints are welcome. regards, Henk Henk You can certainly have global variables in C# it's just that the scoping rules are ...Show All
.NET Development Multiple elements in a configuration section
Hello All, I would like to know whether it is possible to have multiple configuration elements with the same name within a custom section. Changing the element name to say "operation1" instead of "operation" (see sample file below) seems to work but i would like to use the same element name. I think i have to set something like maxOccurs=unbounded but not sure where to do it inside my custom classes. I have already implemented custom classes inherting from ConfigurationSection,ConfigurationElement and ConfigurationElementCollection to implement the stuff below. Am i missing something Currently if i add multiple elements with the same name within the section i see the following error "The element <opera ...Show All
Visual Studio Cannot create a new Store
Creating a new Store object in code is not working for me on the June CTP. I'm passing the type of a DomainModel class into the constructor, and it is giving an exception: Microsoft.VisualStudio.Modeling.DomainDataNotFoundException was unhandled by user code Message="Domain object with identity Microsoft.VisualStudio.Modeling.Diagrams.Diagram was not found in directory." Source="Microsoft.VisualStudio.Modeling.Sdk" It seems that it is looking for the Diagram class and not finding it. Passing the Diagram type directly does not help (it is rejected as not a DomainModel). I can see that the Diagram type is included in the types returned from GetGeneratedDomainModelTypes. Can anyone give me any sug ...Show All
SQL Server Is this possible without using cursors?
Hi! I have 2 tables: Person and Address Person ( PersonID int PK ) Adress ( AddresID int PK, PersonID int FK, Default -- 1 if address is default for person ) so when I join those table it yelds (for example): p1 a1 1 p1 a2 0 p1 a3 0 p2 a4 1 p3 a5 0 p3 a6 0 Person may: - have one default addres and some non-default; - haven't default address; - have only default adres So proper result is: p1 a1 p1 a1 p2 a4 OR p2 a4 p3 a5 p3 a6 I ...Show All
Visual Studio Team System TF.EXE difference command and versionspec
I am trying to determine the difference between my workspace and latest and am using the following command from inside the workspace folder >tf difference /version:W~T /format:unified I get the response TF10100: The option version is not supported. That does not seem right. Or am I doing something incorrect -mark Thanks for the pointer to ProjectDiff at http://blogs.msdn.com/buckh/archive/2006/04/06/project_diff.aspx . With a little code commented out it appears that >projectdiff W T gives me almost what I want. However, the call in DiffFiles(..) to // The last parameter indicates whether the code should block until the external diff // viewer exits. Set it to false if you a ...Show All
Software Development for Windows Vista Statemachine Design and NullReferenceExcetion
Hi all, could anyone please tell me: - how can i create the edge between States by statemachine - why do i have a NullReferenceException for wf-instance Creation in the sequenzial Wf Thanks a lot in advance Regards EP Hi. no with workflow you can treated as type Dim workflowInstance As WorkflowInstance workflowInstance = workflowRuntime.CreateWorkflow( GetType (Workflow1)) workflowInstance.Start() the workflowRuntime object have CreateWorkflow Method that allowed you to set the Workflow as type by using GetType() that return the workflow as type. check your code and inform me whats happend. Best regard. ...Show All
Visual Studio output file path from a build
I can complie a project using IVsBuildableProjectCfg.StartBuild method. But I am not able to locate the interface (method) that would give me the output filepath. I would like to know the full path of the output. Thanks. You have two choices. One is to get the output groups for the item, find the built output group, then find the first output. You could also use the automation model. The following macro will show how to do it: Public Sub FindOutputDirectory() Dim proj As Project Dim config As Configuration proj = DTE.Solution.Projects.Item(1) config = proj.ConfigurationManager.Item(1) MsgBox(System.IO.Path.GetDirectoryName(proj.FullName) + "\" + con ...Show All
.NET Development XUpdate using C# help
Dear All, I couldn't find any way to update XML doument using XUpdate returned. Please advice if the .NET framework contains any namespaces or classes to work with XUpdate documents If XUpdate refers to http://xmldb-org.sourceforge.net/xupdate/ then I don't think the .NET framework has support for that. .NET has support for XSLT and XPath 1.0 however. ...Show All
