KevinBB's Q&A profile
Visual C# How to go through a list of increasing variable names.
My problem is that have 20+ controls of my form. Lets call them digitalPanel1, digitalPanel2, .... and so on until 20. they all get their values from a an array stored in a class called mySensor for .... mySensor.iTemps[x]; I cant use the x index because digitalPanel1....20 is not an array. there must be another way to do this instead of typing digitalPanel1 =.... digitalPanel2 =.. . ..................20 Anyone Thanks for the feedback. Im not familiar with c# that much, what does c.GetType() do Does it return the type of control (textbox, buttons, etc ); I cant run this now, but if im amusing correctly, i check the return type of the method, and if a digitalPane, assign the value ...Show All
Visual C# Error highlighting
Hello, I've been working with NetBeans IDE (Java) for quite some time and now I'm learning C#. What disturbs me alot in the Visual Studio 2005 IDE is, that non-syntax errors that would lead to a compiler error are not highlighted until I compile my source code. For example if I'd return an integer although the return type of my method is void, the IDE wouldn't highlight that error until I'd try to compile the source. That's quite annoying to me since NetBeans IDE always did that and I'm used to it. Now my question is: Am I missing an option Is there a way to activate it Thanks for any help! The IDE simply doesn't do the sort of semantic analysis that is required to catch these errors before compilation. ...Show All
Gadgets System.Network.Wireless Not Working
It seems like System.Network.Wireless doesn't work... I have tried a few Windows Vista Sidebar gadets that use it and non of them work. I have also tried creating my own gadet and it doesn't work either. Has the object refrence been update but not the documentation Has anyone else seen this issue Or am I just doing something wrong I tried the following to have it printed out on the gadget and also saved in the Event Log and both places show that nothing is outputted. (and before it is asked, yes I do have wireless that is what I am using to write this and dont even have a hard connection) var IPAddress = System.Network.Wireless.address; gadgetContent.innerText = IPAddress; System.Diagnostics.EventLog.writeEntry(&quo ...Show All
SQL Server Writing C# stored procs, is SQL injection a concern?
I just started looking into writing queries/SPs in C#. A simple SP looks like this. public class ContactCode { [SqlProcedure] public static void GetContactNames(string lastName) { SqlCommand cmd = ……. …… cmd.CommandText = "SELECT * FROM Person.Contact WHERE LastName = " + lastName; SqlDataReader rdr = cmd.ExecuteReader(); SqlPipe sp = …………..; sp.Send(rdr); } } Since it's concatenating a dynamic SQL in the code, is SQL injection a concern or the CLR integration knows to take care of the input sanity I know good programming practice is to validate input before it gets to this but it's necessary for CLR SPs to have the same robustness as normal T-SQL SPs when it comes to input parameter handling. ...Show All
Visual Basic Fire up an external IE window with post data
I am using VB.NET with v2.0 of the framework. I need to open a browser window (external, not a windows form), call a specific URL, and put post data in the stream (not just http://<url> <varname>=<value>). I found a Microsoft article that describes exactly what I want to do, but in VB6: http://support.microsoft.com/kb/167658 I tried implementing that in VB.NET, and it works in all respects, except that it cannot pass the byte array from .NET to the variant, that the dll expects (this is necessary because post data is in byte array form, not string). I would be happy to just solve the byte array to variant issue. I think this is something about marshaling , but I can't find any adequat ...Show All
Visual Studio Express Editions RichTextBox Images Can Stretch
Hi, I'm using the paste method to insert images in a RichTextBox, the trouble is the user can stretch the images by dragging them with the mouse. Is there anyway to stop this behaviour Or is there another way to insert images into a RichTextBox control that pastes the images with fixed dimensions Okay, the following code seems to 'undo' a picture resize. I don't know if it has any bad side effects. Private Sub RichTextBox1_TextChanged( ByVal sender As Object , ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged 'MsgBox(RichTextBox1.UndoActionName) If RichTextBox1.UndoActionName = "Unknown" Then RichTextBox1.Undo() End If End Sub ...Show All
Smart Device Development Stopwatch for exact timer in VB compact framework
Hi, I need an exact Timer for my pda, I used the Timer from Toolbox, but this isnt exact enough. I read from Stopwatch in - system.diagnostics.stopwatch - but it doesnt work for me. I tried it in Visual Basic 2005 for net compact framework 1 and 2 without success. --- dim sw as stopwatch --- But i got "type stopwatch is not defined" Is "stopwatch" not available in compact network or is there anything to define before stopwatch is running Who can help an show me the right way A little code would be nice (Im a beginner) Thanks Pit any other ideas it isn't available anymone on opennetcg.org i am working on a stopwatch for swimming training and can't get the accuracy of it to the centesimal of a second.. ...Show All
Smart Device Development how to play audio files(mp3,wma,3gp,mid and so on) on Windows mobile5
Isn't there any method to play such audio formats on windows mobile5 directly I have read some messages in this forum.It seems that I have to implement source filter for each audio format if I use directshow. how about media player activex control It seems that it can not work well on Windows mobile5 either. In Windows Mobile 5, there is no good way to play all those sound formats. You can use SndPlaySound and Play sound to play WAV files though (check http://msdn2.microsoft.com/en-us/library/ms903667.aspx ). ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How many DBP warmup submissions are already submitted, and how many still in the pipeline?
Hello all. Just curious about the competition. I know that I'm typing (and scribbling in photoshop) as fast as I can to try to meet the deadline, but I'm curious as to how many others are doing the same. I realise the MSFT people probably want to keep the number of entries secret until the end, but if you've got a project submitted, or underway, speak up - (not looking for ideas to pillage, just want to know how big the playing field is) Cheers from the frozen North. Dan Lingman NogotoGames.com ...Show All
SQL Server Invalid object name error, multiple databases, three part name problems
I originally posted this question in the Transact-SQL forum. As it turns out the problem is apparently not in the T-SQL statement. And, unfortunately, nobody there knew how to resolve the problem. I am using SQL Server 2005 Developer Edition and Visual Studio 2005 Visual Basic.NET (aka VB8). I am attempting to run a select statement on data from two different databases. What's follows is the original question along with what I have discovered so far. Perhaps someone here can help. The following T-SQL code generates the error " Invalid object name 'tf_1.dbo.ADX_1' ". The database is attached; I can view the table in SSMS and using VB8 code but can't get this statement to run without error in either SSMS or the VB8 application. ...Show All
Visual Studio Express Editions Executing a system command
Is doing something like: system("notepad.exe") allowed in the express edition of Visual C++ When I try to do it, I get the following error: error C3861: 'system': identifier not found woodland30033 wrote: Is doing something like: system("notepad.exe") allowed in the express edition of Visual C++ When I try to do it, I get the following error: error C3861: 'system': identifier not found For future reference: 1. In VC++ click Help | Index . In the index pane, Look for: system function . 2. In the middle of the help page that you get, there is a Requirements section (followed by a worked example). That section specifies the platforms on which the function is imple ...Show All
Smart Device Development Getting Warning WINVER not defined. Defaulting to 0x0502 (Windows Server 2003) in VS 2005
Hi, i have ported the project from vc++ 6.0 to VS 2005.while compiling i have received the warning message "WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)". Pls let me is there any solution for the above warning message. Thanks, Ganesh ...Show All
Visual Studio Express Editions Database search
This has probably been asked and answered before but here goes. I have set up a login for my application and need to serach my database for username/password combination. Neither of which is the primary key. This is the code I have come upi with so far but it doesn't work! I have used username/passwords that are in the database so it should work. Please can anyone help me Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim user As String = Me .UserName.Text Dim password As String = Me .Password.Text If user = "Admin" Then ElseIf password = "pass" Then Dim myAdminMainForm As New MainForm ...Show All
Visual Studio How to force Visual Studio 2005 to report the missed DLL files?
Hello: I have found one function in Visual Studio 2003 that by default is not turned on by Visual Studio 2005. I have a small OpenCV program that needs to load some DLLs in order to run. First, I ran this program in Visual Studio 2003, the IDE immediately tells me which DLL file is missed. However, when I run this program in Visual Studio 2005, the IDE didn't give me any useful information related to those missed DLL files. The only error messages I got from IDE is as follows: 'TestCV.exe': Loaded 'C:\temp\VC2005\TestCV\debug\TestCV.exe', Symbols loaded. 'TestCV.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded. 'TestCV.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded. 'TestCV.exe': Loaded 'C:\WINDOWS\system ...Show All
Visual C# Copy and paste data between 2 notepads in C#
Hi All, I need to open 2 notepads programatically. If I copy data from one notepad, and try to paste it in the next notepad, it should not get pasted. Can anyone suggest me a solution for carrying out the above one. Hi, I wrote some code snippet which copies text from Clipboard and pastes to notepad. I have used WM_SETTEXT to paste the text into the Notepad. The same way you can get the text from notepad using WM_GETTEXT. Please refer the sample and modify it as per your need if possible. Look at the last post of mine at http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1108725&SiteID=1 For more info about WM_XXXTEXT please refer, http://msdn.microsoft.com/library/default.asp url=/library/en-us/winui/ ...Show All
