Anders Pettersson's Q&A profile
Visual Studio Setting File Name
Hello All, I have been searching high and low for the answer, hope someone can shed some light. I am using the crystal report viewer object in my application and I would like to provide a default filename in the file dialog box for the export functionality. This is what I currently have in my code, ========== start of code segment ========== ReportClass myReport; // initialized somewhere else CrystalDecisions.Shared.ExportOptions opts = myReport.get_ExportOptions(); opts.set_ExportFormatType(ExportFormatType.PortableDocFormat); opts.set_ExportDestinationType(ExportDestinationType.DiskFile); CrystalDecisions.Shared.DiskFileDestinationOptions fileOpts = opts.CreateDiskFileDestinationOptions(); fileOpts.set_DiskFileName("c: ...Show All
SQL Server SQL Server 2005 does not allow remote connections
Hello , The problem is that we are having Problem while making the remote Connection to the Sql Server 2005 Basically We are having a problem connecting to SQL2005 through a package remotely. when we try to connect to a remote data base, we get the following error [Connection manager "CRA LRRS Development DB"] Error: An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Login timeout expired ". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "An error has occurred while establishing a connection to the server. When conne ...Show All
Visual Basic Word Interop creating Tif's on some machines but not others
I have written an application which uses MS Word to perform a MailMerge with data entered into a VB form to generate letters to be sent out to people. Some machines are expieirencing issues where a TIF file generated by the Microsoft Office Document Image Writer printer are invalid or corrupted files. I have had our Tech group make sure to apply the SP2 patch to all of the users MS Office. The version of the MODI Writer printer matches mine along with my test boxes. Some documents will be generated find and appear in the image viewer fine but some others do not. I cannot replicate this behavior on any of my machines as all of the documents generate fine and submit to our document storage system without a problem on my development machine a ...Show All
Visual C# Disappearing scrollbar top arrow point
Can anyone tell me what the heck I'm doing wrong I'm creating my form menu "on the run" and it displays fine, I can Open and save files and exit the app; however, when New is selected, the textbox appears but the top of the textbox is under the menu strip. I tried to enter this is the code to dock the control: newText.Dock = (DockStyle.Left | DockStyle.Bottom | DockStyle.Right); But got this error: "The value of argument 'value' (7) is invalid for Enum type 'DockStyle'. Parameter name: value. private void OnFormLoad ( object sender , EventArgs e ) { MenuStrip mainMenu = new MenuStrip ( ); ToolStripMenuItem itemFile = new ToolStripMenuItem ( "&File" ); ...Show All
Software Development for Windows Vista Problem with Drag & Drop
Hi! I have the following problem: In my workflow designer host application I have a toolbox implementing ItoolboxService like in the Designer Rehosting example. When I drag items from the toolbox onto the design surface, a correct drag item is shown along with the name of the activity. But when I drop them on the surface, I get a NullReferenceException in the overriden OnDragDrop event of the root activities designer, more precisely when base.OnDragDrop is called. The Activity DragEventArgs seem to be correct tho... When I use the ToolboxService class of the Designer Rehosting example, everything works fine. Although I use exactly the same serialization/deserialization methods as the example... (and the Activity DragE ...Show All
Visual Studio Express Editions how some help fix my code?
'Create a new MailMessage object and specify the"From" and "To" addresses Dim Email As New System.Net.Mail.MailMessage(" From@abc.com ", " To@abc.com ") Email.Subject = "test subject" Email.Body = "this is a test" Dim mailClient As New System.Net.Mail.SmtpClient() 'This object stores the authentication values Dim basicAuthenticationInfo As _ New System.Net.NetworkCredential("username", "password") 'Put your own, or your ISPs, mail server name onthis next line mailClient.Host = "Mail.RemoteMailServer.com" mailClient.UseDefaultCredentials = False mailClient.Credentials = basicAuthenticationInfo ...Show All
Windows Forms Accessing the Html page having activex control through internet explorer using UNC path
Hi, While accessing the Html page having activex control through internet explorer using UNC path, IE (6.0 sp1 on windows XP SP2) fails to load the page. for eg: \\localhost\check\client.HTM here the "client.HTM" has an activex control created in vb. Any other way to load the page in IE using UNC path Thanks in advance. Regards, Kailai ...Show All
Visual Studio Express Editions Web Form Tpye Program
Hi, Im new at programing and I'm making a program and I want to add a "help" feature. I want it to have a "web forms" type look where you answer question(s) in 1-5 textbox's. Then have that string sent to me somehow. I don't want the user to have to type an e-mail, they would just the textbox's inside my program. Please help, -Josh be sure you did activate your account and you can login via webmail. Overall the code should be this, be sure to import System.Net and System.Net.Mail namespace. Change the [at] to the proper at symbol: Dim theMailMessage as new MailMessage(" ieatyourunits[at]bluebottle.com ", " to@someEmail.com ") theMail ...Show All
Visual Studio Express Editions Installation error
I have tried to instal C# express 2005 online and from cd and it doesn't work. It has to shut down the installation beause of the error it has nothing but in C:\DOCUME~1\Robert\LOCALS~1\Temp\VSW 2 \VSSWMSIFailInfo.txt it has the following ====================== MSI CA LOG ENTRY INFO: ====================== 12/19/06 14:33:51 DDSet_Entry: CHelpCrypto constructor 12/19/06 14:33:51 DDSet_Exit: CHelpCrypto destructor 12/19/06 14:33:52 DDSet_Status: BeginTransaction()->IHxRegisterSession::CreateTransaction() returned 80004005. 12/19/06 14:33:52 DDSet_Status: BeginTransaction()->Registration session {7E7D7935-B0C8-4032-80BA-2CDC9E43C3B8} was *not* created. 12/19/06 14:33:52 DDSet_Exit: CM ...Show All
Windows Forms non-bound grid control in .NET? (like MSHFlexGrid)
I'm halfway through writing a mini spreadsheet-like application in VB6 where the user can freely enter text into a table of cells, format them, get results from simple maths, etc. I would now like to rewrite in VB 2005 Express but can't find a suitable unbound grid control to replace MSHFlexGrid in .NET. I would prefer not to use a COM component if possible (and have seen quite a few worrying notes in the forums on MSHFlexGrid behaving badly in .NET). Is there a .NET based control I could use DataGridView seems to insist on being bound to data so isn't suitable (unless there's a property I can set to unbind it ). My application won't be bound to data, but lets the user type whatever data they want into the cells. ...Show All
Visual Studio Express Editions Numeric Textbox
Numeric TextBox Like In visual foxpro that has fixed 0.00 we set the mask "9999999.99" and set value =0 the textbox has fixed 0.00 but in how can i do this in vb.net 2005 is this not the same question as this http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=669951&SiteID=1 ...Show All
Visual C# How do I create and use C# DLLs?
Hello all, I am trying to create my first C# DLL and I am having some difficulty. This DLL will house some common authentication functions. I will need to use the DLL functions on the front of many different C#.NET web applications. I do understand the basic concept of DLLs and thought I could just jump in and create one. So I created my DLL, added my functions, and referenced the DLL in a test web page. But when I tried to access the functions in the test app there were no functions available in the namespace. So I clearly did not create the DLL correctly. I am looking for a tutorial or a step-by-step example that I can follow. Thank you in advance for any help/references you can supply, Chris ...Show All
Visual Studio Express Editions Deserialization
This is very aggrevating!!! I have serialized three simple questions (textboxes) that is entered by the user. I cannot figure out how deserialize and have the three textboxes show what I have serialized My code (Visual Basic Express) on my main form is as follows: Imports System.Xml Imports System.Xml.Serialization Imports System.IO Public Class Form1 Private theCollectionOfPatients As New ArrayList() Private Sub DoSerializePatient( ByVal patientcollection As ArrayList) Dim theTypes(1) As Type theTypes(0) = GetType (ArrayList) theTypes(1) = GetType (Patient) Dim theSerializer As New XmlSerializer( GetType (ArrayList), theTypes) Dim theWriter As New FileStream ...Show All
Windows Forms Displaying a usercontrol in a DataGridView cell
I need to display usercontrols in the cell of the DataGridView. The edit control feature, that displays a single control while the cell is in edit mode, is not sufficient. I need to display multiple controls, of different types (plotters, gauges, etc) in multiple cells. I read the warnings about this feature not being supported by DataGridView. Unfortunately, I can't seem to find ANY .Net grid on the market that supports this feature. With trepidation, I tried it anyway. I made a custom cell that creates a user control and used the Paint override to move the control into the cell display rectangle. It sort of works, but there are a few boogers: 1. The grid steals the return key message from my usercontrols. Some of my controls use the retu ...Show All
SQL Server how to data bind in detail
HI! all Does anybody here know of a good web site that shows how to bind a database into C++/CLI managed,,, The database is going to be in the application folder... I just need to be able to add and delete entries no passwords needed... This is my first time to data bind so I am a idiot on where to start,, LOL A good start for programmming interfaces to Microsoft SQL Server is http://msdn.microsoft.com/data/Default.aspx . You can follow the Learning links, or the Focus On bar (ADO.Net for managed (C#, VB.Net etc.), MDAC/SQL Native Client for C/C++, JDBC Driver for Java). ...Show All
