Georg Wächter's Q&A profile
Visual Basic VB SCript for closing program
Thanks for the advice, even a .net solution would be okay. well in .NET, depends on how you want to close a program. If you mean your own, then Application.Exit() closes your program correctly. If you mean to get a specific program and "kill" it, then try this: Dim theProcesses() as System.Diagnostics.Process = System.Diagnostics.Process.GetProcessesByName(" ProcessName ") for each currentProcess as Process in theProcesses currentProcess.Kill() next this gets a list of processes by the processname you give it, and goes through each one and kills it. You can also get the process by ProcessID using the GetProcessByID method. Does this help is this what you are after ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 2D Lines
I'm still a little new to this, and I was wondering if there was an easier way to draw 2D lines. I'm making a 2D shooter, and all the sample codes and tutorials I've found so far seem very complicated for just drawing a simple 2D line on the screen (for things like user-interface purposes). So the gist of it, as I understand it so far is : Create a List<Vector2> Create a VertexBuffer Create an IndexBuffer Setup transformation matrices (really needed for just 2D ) Call DrawIndexedPrimitves Correct If not, what am I doing wrong Any easier solutions -Charlie Not sure what you are using the lines for, but there was an wonderful article posted at http://blogs.msdn.com/manders/archive/2007/01 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. fatal error LNK1104: cannot open file " ?.exe"
I made a project that was Win32 Project for Visual C++ in VS2005. It had codes that was made by wizard and I don't select any option. I built it. but I found error - fatal error LNK1104: cannot open file " .exe". It's setting was correct. Output File : $(OutDir)\$(ProjectName).exe recently, this job was success but I setup VS6.0 and DirectX SDK Summer 2003. Visual C++ 6.0 is no longer a supported product. Please read this link about upgrading C++ , as well as this link about linker/compiler issues . ...Show All
SQL Server SQL Server 2005 install keeps failing to install SQL Services (i.e. the main engine!).
I am currently running Windows XP Professional Service Pack2. It already has MSDE & SQL Server 2000 installed (although I just uninstalled MSDE in the vain hope that it might present the installer with a more straightforward upgrade). I have tried installing with the default instance & a new instance (I don't really care - I just need to install the darn thing). I just want the basic database & Books On-line, nothing fancy. Here is the Summary log, for what it's worth: Microsoft SQL Server 2005 9.00.1399.06 ============================== OS Version : Microsoft Windows XP Professional Service Pack 2 (Build 2600) Time : Tue Feb 06 16:45:14 2007 Machine : ANTHONYY1 Product : Microsoft SQL Server Setup Supp ...Show All
.NET Development set Content-Type-Encoding in System.Net.Mail,MailMessage
How can I set the Content-Type-Encoding in a System.Net.Mail.MailMessage Seems all sevenbit bodyencoding specified will be defaulting to "Content-transfer-encoding: quoted-printable" as the mail header. And as http://msdn2.microsoft.com/en-us/library/system.net.mail.mailmessage.bodyencoding.aspx says, utf8 and some other eightbit bodyencoding will be defaulting to "Content-transfer-encoding: base64" in the header. The problem is some mail server and client mailer can not recognize "quoted-printable", in result the mail gets garbled. With framework 1.*, we can set something like message.Headers["content-transfer-encoding"] = "7bit" to specify the header to avoid " ...Show All
SQL Server Issue Exporting Date format to a delimited file.
In exporting from a OLEDB connection to a flat file. In the originating table the field for DOB is in a varchar(10) format ex. 01/17/2007. The flat file connection destination is setup as a DT_STR. When you look at the OLEDB connection table preview you see it as 01/17/2007. When it is export to the delimited <CR><LF> <|> pipe delimited the format looks like this 01/17/2007 00:00:00. The issue would be resolved with a right ragged fixed width file. But this is not the requirement for the project format fot the file. I have tried delete and recreating the connections, and even tried doing a data conversation from the OLEDB connection to a char(10). Also, thourgh the transformation services with out any luck. On the flat ...Show All
Visual FoxPro Building exe weird problem.
Hi there, I had some funny problem with my foxpro program. I had a simple form and I had intergrated it into a project. When I build the project in exe format, everything was fine. I can see the exe file. But when I click on the exe file to run it. Instead of showing me the form, the form just appear and dissapear in just a few miliseconds. When I try to run the form from foxpro, it's running fine. Anyone can help me out here Thanks in advance ... cheers. You need to put VFP into a wait tate when you run the EXE. In your startup program just add READ EVENTS immediately after the command to run the form. Impoirtant: In the exit of your menu, or the form if you don't use a menu, ensure ...Show All
Visual C# Declaring a datatype with suffix "?" ?
Hi, I have seen code samples like this: public long WorkPhoneNumber; What does the suffix " " do Thanks for any help. It is just the short form of the following statement: public System.Nullable<long > WorkPhoneNumber; Please see the following articles for details about the "Nullable Types": http://msdn2.microsoft.com/en-us/library/1t3y8s4s.aspx http://blogs.msdn.com/ericgu/archive/2004/05/27/143221.aspx ...Show All
Visual Basic Count error
Hi I have this code: On Error GoTo lille Directory.Delete(currentfolder, True ) Next lille: newtal = newtal + 1 Loop Is there a way to see if there have been an error, and maybe how many times i have this error, the code run in a loop, so i can have many of the same error. Alvin Hi I understand what you write, but i don't know how!!!!!!!! I no what error i sometime get, as you see in the code i delte a folder but if user have copy someting to this folder i get a access dinied error i have made a copy system where i don't get this error. Like: If i use my system copyfolder and take my images folder and copy this to another user then i can in my deletefolder system del ...Show All
Smart Device Development Can't make CeRapiInvoke work c#
Hello I'm using CeRapiInvoke to invoke a method from a library i've created and copyed to device. That library has a class with a static method that return the DeviceUniqueID. When i try to use CeRapiInvoke i doesn't work. I'm lost in here and would apreciate some help. To invoke it i'm using this code: [DllImport("rapi.dll", CharSet = CharSet.Unicode, SetLastError = true)] internal extern static int CeRapiInvoke(string pDllPath, string pFunctionName, uint cbInput, ntPtr pInput, out uint pcbOutput, out IntPtr ppOutput, IntPtr ppIRAPIStream, uint dwReserved); public object invokeLibrary() { string sDllPath = @"\Windows\GetDeviceID.dll"; string sFunName = "DeviceID.GetDeviceID"; u ...Show All
Visual Basic display msgbox in particular area
hi can anybody say how to display the msgbox at a particular area in the screen for the display the msgbox at 0,0 or center likewise This code will place your msgbox at desired position: CODE: 'module ' the max length of a path for the system (usually 260 or there abouts) ' this is used to size the buffer string for retrieving the class name of the active window below public Const MAX_PATH as Long = 260& public Const API_FALSE as Long = 0& ' made up constants for setting our timer public Const NV_CLOSEMSGBOX as Long = &H5000& public Const NV_MOVEMSGBOX as Long = &H5001& ' MessageBox() Flags public Const MB_ICONQUESTION as Long = &H20& public Const MB_TASKMODAL as ...Show All
.NET Development How to keep a thread running?
Hi, I have the following issue and the odd part about is that I had it already working however I don't know what I changed that it doesn't anymore. I runtime compile a class, create an instance of it and init it on a different thread. In this init the class subscribes to a couple data dispatchers and should now wait for incoming data. When I first implemented this it kept running after I subscribed to the dispatchers until I aborted the thread. However, now it subscribes and after that exits the thread. Any idea how I can keep it running without putting it in a wait loop Thanks, Tom Peter Ritchie wrote: Tom Frey wrote: The WorkItem doesn't "provide" event handlers, it "subsc ...Show All
Visual Basic Arithmetic Exception
"An unhandled exception of type 'System.ArithmeticException' occurred in system.drawing.dll Additional information: Overflow or underflow in the arithmetic operation. """ plz help how to solve this error thanks in advance I'll show you an easy example and then you can see if that helps - as without seeing any code its almost impossible to tell what you were doing. Example Public Class Form2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try Dim x As Short Dim y As Integer = 34000 x = 32000 + y Catch ex As Exception MsgBox(ex.Message) End Try End Sub End Class As the range of the short i ...Show All
Visual C# How to remove spaces inside a string in C#.net?
Hello All, We are supposed to create a Word doc file for our client that is to be used for printing a large list of names and addresses. I am facing the below problem in my C#.net Application. Eg. I am reading the values from the Access Database and showing it in the MS Word Document using C#.net windows Application. The original name looks like: " Michelle Accuso-Stevens" From DataBase side the name looks like this. Mich el le Acc uso-Ste ve ns [some spaces inside the string] foreach ( DataRow myRow in dsContacts.Tables[0].Rows) { if ( "" != myRow[ "FirstName" ].ToString() || "" != myRow[ "LastName" ].ToString().Trim()) { if ...Show All
Visual Studio Team System Benchmark for load test results
I'm currently load testing a unit test which exercises a method that creates person records...I already have my result, but we're not really sure if these results are good enough for the method to be considered efficient... So I was just wondering what could be a benchmark for the Average Test Time of a method that performs basic CRUD functionalities such as Adding, Editing, Deleting and Reading records Would anyone have an idea Some considerations for you: Acceptable times will very much depend on user expectations in the app. Generally Reads happen more than the other three, are expected to be very fast, and often happen in bunches (e.g. read 50 records). Typically Update is the next most im ...Show All
