.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

winform MaskedTextBox

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :WPF
Using winform MaskedTextBox
If I don't want to limit the user input to specific number of characters in the input.
I Just want to limit their type, lets say any number of letters and and last character is a digit.
How do I do it ?
Is there any regular expression for this , maybe like (L)*0

good morning sunshine

View Complete Post

More Related Resource Links

Want to Create Table Dynamically With text Control in WinForm Csharp

Hello To All... from Many Days i m tryng to create a simple table using csharp in WinForm.Which will include textbox in each cell according the Passed No of Col & Row. but not getting the proper result. Actually i want to trace each cell data and want to save each cell data to data base : eg. in cell 11(1col & 1row) i m having Combobox which having some item list and when the user select the list item the data will save to the database. Regards, Praveen    What is the Key of Life ... Its Sharing Your Thought & Knowledge ...

Remotely access winform application through admin panel

I am going to develop following application but not sure how to do this   Application will run different instances for various clients on different servers.     Each instance will run on different criteria stored in database managed by an admin.     Would like to be able to run this from the admin section.     Maybe using a server command line component and pipin the output into a web based admin? -- Whatever you think is best.     This application will run basically 24-7   Any best solution, idea etc

Auto saving the Winform application

hi,   I am developing a huge win form application, which has lot of win forms, user controls and wizards. For user it will take some time to fill-in all the fields and complete the wizard. I wanted to implement auto saving the application for every 3-4 minutes, this should be done in the background without disturbing the user activity (or thread)..   can anyone help me to implement this? Please share your ideas.   thanks

C# winform.controls for novice

i wanna separate my content as wpf's expander in win-form. tree's node as detail-view separate the tab with a little px in tab-control; round the coner

Restart a Wpf Application from a WinForm

I have a problem with a solution that I'm trying to develope. This is my scenario: I have a VB6 application and I would call from this application some WPF windows. I've used the Interop Form Library to define a WinForm like a bridge from VB6 to WPF. The Interop WinForm exposes the methods to start and shutdown the wpf application. To do that, in the WPF Application I've defined an helper like this: Public Class StartApplicationHelper Public Shared Property IsReady As Boolean = False Public Shared Event NotifyEvent As ValueEnterEventHandler Public Shared Sub Start() If System.Windows.Application.Current Is Nothing Then Try Dim myApp As Application = New Application myApp.ShutdownMode = ShutdownMode.OnExplicitShutdown myApp.InitializeComponent() IsReady= True Catch ex As Exception MessageBox.Show(ex.Message) End Try End If End Sub Public Shared Sub Shutdown() If System.Windows.Application.Current IsNot Nothing Then System.Windows.Application.Current.Shutdown() IsReady = False End If End Sub Public Shared Sub DispatchEvent(ByVal eve As String) If IsReady Then EventDispatcherService.DispatchEvent(eve, New EventDispatcherDataChildWin(String.Empty, Nothing, Nothing, False)) End Sub Public Shared Sub DispatchResult(ByVal

Change alignment of winform title bar to center

