Gregg Hamilton's Q&A profile
Visual C# System.Net.Mail
Hi .. this is RK, Please help me out..... I'm facing problem with System.Net.Mail... I'm getting always "Failure sending mail." message. (In my system there is no anti virus s/w installed) here is the code i'm using... protected void Button1_Click( object sender, EventArgs e) { try { System.Net.Mail. MailMessage mail = new System.Net.Mail. MailMessage (); System.Net. NetworkCredential cred = new System.Net. NetworkCredential (); mail.To.Add( "ramakrishna.burugapalli@softima.com" ); mail.Subject = "subject" ; //Este mail es el que aparecera para mostrar mail.From = new System.Net.Mail. MailAddress ( "ramakrishna.burugapalli@softima.com" ...Show All
Internet Explorer Development JavaScript Detect browser close IE 7
We have an application that logs into a system, we need to trap when a user may close the browser with the (X). In IE6 we can do this succesfully with the following code In body tag onUnload = "handleBrowserClose();" function handleBrowserClose() { if (screenTop > 9999) { //handle logout event } } Unfortunetly since IE7 the screenTop now actually contains the actually value of the top position. Does anyone have any suggestions on how to fix this in IE7 or a different way to trap that a user clicks the (X) button to close IE7 I am not the author of the timeout method, but to answer your "timeout javascript" question, here is an example (form here : http://www.htmlite.com ...Show All
Visual Studio Express Editions This File Is Potentially Harmful....
My friend and I have started programming not so long ago and I've been trying to help him along the way. However, whenever I send him one of my published applications, his computer gives him the error: windows found that this file is potentially harmful. To help protect your computer, Windows has blocked access to this file. I've looked at my security settings and they seem to be ok... what boxes will I need to tick for this code : Public Class Form1 'x, y and result are now decimal numbers '(double means a large decimal, although it can also be an integer) Dim x As Double Dim y As Double Dim result As Double 'what happens when the button is clicked Private Sub Button1_Click( ByV ...Show All
Visual C# Passing an inherited class as 'T' to a generic container.
I'm having trouble finding out how to use a general purpose generic container I wrote as a member of another class which wants to hold any class type based on a common base class. The first set of code below shows 4 seperate classes, RNode is a generic class, TreeControl has an RNode<TreeItemBase> member, and a "Root" property to access it, TreeItemBase is a control (not really important to this), and TreeItemHeader is derived from TreeIItemBase... Public class RNode<T> {} public partial class TreeControl : ScrollableControl { private RNode<TreeItemBase> root = null; public RNode<TreeItemBase> Root { get { return root; } set { root = value; } } } publ ...Show All
Visual Studio Express Editions Ugh....Driving Me nuts....
I am in the middle of writing a prog that takes a file within a directory on a HD renames it to the directories name and then places the newly named file on the root of that HD. Here is the code. and I am not getting it.....I would really appreciate your help. Thanks Imports System Imports System.io Imports System.IO.DirectoryInfo Public Class Form1 Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim dlg As New FolderBrowserDialog Dim FileNamesSelected() As String Dim SelectedFolder As String 'Dim FileFound As String SelectedFolder = Me .FolderBrowserDialog1.SelectedPath FileNamesSelected = System ...Show All
.NET Development Return argument has an invalid type - security issue?
Hi, We have a .NET remoting application server, which works great by itself. We are currently evaluating a commerical automated testing tool, that loads the application server's API assembly and simulates a client connection to the server. However, under this scenario the proxy object does not succeed in dealing with complex objects, and we get the "Return argument has an invalid type" error in return. We figured it has something to do with security issues but couldn't find any solution. We are using a tcp binary channel with typeFilterLevel=Full. The interface for the complex object AND the complex object itself are defined in a separate assembly (ApplicationServer) then the API (ApplicationSeverAPI). Thanks, Ron ...Show All
Game Technologies: DirectX, XNA, XACT, etc. First Person Perspective
Can anyone explain how I could modify the 3D Tutorial so that I can control the spaceship from a FPS view. Currently the tutorial allows you to control the ship and move it left right etc. But how would I simulate being inside the ship I hope this makes sense. You can just change where the control is moving the ship. Change it to move the camera instead. You might be interested to check out this project http://www.gameprojects.com/project id=92461318be ...Show All
Visual Basic Array of Objects
I have a class, say Detail(Name,Address). I want to declare an array of objects for the class Detail. I am doing it as follows: dim i as integer=10 Dim MyArray() as Detail=New Detail(i){} Now when I try to access any array elements as: MyArray(0).Name it generates a 'Object Reference Not Set to an instance of object' exception. Why is it that the objects are not being allocated memory when I am declaring the object array with new keyword dim i as integer=10 Dim MyArray() as Detail=New Detail(i){} is equivalent to Dim myarray(i) As Detail Normally you would put the initial contents of your array between the curly brackets { }. However, you would then come across another problem because once you d ...Show All
SQL Server MS Access Memo field to SQL Server text field
Hi all, i've a reasonable amount of experience with MS Access and less experience with SQL Server. I've just written an .NET application that uses an SQL Server database. I need to collate lots of data from around the company in the simplest way, that can then be loaded into the SQL Server database. I decided to collect the info in Excel because that's what most people know best and is the quickest to use. The idea being i could just copy and paste the records directly into the SQL Server database table (in the same format) using the SQL Server Management Studio, for example. Trouble is, i have a problem with line feed characters. If an Excel cell contains a chunk of text with line breaks (Chr(10) or Chr(13)) then ...Show All
Windows Forms visual .net vs visual 2005
Hi. I'm interesting in buy the lastest version of Visual Studio but I have a doubt. What is the lastest version Visual Studio .Net or Visual Studio 2005. Thanks for your answers ...Show All
Visual Studio 2008 (Pre-release) WPF and Visual Studio
I am using Microsoft Expression Blend and Zam3D to generate enhanced user interface. I am facing two problems: 1) I want detailed resources about Blend (I have found good resources about using Zam3D including some long videos) but there is a lack of resources when we talk about Blend. 2) The next problem is somehow it seems that my Windows copy is illegal, and subsequently it is not enabling me to download it. Is there a way where I can utilize the XAML code generated from Blend and ZAM3D in Visual Studio without using Orcas extensions Regards ...Show All
.NET Development Replacing non-alphaNumeric Characters in a String
Still having problems with my string manipulation(!) I have managed to reduce the string to the maximum of 15 chars (Thanks Wivvy). But before I do that, I need to take out unwanted characters. I have done the following and although I don't get an error, it doesn't actually seem to do anything with the string (apart from reduce the maxiumum length to 15 chars): get { // list of non AlphaNumeric characters to remove and remove these characters string removeChars = "!*-_ ():<> @"; m_newReference = m_reference.ToString().Trim(removeChars.ToCharArray()); // check that length is not over 15, if it is, remove extra characters if (m_newReference.ToString().Length > 15) { return m_newRef ...Show All
Visual C# How to change the name of C# Project
Dear friends my question may sounds little bit different. yes it is how to change the name of C# project. i have made a .dll file using VS2005 C# it contains several class files and windowsforms and referal dll's now after finishing that project i just want to change the name of the whole project. any guide lines to follow. Thnaks and regards Ranu thanks if i change the both *.dll name and *.csproj name is that enough is that changes change the name every where(like name spaces and displayname and all) regards ranu ...Show All
Visual Studio Team System Which table in the TfsWarehouse db has the "Severity" field?
If you open up the "Active Bugs" list in Tfs, you will see a combobox field named "Severity" that has four items in it - Critical, High, Low, and Medium. Which table in the database houses this field and what is the field name If the field is a foreign key, what table does it relate to Thanks for your help! Bo I don't have a configured machine in front of me at the moment but I believe Severity is not marked as being a reported field. So out-of-box it is not persisted in the reporting databases. You can use WitExport.exe and WitImport.exe to change the "reportability" of a field. These tools are located in %ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE Command-Line Tools: http://msd ...Show All
Software Development for Windows Vista using "new" in rule set editor
I am trying to use the keyword "new" in a ruleset editor action, yet the parser says: "the identifier "new" cannot be resolved" Any suggestions thanks ...Show All
