HowardRichards's Q&A profile
Visual Studio Express Editions How to SUM column data
Hello, The result of a query in TableGridView looks like this: Location Number1 Number2 Thanks again, Inserted your line (it would not take without " Me .Database1DataSet" ---------------------------------------------------------------------------------------------- Private Sub Find_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Find.Click Try Me .Table1TableAdapter.FillBy( Me .Database1DataSet.Table1, LocationComboBox2.Text) Catch ex As System.Exception System.Windows.Forms.MessageBox.Show(ex.Message) End Try Dim result As Integer = 0 result = Table1BindingSource.Count If result > 1 Then Me .DataEntry.SelectedTab = TabPage4 ...Show All
Windows Forms Refresh DataSet
Hi There, I have created a simple form containing a DataGridView. DataGridView displays the detail of an account from database. Details updates every 4-6 seconds in the database. My question is that how can I refresh the data displayed in DataGriedView every 5-6 seconds. And how can I retrieve the data into Dataset every 5-6 seconds from the database, which is DataSource for DataGridView control. Here is my code. ------------------------------------------------------------------------------------------------------------------------------ namespace DataGridViewSample { public partial class AccountForm : Form { public AccountForm() { InitializeComponent(); DataTable dataTable = GetAccountDetails().Tab ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Smooth movement
I did a "game" where a ball bounce around the screen. It's running at 60 fps but it isn't a smooth movement. It's an issue from XNA Framework Beta I am working with SpriteBatch class... Here is (it's not complete): private SpriteBatch fBatch = null ; private Texture2D fTexture = null ; private Vector2 fPos = new Vector2 (30.0f, 30.0f); private Vector2 fChange = new Vector2 (0.0f, 0.0f); private float fSpeed = 2f; private float fWidth = 0; /*Texture Width*/ private float fHeight = 0; /*Texture Height*/ private void FlipHorizontally() { fChange.X *= -1f; } private void FlipVertically() { fChange.Y *= -1f; ...Show All
Windows Forms Is there any chance to modify contents of Form InitializeComponent permanently using Designer?
Hello, I'm trying to modify InitializeComponent of Form. But every time, form reload or change something, InitializeComponent discards my editing. I wish to know if it is possible to do permanent editing using Designer functions, and how The point of my problem is to replace line where is created ComponenetResourceManager with custom ResourceManager. System.ComponentModel. ComponentResourceManager resources = new System.ComponentModel. ComponentResourceManager ( typeof ( MdiForm )); Using this change I will can reuse other automaticly generated code by designer, where it apply resources to objects. For example: InitializeComponent . . . MyComponentResourceManager resources = new My ComponentReso ...Show All
Audio and Video Development Logging or warning or output for debug goals
For debug goals I need to output some information. Usually in java script I use the function 'alert'. Do I have a possibility to write an information to status bar or to message box or to some other visible place The debugger option in Diagnostics should send the logging to an attached Script debugger, so long as you start iHDSim with the "-debug" option. (Replace "file" with "debugger" in Peter's example). ...Show All
Visual C++ Interop ifstream and FileStream C++/CLI
I have a class written in native C++ and I need to wrap it with a managed wrapper so I can reference it in a C# project. My native class takes an ifstream as a method parameter and does a lot of magic with it in its implementation. Instead of converting this whole class to managed C++ , along with a plethra of dependencies, I would like to create a managed C++ / CLI class containing a method with a parameter of FileStream^. Creating and compiling the wrapper class is the easy part but now how do I pass the FileStream instance to the native method Is there some method on the managed code, which would allow me to get a pointer to the file I'd rather not abstract the logic of the ifstream inside of the interop API. Do any of you have any id ...Show All
.NET Development Name of cd-driver
Is possible to get the name of a cd-driver in .net I.e. SONY cd-rom CDU5211., not just D: Thank You. WMI can more than likely give you this information. Play with the WMI code creator to find the proper WMI query... ...Show All
Software Development for Windows Vista Hosting STS in IIS7
Hi, I'm trying to host my STS (based on the original one from STS sample) in IIS7 (on Vista) with no luck. Sending my token to the RP fails and I have "There was a failure making a WS-Trust exchange with an external application. No suitable endpoints were found for the service at address http://www.fabrikam.com/TokenService/STS.svc/sts ." in the Event Log. Here are endpoints for the service: < endpoint address = " sts " contract = " Microsoft.ServiceModel.Samples.SecurityTokenService.IWSTrustContract " binding = " wsFederationHttpBinding " bindingConfiguration = " SelfIssuedSamlBinding " > </ endpoint > < endpoint address = " mex ...Show All
Visual C# scrollbar in panel
hi, I want to put a linklabel over a panel. linklabel text keep growing and eventually I need to scroll to see it, is there a way to add scrollbar to panel For somereason there isn't scrollbar property available in my panel. I am using .Net 2005. My panel is inside a tablecontrol spanning 3 raws. Is that a problem Sameep I figured it out. Basically with dock property set the scrollbar don't work. So For label set the dock property to none. and for panel set the autoscroll property to true would fix the problem ...Show All
Software Development for Windows Vista Compiling multiple Workflows into a single assembly
Hi guys, I know this was already mentioned but the link to the sample doesn't work anymore. I already know about CompilerParameters.GenerateInMemory but I'd like to extend the question a bit more. So here is the question again: How can I compile (in memory) multiple workflows (including code beside files) into a single assembly. Is it also possible to use streams instead of physical files as input for the compile method It would be useful if someone stores everything in a db. Thank you Vijay, your help is very much appreciated. Maybe I give some more background what I intend to do: I develop a designer based on the Designer Rehosting Sample. I want to compile workflows but want to store the ou ...Show All
Visual Basic Opening Default Email Client
Hi, I'm developing an application using Visual Basic 2005 and I'm just wondering how I go about opening a new email using the default email client Basically, my application has a section where the user can enter email addresses. I want the user to be able to click on any of the email addresses and have the default email client set in Windows (such as Outlook or Outlook Express for example) open up a New Message window with the To field already filled in with the email address the user clicked on. I'm not sure if this is a Visual Basic related question or not, but any help would be much appreciated. Thanks. I forgot to mention that the hyperlinks change with each record. I built a "view applicati ...Show All
.NET Development How to Plotting on a map by GPS?
Can anyone help me in plotting on a map using latitudes and longitudes. I am newbie in this please help Thank you Assuming this is a question on .NET development, it is still too broad a question. The first place to start is to understand GDI+. Find a book on graphics in .NET. You can try: a. GDI+ Programming in C# and VB .NET b. Graphics Programming with GDI+ ...Show All
SQL Server Reference axis(2) members in MDX
Hello everybody. I've got a little problem: I want to reference axis(2) members in a calculated member, so I can use multiple selection. I've tried: with member [Measures].[Test] as 'settostr(axis(2))' select {[Measures].[Test]} on 0, {[Dim Sales Territory].[Sales Territory Region]. members } on 1 from [Adventure Works DW] where ([Dim Geography].[Country Region Code].&[US], [Dim Geography].[Country Region Code].&[CA] ) However, I get an error. Is there any other way Thanks a lot, Santi The Axis function cannot be used on the filter axis.The Axis function cannot be used on the filter axis. http://msdn2.microsoft.com/en-us/library/ms145531.aspx your shuldn't use Ax ...Show All
SQL Server how to get a variable value return back from a child package ?
I have a parent package (i.e. P) and a child package (C). I was able to easily pass a variable value from P to C. And C did computations and get a result (i.e. integer) and stored this integer to a variable (x). Now I want the value of "x" to be passed back to P and store in P's variable (say Px). Anyone knows how to Thanks Steve Mike is spot on. I've talked about this subject a lttle here in case you're interested: Passing variables between packages ( http://blogs.conchango.com/jamiethomson/archive/2005/03/17/1151.aspx ) -Jamie ...Show All
.NET Development System.Transactions issue
I have been trying to run the following piece of code : using ( TransactionScope txRequest = new TransactionScope ( TransactionScopeOption .Required)) { using ( SqlConnection conn1 = new SqlConnection ( "Data Source=XXXX;Initial Catalog=ULTIPRO_USG;uid=dev;pwd=pass;" )) { conn1.Open(); } using ( SqlConnection conn2 = new SqlConnection ( "Data Source=XXXX;Initial Catalog=ULTIPRO_USG;uid=dev;pwd=pass;" )) { conn2.Open(); } } The SQL server 2005 is in a different machine. Due to the fact that there is a second connection inside the transactionscope DTC is necessary and is enabled for Network Access on both machines. Whenever we run this piece of code we are ab ...Show All
