yeos_lee's Q&A profile
Visual Basic calling "user32.dll" so that i can get the process thread
Private Declare Function GetWindowThreadProcessId Lib "user32" ( ByVal hwnd As Integer , ByRef lpdwProcessId As Integer ) As Integer this is the was i declared it in VB 6 and VB.net but in .NET i am getting and index out range error when i try to attach the value in the variable to a string. "GetWindowThreadProcessId" returns a value to a varaible I have cast it with cstr() and forced it with .tostring still it won't work the same way. I am not sure how to proceed. thank you for any help the sbcust variable was actaully the status bar. Since i am new to .net i didn't know they changed how they index the panels, so when the rest of the assignments worked i took it for granted ...Show All
Visual C++ Mouse Implementation In C++
does any one know how to implement a mouse in c++... i need a sample source code which allows a mouse to be tracked and its clicks to be tracked in a DOS based graphical environment... please help me... i need this for my project.. reply to arnabghosal@gmail.com thanks.... Please use this forum for C++ language issues only. For help in locating the right place to ask this question, you can ask here: http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=881&SiteID=1 ...Show All
SQL Server Does it increase performance to use multiple datafiles for large databases
If you've large databases (above 200GB/file). Does it help to have multiple smaller files (For e.g four 50GB files) Does it improve performance. Also if a single table (size 200gb) is alloted to a file group which has one datafile. Does it help to have such filegroup with multiple files (fore e.g 4 files of 50GB each). My thought was if SQL Server is looking for certain data (assuming the file is not very fragmented) it is better for SQL Server to load up only the specific file that corresponds to the data, instead of loading up an entire 200gb file. A lot of this depends on what kind of storage you have, whether is direct attached storage or a SAN, and if its a SAN, what kind of SAN it is. Genera ...Show All
Visual FoxPro Using server's date/time.
Hi; Is there a way to make VFP use the server's date/time in the different date functions I have XP stations on Win2003 server and some machines sometimes have a messed up date. Transactions are updated with the incorrect date because the stations are not set to the right date / time. Thanks, Aleniko Wrong:) Try creating a file on a remote machine. It's stamped with that machine's datetime. Station finds out the server's time by checking the file's creation time. ie: GetTimeFromMyServer('\\myServer\myShare') && has RW access - like a data folder * Get time from server FUNCTION GetTimeFromMyServer(tcServerPath) Local lcTemp As String , ltNow As Datetime Local Arr ...Show All
Visual C++ Source browser and intellisense dont work in a solution
If my solution only contains one project then the source browser and intellisense work fine. If my solution contains 2 or more project where one does depend on the other, then the intellisense and source browser are not functioning correctly. Is there a 'solution' to this or is it a known bug or limitation Thanks. Hello There is a question a week talking about the limitations of Intellisense and the steps to workaround it; please search the Forums before posting a question like this to avoid unnecessary duplication. Try looking at these threads for an answer to your question: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=87651&SiteI ...Show All
SQL Server Need to Subtract the result of two stored procedures
I am trying to take the results from two stored procedure and subtract them to get credit from two columns. The stored procedures look like create PROCEDURE mw AS select * FROM pla p where p.st in ('ds', 'sd') and (iPlayerID = '5345') compute sum(p.amount) RETURN both procedure have the same syntax. I am not able to use AS in to insert the values into a variable. Is there a wizard to use stored procedures are --Money Played stored procedure CREATE PROCEDURE MoneyPlayed AS select * FROM table s where s.strStatus in ('GP', 'GB') and (id= '4134') compute sum(s.iAmount) RETURN --Money won stored procedure create PROCEDURE MoneyWon AS select * FROM table p where p.strStatus in (' ...Show All
Windows Forms Bound ComboBox not displaying correct value on form load
I have a form whose fields are bound to a table. I have one lookup ComboBox, MfrIDComboBox, which is bound to a field called MfrId. The ComboBox is populated from a datatsource on my form. The ComboBox popluates with values fine, and if I select a value and update the record, the correct value is saved to the database. However, when the form loads, the correct value is not displayed. I have tried everything I can think of, inlcuding setting the value with the following code. Me .MfrIDComboBox.SelectedValue = dr.Item( "MfrId" ) For reference, here is the generated code from the designer. Aside from the code above, I am not adressing the ComboBox programatically at all. Me .MfrIDComboBox.DataBindings.Add( New System ...Show All
Windows Forms Custom Menu's
Hi Folks, I'm using MS Visual Studio with Managed C++ and I'm curious to know how I might go about trying to get Menu's that look similair to the fancy ones in MS Outlook 2003 Any ideas -Zero There's no "out-of-box" control in VS2003 to do this as far as I know. You can play with DrawItem/MeasureItem events in order to customize the painting, but in VS2003 this functionality is not provided by default. ...Show All
Visual Studio Express Editions Get data from RFID reader + RS232
Hello, I've an RFID reader which is connected with my local pc. I'm trying to get the data from the tags and put them in a database. See code below how I'am connected to the COM port but I can't get data of it... what do I do wrong Thanks Imports OpenNETCF.IO.Serial Public Class Form1 Public WithEvents SerialPort As New OpenNETCF.IO.Serial.Port( "COM1" ) Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click With SerialPort .PortName = "COM1:" '.RThreshold = 1 .Settings.BaudRate = OpenNETCF.IO.Serial.BaudRates.CBR_38400 .Settings.ByteSize = 8 .Settings.Parity = OpenNETCF.IO.Serial.Parity.even .Set ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Managed DirectX Sprites: Is it possible to light them?
Hi, Does anyone know if it is possible to apply Direct3D lights to sprites constructed using the Sprite helper class in Managed DirectX Since the class creates a quad for the sprite, I would have thought it possible to light the quad or rather the quad's texture. I have tried adding a light to my sprite scene and have tried doing this both before and after drawing the sprites. However, I cannot seem to get the lights to work. I have used the following code: // This is in my initialise section: m_Direct3DDevice.RenderState.Lighting = true; m_Direct3DDevice.RenderState.ZBufferEnable = true; // This is in my render loop: m_Direct3DDevice.Clear(Microsoft.DirectX.Direct3D.ClearFlags.Target, Color.Black, 1.0f, 0); m_Direct3DDevice.BeginScene(); ...Show All
Visual C# How to resolve typelib references when using TypeLibConverter.ConvertTypeLibToAssembly
Im currently trying to use the method TypeLibConverter.ConvertTypeLibToAssembly. Im using the c# example found at http://msdn2.microsoft.com/en-us/library/k9w7de3e.aspx . The example works for building a single dll, however the typelib i am converting has multiple references within it which need to be resolved. When the ConversionEventHandler ResolveRef(object typelib) method is called when a reference is found im passed the object typelib (which i dont know what to do with). How do i resolve reference and return a correct assembly Any help is appreciated. Code Example C# using System; using System.Reflection; using System.Reflection.Emit; using System.Runtime.InteropServices; public class App { p ...Show All
Windows Live Developer Forums VE Directions
I am using VE to build an itinerary (for directions between points on the itinerary) and it is generating errors for me. Is there a way I can have several different maps on there at the same time with different start and end points and it generate the directions between the start and end points without errors Here is the code I am using to render the maps, and the error I am getting is... Error Link: http://webpages.charter.net/mesposito/error.jpg Code: Protected Sub Page_PreRender( ByVal sender As Object , ByVal e As System.EventArgs) Handles Me .PreRender Dim js As String = "" Dim ds As DataSet Dim CurrentID As Integer = 0 Dim i As ...Show All
SQL Server SQL Express user permissions?
I'm trying to build a web application using SQL2005 Express and Visual Studio Express. It all works OK on the local machine, but gives an error "Login failed for user xxxx\ASPNET" when used remotely. I can't find where I can set login permissions for SQLServer 2005 Expresss - can anyone help, please Thanks John This looks like a problem in the login control. The error reported probably has nothing to do with the actual error. The "login failed" error should always be logged to the errorlog file, if it did indeed happen. Probably the control is reporting incorrectly the error. Try contacting the VS team if this is a VS control. From what you have told me, there seems to be no problem with how ...Show All
Visual Basic MDI child forms problem: Minimize button acting as Restore button with second child.
Hi, Having a strange problem with an MDI application I'm developing. The child form is set to be maximized for the initial window state. When I create the first child, it is shown as maximized like I want. And when I click the Minimize button, it minimizes as I want. But here's the problem. If I create child one and then create child two with both with a WindowState of Maximized, and then click the Minimize button, the active child form changes to "almost maximized" as if I had clicked the Restore button instead. If I click the Minimize button again, it will minimize properly. If I instead click the Maximize button to maximize the form and then click the Minimize button, it will minimize properly. I hope I'm making sense ...Show All
.NET Development How can I create an array of DirectoryEntry's
Hi, I have such situation: myEnum = group.Properties["member"].GetEnumerator(); while (myEnum.MoveNext()) { DirectoryEntry entry = new DirectoryEntry("LDAP://" + myEnum.Current.ToString()); .... ... } This is a part of my function which creates DirectoryEntry objects. What kind of array can I use to store "entry" . Maybe DirectoryEntries If yes..how thanks thanks, I had to know that anwer,...damn ;) The size will be dynamic , I think i will take the List . I never worked with dictionaries or hastables. Easy to implement regards ...Show All
