I have 1 masked textbox. I made a custom mask. My custom mask is >AAAA - AAAA - AAAA - AAAA - AAAA
Now my problem is. When the Masked textbox is empty is showes this:
____ - ____ - ____ - ____ - ____
I do not want the underlines and the hyphens showing. I was able to remove the underline by changing the PromptChar to a space. Now my problem is the hyphen. I do not want them showing. But I don't want them gone. I want them to show when the user has typed in 4 characters in each space.
How can I insert a hyphen after each 3 characters in a textbox? For example, if in the text box there are: ABCDEFGHIJKLMNOP. how can I insert a hyphen between each 3 letters automatically? The result would then be ABC-DEF-GHI-JKL-MNO-P. I have come to a way but it's not a practical one, i.e I used Insert(,"-") but then lines are filled with conditions slowing down the application. [Code]
Basically, for each character in a charArray created from the string to split, if the character is a letter, digit, or hyphen, I append it to a temporary string. When I see a split character or the last character, and the temporary string has value, I add it to the collection to return.
For i As Integer = 0 To (charArrayLength - 1) charToInspect = CChar(charArray.GetValue(i)) If IsLetterOrDigit(charToInspect) Or charToInspect = hyphen Then
1)This is my code.. (below)what i am trying to do here is to insert username and confirmed password into a sql table called login via a pre created form.I have 1 textbox, 2 Maskedtextboxes and a button.
what i would like is if the passwords do not match in both maskedtextboxes for the system to throw out a message saying passwords do not match please try again..which then clears previous content and requires the user to enter details again. once details are correct and system commits the new user details to the table and throws up a confirmation message.
I'm trying to match a string to see if it matches exactly this:####-####, it has to be 4 digits followed by a hyphen followed by 4 more digits. Right now I have this pattern: "d{4}-d{4}" but it's allowing 5 digits in either (or both) instead of strictly 4 per group. Here's an example of what it should allow:
1999-2000 2003-2007 2009-2010
and here's what my pattern is allowing but should not be allowing:
I found on msdn samples and modified (add Thread.GetDomaind.UnhandledException)
<SecurityPermission(SecurityAction.Demand, Flags:=SecurityPermissionFlag.ControlAppDomain)> _ Public Sub Main() ' Add the event handler for handling UI thread exceptions to the event.[code].....
It appears that my favorite thing in the world is tackling projects that are beyond my current knowledge and abilities. I have a little project that I am working on which is a simple image viewer stocked with (upon completion) your standard Load..., Next/Previous, Zoom In/Out, Actual Size, and Full Screen capabilities. However, I am running into a few snags:
(1) I've been able to get my "Load..." button to display a file dialog box, but I cannot seem to get a working filter (with which only image file types are allowed to be selected) in working order.
(2) I have a PictureBox object (entitled PictureBox1) that displays the image selected via the file dialog box, but it loads images in their full size (1:1/100% zoomed) state without scrollbars, etc. to allow me to navigate the loaded image. I would like to have it load the image, initially, to fit within the dimensions of PictureBox1 and from there be able to zoom in/out via my "Zoom In/Out" and "Actual Size" buttons and be able to scroll if the zoom level is beyond the dimensions of PictureBox1.
(3) It dawned on me that I haven't the faintest idea how to get my "Next/Previous" buttons to allow the user (me) to navigate, in succession, the images contained in the folder in which the currently loaded image is stored. [code]
If it is deemed that this thread is inappropriately requesting help, I ask that it be locked/deleted quickly as I recognize that this is a large community with many discussions going without need of unwelcome posts.
I'm using loop to read data from sql and then make some calculations then save it again to another table but when application loop for 3 or 4 times it's freeze but the job is done but if loop = 10 or more then it is freeze and hangup for long time .i need to learn how to make my application working better and never freeze and make application working with any count for loop without freeze .
I am moving over to vb.NET and am experiencing the learning curve. Am learning quickly, but I do have a question for anyone who can respond. vb6 could be made to run much faster by going after the GDI API directly, rather than going through vb6's standard wrapped functions like Line(), and Circle(). Now that I am working with vb.NET and GDI+, as far as I can tell there is no wrapper anymore and you hit GDI+ directly "right out of the box". Is this true? It looks like trying to phenagle the old vb6 API code can't work because .NET does not use GDI anymore...it uses GDI+ via the System.Drawing namespace.
I can't figure out why my addhandler is not firing?In the Sub "CreateTagStyle" the AddHandler is not firing when the LinkButton is clicked Is there some reason that addhandlers can't be added at certain points of the page lifecycle?
<%@ Page Title="" Language="VB" MasterPageFile="~/_Common/Admin.master" %> <script runat="server"> Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
I am using the CustomValidator for the first time but it doesn't seem to be firing DateExpireRequired_ServerValidate and just runs the code in the Click action.Been bugging me for a couple hours now! can anyone see a problem with what im doing?The DropDownList in my code below is populated using Roles.GetAllRoles()
I'm trying to get get the short filename from a long filename but I'm having problem in c# code. VB.Net code is:
Declare Function GetShortPathName Lib "kernel32" _ Alias "GetShortPathNameA" (ByVal lpszLongPath As String, _ ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long
[Code]....
But I cant get the c# version work. Am I missing something or what is wrong?
I have a Class Library that is exposed to COM like this:
<ComClass(SomeClass.ClassId, SomeClass.InterfaceId, SomeClass.EventsId)> Public Class SomeClass Public Const ClassId As String = "GUID1" Public Const InterfaceId As String = "GUID2"
[Code]....
Compile error:
Function or interface marked as restricted, or the function uses an Automation type not suppport in Visual Basic.
What do I need to do to properly expose this Method so I can use it like this?:
I'm using the ZipForge to extract an archive in VB.NET.When I run the code I get no errors, but it doesn't extract any of the files. This is the code I'm using:
I'm getting an ArgumentOutOfRange error when using substring function in .NET. I'm new to .NET so probably doing something wrong. I have a txtField, which is a text field component in GUI. I'm using Microsoft Visual Basic 2010 Express
I have a COM dll that has been developed under vb.net. The Control works just fine in IE 6 and IE 7, but when IE 8 tries to load the control, the browser crashes. I look at the event viewer and I get an error 1000 about iexplorer.exe and mshtml.dll. Do I have to build this com dll with IE 8 on my development machine? How can I track down what is wrong with the Control?
I created an activex in vb6 and used it asp.net. It work perfectly in ie6 . But not working in ie8 . No errors showing. In security setting I enabled activex option just like i changed in ie6. Only the small square i can see in ie8.
Can someone please show me an example of how I would start a timer when viewing another window such as Mozilla Firefox? I would prefer it be started with a keystroke.
I have developed an application is VS2010 ( VB app using .NET4 ) ... the application runs fine under Windows 7 and on (3) XP machines we have here. Had one user looking for support on an XP machine ... when he started the app nothing happened. No errors or anything, just nothing happened. Had him install the latest .NET4 framework and everything was fine.
Just had another support issue ... user with the same complaint ... had him install latest .NET4 ... but this time did not fix the issue ... still nothing happens when he clicks to start the app ... no errors ... just nothing happens.
I can't check this because it runs on all our XP machines .... Is the only criteria that .NET4 be installed? I created an install that includes only the EXE from the BINRELEASE folder ... nothing else. Do I need anything else. Strange that it works on all our XP machines.
my application required the dropping of resources when a button is pressed.It seems when this button is pressed on XP everything works swimmingly, however...
on windows 7 and vista the button simply dosent do anything, ive tried elevating to admin etc..
Is it possibly due to how it creates/drops resources?
However, when I submit the form I just get the message, "We were unable to access your information. Please try again."I saw this question and made sure to add those attributes to my web.config here:
[Code]...
I added a break point in this function but it is never reached, the above error message just comes up in the app. Any other ways to debug what's going wrong?