Hi, How can I chaneg titlebar text alignment to center in winform (C#.Net). Regards, Shweta  

WCF Membership Authentication and Winform Client Application Services

I am needing more validation of what I am doing versus solving a problem. I have a winforms application that uses Client Application Services to validate a user against a customer membership provider all over SSL.  This works fine.  My winforms application validates correctly. The winforms application uses WCF to call services that are installed on the same IIS server that is providing the membership services for the Client Application Services.  The WCF services use wsHTTP binding, transport security, username credentials, and validate against the same membership provider as the Client Application Services. It appears that although the service and Client Application Services are at the same URL, they do not share credentials between them.  Ideally, once I log into Client Application Services, any calls to a WCF service at that location would be automatically authenticated.  However, this is not true.  I have to pass the username and password into the credentials for the WCF service.  This works as expected where the username and password are validated prior to allowing a service call.  On subsequent services calls, it does not validate again since it has established the secure channel. So, does this sound like the best approach?  Is there a way to pass credentials from the Client Application Services to WCF automatically?  I

Empty WinForm frezzes on show?

Hi! I have a static WindowController where I can do the following : Open LoginForm Open MainForm Open MidiFormInMainForm When application starts it will Open LoginForm with WindowsController. This is done by instanciate the form, binding it to a SuccessfulLogin event and then run Show(). Everything works grate so far. When hitting the login button(in LoginForm) a separate Thread will be created with ThreadPool.QueueUserWorkItem. ThreadPool.QueueUserWorkItem(new WaitCallback(LoginUser)); This Thread will validate the form(with begin invoke), send the login information and if success then trigger the SuccessfulLogin event and finaly close the login(all this from within the LoginForm). When the WindowsController get the SuccessfulLogin event it will run this simple code :   Form form = new Form(); form.Show();   This will open a empty form but it will frezze, it is not even possible to move the window? If we change the code to form.ShowDialog() then it will show properly but we do not want it to be a dialog. I supose that this could have something to do with the threading and maby also that the WindowController is static. Pleas advice. BestRegards  

selecting maskedtextbox text

i have a MaskedTextBox in my c# application form. when i navigate through controls in form with pressing tab key, the maskedtextbox text does not selected!!!? also i write a code in maskedtextbox on enter event like following that does not help? maskedTextBox1.Select(0,20);

Access a SharePoint list from a WinForm

I have created a winform. The winform runs on the server that is in the SharePoint Farm. It is throwing an exception when I try to connect to the list. Any ideas? Is there some special consideratoin I need to have when connecting with a winform? The winform just has a button that when pressed I want to give the created date a new value, which is part of the name of the file in the list.



using (SPSite site = new SPSite(http://inet533/sites/aamc/refctr/))

How to "fork" console when my winForm is in a pipe?


Hi All,

I have a winform app, which can read from stdin. That is fine basically, but it hangs the belonging console when I start it in a pipeline. In other words, if I start it like "dir|mynotepad", I can reach the data in my app, but the console where I started the app is waiting till I close my form.

I'd like to get my prompt back, once I read all the data from stdin. I have tried to create new thread/process, but they cannot survive the main thread. I tryed it in c#, .net3.5 on winXP.

Could anyone give me some advise please?

Any help would be really appreciated. Thanks,

User can not run a winForm with the ReportView Control


hi there:

   I've developed a simple WinForm application and drag a ReviewViewer control to that form in order to pull a report from the report server. It runs perfect on my machine. However, after I compiled the apps and distributed to user's machine, she can not run it. Below is the error message


"Coudl not laod file or assembly 'Microsoft.ReportViewer.WinForms, Version =, Culture= Neural, PUblicKeyToken = bxxxxxxxx' or one of its dependencies. The system can not find the files specified.


 Any ideas?





--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

WinForm inside a WPF window


Is it possible to open a Window Form inside the WPF Form and how ? So that the WPF window really host all the Form (System.Windows.Forms.Form) .

.Net 4.0 Winform Control hosted in IE


We have an application that utilizes winform controls hosted in IE8+. In .Net 3.5 and before this worked great. We migrated our application to 4.0 and the exact same code will not function in IE. It compiles just fine and runs outside of IE. If I set our target framework back to 3.5 we have no problems. When we set it to 4.0 it just doesn't work.

I will say that we are gathering information from the system regarding printers.



Populate a listbox in a WinForm apps using C#


Hi there:

 Since I am pretty new to C# winForm appls, I have a dumb question here.

I've drag a ListBox control to a form and want to link this to a query. What I want to achieve is that

when this form is activated , I want to populate this listBox from a query so that user can pick their choice.

   I saw the little triangle icon on the top right side of the listBox control and pick the use data bound items cause I'd like to connect to a query. After this step, I am a lost , don't know what to do.


 Can someone please share his/her experience?






--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

how do I change BORDER COLOR for a TEXTBOX (and any other winform control) in a windforms app in VB

Does anyone have the VB code to change  border colors for winform controls such as a textbox?

Winform to WPF including KeyBinding?


I need some assistance in getting WPF KeyBindings working when being called from a WinForm application. I've created what I think is the basic parts to demonstrate the problem.

The WinForm application starts a form which has a button that calls the WPF view.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
 Dim view As New WpfPart.MainWindow
End Sub

With WPF view creates it's view model and sets up the keybings:

<Window x:Class="WpfPart.MainWindow
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend