Benjj's Q&A profile
Windows Forms Validation within a data grid
I am using datagrids for data modifications. I would like to validate from by cell instead of on a form save. In other words, when someone changes a value in a cell, I want to execute a validation routine to verify that cell. I have looked at the Validating event on the Datagrid but it does not seem to fire. I am using VS 2003 C#. Thanks I usually handle the textbox in a datagridtextbox columns validate event using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace DGValidate { public partial class Form1 : Form { public Form1() { ...Show All
Smart Device Development WinCE UI in Windows Mobile device
The UI of winCE application does not look the same on PocketPC with Windows mobile 2003 OS. Do I need to have different design for the UI. Generally yes if you support both. Most significant difference is menu position. Some developers simply reserve spot on top for menu on CE without changing forms. ...Show All
Visual Basic HOW TO: Loop Through a DataGrid and send it to a TextFile.txt-.NET 2.0
How do I Loop Through a DataGrid subform and send it to a TextFile.txt I saw where you guys were able to help the respondent loop through a datagrid and send the data to a textfile. How would I go about doing the same thing and sending it to a SQL database table. I am a "newbie" to vb.NET and cannot find this anywhere. Thanks in advance, J.C. ...Show All
Internet Explorer Development Still another report on this...
Having an intermittent problem printing To: From: CC: Subject: Attachments: headers on emails. Usually happens with larger emails or emails with large attachments or emails that have been replied to or forwarded from other people. Have installed Generic/text printer and sent the email to this printer but sometimes the headers are still missing even printing this way. I have if I open the offending email and highlight just one or two words in the text of the email eg Dear John and then print the email using my HP printer (not as text on Generic printer) - the headers then print and so does the selected words. Don't suggest using Outlook as often we only print the first page of emails as we already have the rest of the email on file especial ...Show All
Visual Studio source safe plugin installation with visual studio 2005
This is the scenario. Visual source safe was installed first before vs2005. The result is vss plugin did not run on vs2005. how do you manually enable the vss plugin to work with vs2005 Thanks Try checking "Show All Settings" checkbox at the bottom of the Tools->Options dialog Note: VS Express do not support SCC integration. ...Show All
Windows Forms How to check Windows Form is completely shown on the screen
Actually the reason for this is: i want to do printscreens within my application(like after i press a button on my form, this button press will run a method with printscreen function), therefore at first i had Application.DoEvents(); System.Threading.Thread.Sleep(1000); but i read up on application.doevents() and there is an issue that it may go into an event twice.. Is there a way to check when the windows form is completely loaded or repainted as i run my application Or is there suggestions to let the application wait while continuing to load cos if using thread.sleep only, the whole application will pause and the form loading will also pause. Or is there any alternative to application.doevents() Let me clarify that i am not using this ...Show All
SQL Server Ideas for Next Version ...
To Whom It Concerns - MS Product Design - SQL Server Reporting Services: I've been working with an ASP.NET web based project utilizing SQL Server Reporting Services for a while and have some things that I think need to be addressed in the next version: 1) I finally got security working utilizing the form based authentication of my Web based app and passing that to SSRS through the ReportViewer control. Not that it was easy. From what I see, a lot of people are having problems with this and so I didn't feel like I was alone. That said, instructions on how to do it need to be easier. Ultimately, it would be better if on the ReportViewer control, you could add properties as follows: * Impersonate SSRS User * Impersonization Pas ...Show All
Windows Forms Help Creating Bold Text...
Ok, the problem I'm having is thet when I select my text and click my BoldButton, no matter what my selected text font or text size is set to, it reverts it back to 'Microsoft Sans Serif, 8.25 pt' Here is my code: If (Color.op_Inequality( Me .BackColor, SystemColors.ControlDark)) Then Me .BackColor = SystemColors.ControlDark End If If Not ( Me .Font.Bold) Then Me .Font = New Font( Me .Font, FontStyle.Bold) RichTextBox1.SelectionFont = Me .Font Else Me .Font = New Font( Me .Font, FontStyle.Regular) RichTextBox1.SelectionFont = Me .Font End If RichTextBox1.Focus() I know it has to be a simple fix...........Thanks for your reply. Ok, i tri ...Show All
Visual Studio Express Editions Beginer Help
Hey, I just downloaded VB Express a couple weeks ago. I'm having trouble finding resources for beginers. I've found all of the video series on microsoft.com but I want a bit more resources. Where can I find them www.google.com www.amazon.com Seriously, if you'r ehaving trouble with the resources you've found, you probably need to buy a good VB *language* book ( NOT one that teaches you how to create forms and use the designer ) and work through it. I bought 'teach yourself C++ in 24 hours' 8 7 odd years ago, and worked through it, I got my first dev job 6 months later ( obviously by going on to more advanced books and learning more than that book taught me ). There's no harm in starting with a s ...Show All
Visual Basic Current Windows Identity
I have been using the windowsidentity.getcurrent() to reterve a username. When the user changes the name I still get the old one, how can I get the new one The Following line of code is the formula to get the readable username Dim computername as string = system.net.dns.gethostname Dim rawuser as string = system.security.principal.windowsidentity.getcurrent.name DIm username as string = rawuser.remove(0,computername.length) msgbox(username) What do you exactly mean by "the user changes the name" And also your code will only work on a local machine. if your user is logged in with a domain user account then the machine name is not part of the string and you just cut your string wrong. The safe way of do ...Show All
Windows Forms Encrypting the content of a textbox
I'm having a hard time to encrypt the content of a textbox that will serve as a password entry in a Login Form, just like the native ASP.NET password control encrypts its content... thanks Drop the textbox on the form In the PropertyBrowser window, for the PasswordChar property of textbox, type some character like "*". Then whatever you type in the textbox will be displayed as * Is this what you were looking for ...Show All
Visual C++ Error C2582 when creating a new struct
Hi, Within a namespace, have declared a new struct like so: public ref struct moveLine { int moveCount; array <move^> ^moves; }; Have declared a member of a class with this data type like so: moveLine m; // note that putting "^" brings up a compile error and in the constructor of the class, I try to implement it with the following code: m = gcnew moveLine; Have also tried this with moveLine(). This line raises the following error: Error 2 error C2582: 'operator =' function is unavailable in 'moveLine' progHead.h 57 Am very tired, and can't figure this out - can't work it out from MSDN documentation either. Hope you can help. Cheers, Fritz ...Show All
Visual C++ strange output with atan2.....what does it mean?
my line of code is: phi=atan2(n,e.x)+atan2(e.z,e.y); and it returns this: 0012FCE43.14159 does anyone know what this output is thanks! -sharyl Indeed, strange output... but since atan2 actually returns a number the big question is how did you transform the number into this text ...Show All
SharePoint Products and Technologies Configuration Wizard failed - hosts file missing
Hi, I just want to let you know, that during the Configuration Wizard of MOSS EE 2007 (English) the configuration failed because of a missing C:\Windows\System32\Drivers \etc\hosts file! I created the hosts file and added 2 entries: 127.0.0.1 localhost 127.0.0.1 <machine name> And ran the Configuration Wizard again - with success. Before installation I added the server role "Active Directory", maybe the DNS Server installation removed the file, I'm not sure, I have never meet that the hosts file is missing! System: Win2k3 Server Enterpriser Edition (SP1) Server roles: Application Server Active Directory DNS Server I found that once myself Kevin but only once. I have d ...Show All
Windows Forms how can i seprate the text
there are 2 column account and code but in account column the account and code both are show.like this ------------------------------------------------- Account Code ------------------------------------------------- MyAccount - 1000 1000 YouAccount - 2000 2000 ------------------------------------------------- now I Want to account only not code for example:"MyAccount" not "MyAccount - 1000" so how can i do this. Acctually the "code" is concatinate with Account thanks you have to use lastindexof("-") to find the index of "-" from the end. then even if your account name has "-" in it, you will be able to remove t ...Show All
