Software Development Network Logo
  • Game Technologies
  • Visual FoxPro
  • SharePoint Products
  • Visual C++
  • Visual Studio
  • Windows Vista
  • Visual C#
  • SQL Server
  • VS Team System
  • Windows Forms
  • IE Development
  • Audio and Video
  • Microsoft ISV
  • Visual Basic
  • .NET Development

Software Development Network >> Heinz Krug's Q&A profile

Heinz Krug

Member List

Jassim Rahma
SQLChamp
knave
Carl Daniel
hommer
Sundaar
jcninwisc
Vishalbhambure
ekb0211
Amos Soma
Shaantu
Simmy7
Mathew1972
Hardin77
Builty
FrankBru
mobigital
Sekar1979
Will Merydith
Thanh Duong
Only Title

Heinz Krug's Q&A profile

  • Visual C# C# 2005 ignoring STAThread attribute

    Greetings. I'm developing a WinForms-driven application, and I need it to use Single Threaded model for COM interop. C# 2003 worked fine with [STAThread] attribute above main() declaration. But we just upgraded our machines to VS 2005, and our application is failing due COM errors. We found C# 2005 is creating the main thread as Multithreading model, regardless the STA attribute. Any idea why is this happening . Here is a snippet of our entry point code, not complex at all. Putting a breakpoint in the first line of main(), already shows the System.Threading.Thread.CurrentThread.ApartmentState as System.Threading.ApartmentState.MTA. #region Main /// <summary> /// The main entry point for the applica ...Show All

  • Windows Forms Can't disable a button

    I am programming in c#. I have a button on my form that when clicked, it plays a wav file using the PlaySound method from winmm.dll. The wav is about 3 seconds long. The problem is that if I keep clicking the button during the 3 seconds the sound is playing, it queues all of the clicks, and plays the wav over and over. My Button is named btn. So I tried: this.btn.Enabled = false; PlaySound(...); this.btn.Enabled = true; Doing this successfully greyed out the button while the sound is playing, but it still accepts clicks, so it didn't fix my original problem. Is there some way to clear the event queue Or is there something else I'm doing wrong. I just want the button to not work while the sound is playing. I have also tried ...Show All

  • Visual C++ The applications configuration is incorrect...

    I recently delelted pretty much ALL of the files in my SxS folder... since my computer has gone fucking brain dead... I've since gotten all of the files back from the other computer in the house.. I can still get to my desktop and my screensaver even works... Some programs actually work... but mostly I just get the error report saying the configuration is incorrect. PLEASE SOMEBODY... ANYONE. Anybody know how I can fix my computer without losing everything I've looked through a bunch of forums about the SxS folder.. but nothing has really helped.. Anybody with any help please e-mail me. There are better forums for this question than this one, but your best bet will be to reinstall windows. Do *not* reformat, just reinstall. ...Show All

  • .NET Development When to use ExecuteScalar???

    Can anyone send me some links on ExecuteScalar or tell me when is it good to use this method.....I know it returns a single element but i dont understand the context of how it just retrieves a single element Well I guess say if you executed a query which returns 1 row and 1 column of data, or you have several columns but only want 1 column of the first row of data (saying this would also be bad practice), then it would be something you would use it for. So for example I could have a query (simple query nothing too complicated) which would return me some calculation: SELECT 4 + 3 AS 'Results' would return me 7 in the column name "Results" - this would be one way of using the ExecuteScaler method I ...Show All

  • SQL Server sys.Conversation_Endpoints

    I know that if a conversation is normally ended the handle will wind up in the sys.Conversation_endpoints table in a Closed State. I realize they are supposed to stay there for 30 minutes to prevent a reply attack, however the number of rows I have in this table continues to grow with the bulk of the states set to 'Closed'. I am trying to use this table to determine if I have any conversation handle leaks. I see some rows in there with a Disconnected Outbound state while some are conversing. What should I be looking for in this table and how can I know I have a problem (ie. leak). I realize that Disconnected Outbound is probably something i need to look into. Are there any other states I should be concerned with Gary ...Show All

  • Visual Studio Team System Baseless Merge: Am I missing something?

    Step 1:  I create a branch from _Trunk called _Branch1 and check it in Step 2:  I make a small change to a file in _Branch1 (changeset 10) and check it in Step 3:  I create a branch from _Trunk called _Branch2 and check it in Now, I would like to merge the changes I had already performed on _Branch1 into _Branch2. Since they are not directly related, I know I must perform a baseless merge. I use this command: tf merge /version:C10~C10 /baseless "C:\TFS\Product\branches\_Branch1" "C:\TFS\Product\branches\_Branch2" /recursive The conflict dialog pops up with the file that I changed.  Good.  I click on "Resolve..." and the "resolve version conflict" dialog box shows up.  Good.  I choose t ...Show All

  • .NET Development Strongly-typed dataset, primary key generated from tableAdapter.Update(ds) not passed to FK of related table

    I have created a strongly typed dataset (CustomerDataset) with, for this scenario, 4 tables: Customer (CustomerID is PK) Account (AccountID is PK, CustomerID is FK) Invoice (InvoiceID is PK, AccountID is FK) AccountTransaction (AccountTransactionID is PK, InvoiceID is FK) Given that I am going to create a new Invoice row, consisting of all AccountTransaction rows that up until now had a null InvoiceID (i.e. transactions not yet invoiced). To create a new Invoice row, I write the following code: <code> CustomerDataset.InvoicesRow invoice = null; foreach (CustomerDataset.AccountsRow account in customer.GetAccountsRows()) { // create a new invoice invoice = CustomerDataset.Invoices.NewInvoicesRow(); invoice.Account ...Show All

  • SQL Server Dimension and Hierachy

    Hi, I am new in AS2005 I builded a Dimension "ShipToState" with Hierarchy "ShipToState", "ShipToCity", "ShipToZip"... When I browse my cube from Excel I see "ShipToState", "ShipToCity", "ShipToZip"... as 3 different dimensions and a new dimension named "Hierachy".....I think I am doing some mistakes..... Someone can help Thx Mcrisf Thx for the answer.... but i would like to show to the user just only a dimension "ShipToState" and when the drill down to see the "ShipToCity" and "shipTozip"....the user is confused to see all these dimensions and also a hierachy dimension....with ...Show All

  • Visual Basic treeview dockable with autohide

    How can I make a treeveiw display dockable with autohide capability Hi, Try Weifen Luo Docking suite. It truly excellent and lot of projects and commercial applications have used it. You can find it here: http://sourceforge.net/projects/dockpanelsuite There is also an extension posted on CodeProject.com, which extends the Weifen Luo to give you a Visual Studio 2k5 look and feel. Its writtenn by Danilo Coral lo http://www.codeproject.com/useritems/DockPanelSkin.asp df=100&forumid=313011&exp=0&select=1542912 hope you find these links useful ...Show All

  • Software Development for Windows Vista "bindingRedirect" does not work, same error occurs

    Hello, I'm using the "bindingRedirect" element in my web.config to allow updates of my workflow DLL without recompiling the website. But I still receive the same error: Could not load file or assembly 'TestWorkflowLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c417d4d39ba0d6b2' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) I built my website with version 1.0.0.0 of "TestWorkflowLibrary". After that I created a version 1.1.0.0 of "TestWorkflowLibrary" which I placed in the "bin" folder of my website. When accessing the website, the above error is shown. I read that it's poss ...Show All

  • Visual Studio Tools for Office Outlook Addon - MessageBox not displaying in the current active window.

    I have created an Outlook add on which performs actions when the ItemSend mail event occurs. I have a confirm dialog box that pops up. 1) If the e-mail message is open on my secondary monitor the messagebox will display on monitor 1. 2) If the e-mail message is open on my primary monitor the messagebox will be displayed BEHIND the message window. I suspect the problem is that I need to pass the MessageBox the parent window to be displayed in. Just I don't know how to go about doing that. At the moment all I have is: MessageBox.Show("Hello World"); Thanks. Hi, I tried out the code and still not having any luck. My application is in C# so I converted the code to that. Does the code below look about ...Show All

  • Windows Search Technologies How to index .xaml files for content

    Hi, How can I enable the xml filter or even the plain text filter for .xaml files I have WDS beta installed. I want to set "file contents and properties" index setting for .xaml files. I tried to change the setting for .xaml files in the advanced settings area but my change does not persist. When I close the advanced settings dialog box the setting is not changed. Hello Ahmed, The 3.0 beta 2 should be indexing .xml files by default. If you do not have the beta 2, but instead have the beta preview I would suggest upgrading. Beta 2 is much more stable and has a UI to work with. To change indexing properties with 3.0 beta 2 you should right click on the magnifying glass in the system tray ...Show All

  • SQL Server Store FILES in SQL Express 2005 with VB.NET

    Hi, I'm a beginner with VB.NET and SQL and I would like to store files (like Images, Document...) in a Table of SQL but I have no idea how to do it. This is my connection string, and examples of how I do queries, please help me... Private cn As New SqlClient.SqlConnection Private cn2 As New SqlClient.SqlCommand cn.ConnectionString = stringa cn.Open() cn2 .Connection = cncn2 CommandType = CommandType.Text Dim ESEGUI As String cn2 .CommandText = "INSERT INTO users (nickname) values ('Paolo') ESEGUI = cn2 .ExecuteNonQuery() Dim oDr As SqlClient.SqlDataReader cn2 .CommandText = "SELECT * FROM users WHERE Nickname like 'Paolo '" oDr = cn2 .ExecuteRe ...Show All

  • .NET Development Problem having webservice calling a batch file.

    I've written a small webservice that all it does is call a batch file on the server passing along some parameters in hte commandline.. It seems that the batch file (sm.cmd) exits after only executing for a second (or less). Here is the code private string CallExecutable(string Path, string Arguments) { string sReturn = ""; try { Process proc = new Process(); if(File.Exists(Path)) { //proc.StartInfo = new ProcessStartInfo(ConfigurationSettings.AppSettings["ExecutablePath"].ToString(), "buildspecs." + sBuildSpec); proc.StartInfo.FileName = Path; proc.StartInfo.Arguments = Arguments; //proc.StartInfo.CreateNoWindow = false; proc.StartInfo.UseShellExecute = true; //proc.Exited += new EventHa ...Show All

  • Visual Studio Visual Studio Information

    Hi Community: I need to know if Visual Studio are compatible with MAC OS Tiger, I have several computers MAC’s and i want install Visual Studio in this S.O., is this possible Regards SvenC wrote: What is S.O. Sven, I suspect he's talking about an OS. Abbreviations in Spanish, French, and similar languages tend to end up "backward" from an English-speaker's perspective. (It's probably "systema de operacion" or something similar -- my Spanish ain't so hot but it's something along those lines.) ...Show All

©2008 Software Development Network