HKEC's Q&A profile
Visual Studio Express Editions Problem with Tabcontrol
Hello everybody! I ran into a problem using the .NET 2.0 Tabcontrol: I need to have the single tabs left-aligned instead of top-aligned, but when I set the alignment property in the visual designer to "left", something goes wrong with the control. Eg. the text displayed on the tab registers disappears and the whole control seems to look a little strange (can't point the finger on something specific though...). Without the text on the registers the thing becomes somewhat useless. So, is there a way to fix it or any kind of work-around Thanks a lot, Tobias Koerner Thanks for your reply. I tried changing the appearance property but encountered another "limitation". Now ...Show All
Visual Studio Express Editions Button Click within a for each loop
Fairly new to VB express. Is it possible to have a button click event from within a for each loop on a form i.e. the button being clicked refreshes the form and moves on to the next iteration of the loop Any suggestions welcomed. I hope this helps or sheds some light: Dim myOtherArray() As String = { "Bob" , "Beth" , "Conrad" , "Grant" } Dim i As Integer = 0 For i = 0 To 3 Label1.Text = myOtherArray(i) 'MessageBox.Show(myOtherArray(i)) Me.someButton .PerformClick() 'this will click the button specified, replace "someButton" with the name of the button you want to click Next is this what you are after my apologies for being ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Model Position Problem
I have this code that creates a model at the position of the mouse click but the model never shows up at that position. Maybe someone out there knows why the models seem to be offset. If I click in the top left corner of the screen, the model shows up in the center of the window. Here is the code: #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; using System.Collections; #endregion namespace Commander { /// <summary> /// This is the main type for your game /// </summary> ...Show All
Visual C# Public variables in user paint event handler
In my program, I defined a public integer variable called count at the beginning of my class. I have a timer event that adds 1 to the count until it gets to 10, then back to 0. I want to use this number in my user paint event handler, but count only shows up as 0 in the paint event. I did verify that count is changing in the timer event, but the paint event can't see it. What can I do to get that info to my user paint event handler That did the trick. Thank you. I'm just learning this stuff, so sometimes I overlook the obvious. I tried several times to mark your post as the answer, but I kept getting an Unknown Error. Thank you again. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. SpriteBatch.Draw and Rectangle problems
Hi: I have having some trouble getting textures to draw smoothly, let me elaborate: I am drawing the texture using SpriteBatch.Draw and a Rectangle to specify where and what size I want the texture drawn. The problem is the Rectangle object only supports int rather than float. This causes me a problem, slow moving textures do not move smoothly. This is because as an int can only be a whole number causing the texture to snap to pixels. Is there a workaround to this issue Have I explained myself enough. Regards: John Write your own SpriteBatch equivalent that meets your needs. I recommend you use non-transformed vertices and actually use effects files (vertex/pixel shaders). ...Show All
SQL Server What persmissions to give to the application account to the Certificate
Hey guys. I've an application which uses an account named Uaccount1. I've given it db_datareader and db_datawriter permissions to the tables. I've given it execute permissions to all sp's I've given it reference permissions to the symmetric key. And I gave it reference permissions on the certificate. At this point, it can't see the certificate. If I give control permission to the account for the certificate, it works perfect. Is it necessary to do that or am I missing something. Our security is based on symmetric key and certificates... Thank you Tej. [edit] - Oops, I think I was wrong, correction below: View Definition should be all you need to see the certificate. B ...Show All
Visual C# Problem in Reflection of dll from web service
Hi everyone, I need to have Reflection of dll got from web service, i.e after retrieving wsdl file, generate .cs file and compile it to dll and then reflect it. The problem is the .cs file generated does not contain the structure : namespace...{} but it uses WebServiceBindingAttribute to specify the namespace so System.Reflection can not get the namespace of the types/classes by either using Type.Namesapce or Type.FullName. Any idea to handle that Thanks. Trang Namespaces aren't required in .NET. Given the assembly you should be able to load the type information directly using Assembly.GetType . Alternatively given the assembly use Assembly.GetTypes to enumerate all the types. If nothing else this will ...Show All
Visual Studio Express Editions need help displaying array values
i have 150 values in an array and i want to display them in order of the highest first and the lowest last. i have no idea how to do this. Help will be appreciated. thanking in advance oli Have a look at the following which puts 150 random numbers into an array and then outputs them to a textbox in descending order. Dim A(150) As Integer Dim R As New Random For count As Integer = 0 To 149 A(count) = R.Next(0, 1000) Next Array.Sort(A) For count As Integer = 149 To 0 Step -1 TextBox1.AppendText(A(count).ToString & vbCrLf) Next ...Show All
Software Development for Windows Vista State Machine Exception Handling
Can anyone tell me what the best practice is to handle exceptions in a state machine process. I would like to move the instance to different error states depending on the type of exception. It would seem that normal compensation processing is not available in a State Machine Regards Jaco Hello, i also had this question, luckily I have the right book at hand .. ;-) this thing is well described on that page: http://www.kcdholdings.com/blog/ p=80 starting at Imperative Fault Handling It is really hard to find, without that book not possible i think: - you rightclick on a errHandler on the canva - then choose "Promote Bindable Properties" - after that you have a error variable you can look ...Show All
.NET Development import certificate into internet explorer (IE) keystore
hi how can i import certificate into internet explorer (IE) keystore thanks ...Show All
Visual Basic Windows Application
am curious how to code to use a Calculation Button. What I need to do is finish a program I've started but I am stuck. Needed information: Calculate - declare variables : total credit hours, new hours, prior hours, a loop index as integers total grade points, semester gpa, new cumulative gpa, new points, prior gpa, all as doubles write a for loop that iterates through the 2 array lists( hours and points) and adds each element to the totals if the total hours is greater than zero, calculate the semester average = total points divided by total hours set the semester average text box to the results, formatted to 2 decimals process the new cumulative average retrieve the prior gpa and hours from the GUI ...Show All
Smart Device Development TAPI 3.0 RegisterCallNotifications() error...
Im getting an HRESULT from this call that translates to: "There is no connection for this id" I cannot figure out what I'm doing wrong here. I've checked to see that I'm using a valid ITAddress pointer and I'm using a valid connection token that I receiced from the my connection point advise() call. Any ideas Thanks! Mike I'm not using anyones wrapper. I've used the sample snippets from the MSDN TAPI 3.0 reference. I'm coding in C++. All behavior seems normal up until the failed call to RegisterCallNotifications(). I'm getting a good connectionpoint from the TAPI connectionpointcontainer and after I call Ccp->advise I'm getting QI calls to my event notification object f ...Show All
Visual C++ Can we export public static variables using AFX_EXT_CLASS?
I am trying to export a class which has a static BOOL variable in a MFC extension DLL using AFX_EXT_CLASS . I find that when I try to access this variable from the client application I get a LNK2001-unresolved external error. But MSDN documentation clearly states that "If you are exporting the entire class rather than selected members of the class, static data members are automatically exported." So does the 'static data members' imply only functions If so, how do I export a static variable in an Extension DLL Probably you have to have a declaration in your executable which uses DLL, like this: declspec( __dllimport ) extern BOOL MyClass::myStaticVariable; If i ...Show All
Visual Basic Properly formatting a number
I have the following numbers stored as doubles in a file 99.95 99.90 99.00 I read these three values into a textbox, using a format string as follows: Format(bittoreadhere, "$#.##") This gives me the following $99.95 $99.9 $99 How do i force 2 decimal places , so i get $99.95 $99.90 $99.00 in my textbox Cheers Mc Dim dbl1 As Double = 99.0 Dim dbl2 As Double = 99.1 Dim dbl3 As Double = 99.99 Debug.Print(dbl1.ToString("c")) Debug.Print(dbl2.ToString("c")) Debug.Print(dbl3.ToString("c")) ...Show All
Visual C# Language Converting Tool
I was wondering if there is a tool that converts projects into different languages I know about the developerfusion tool that converts C# -> VB.NET and visa versa: http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx but I'm looking for something a little more powerful (and hopefully free) that converts entire projects. My projects are never all that huge and don't involve databases or anything, so I don't need a "sledgehammer" of a tool, more like a "fly swatter" I have Visual Studio 2005. I'm hoping there might just be a plugin that I'm unaware of. Actually, our tools (and most of our competitors) perform source code conversion - they convert from the source code, not the IL. The reasons are exactly as you've stated ...Show All
