|
hi...
i think u can do the thing with setupfactory, u can search it in google..
|
|
|
|
|
i have a function... but i dont know how do i call that function to validate e-mail text box.. can u please tell me the code...
the function is as below.. please tell me how to call that.. and even where should i write the code to validate email textbox..
Imports System.Text.RegularExpressions
Function EmailAddressCheck(ByVal emailAddress As String) As Boolean
Dim pattern As String = "^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"
Dim emailAddressMatch As Match = Regex.Match(emailAddress, pattern)
If emailAddressMatch.Success Then
EmailAddressCheck = True
Else
EmailAddressCheck = False
End If
End Function
|
|
|
|
|
Wow. What this tells me is that you're able to use google to find code, but don't have the most basic idea of what it does. I suggest reading a VB.NET book or two before you do anything else.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
p_m_kanthi wrote: can u please tell me the code...
Why?? You already have the code. If you can't figure out how to call it, you're skills are in great need of improvement. What you want to do is pretty much in any introductory course to programming and in the first couple of chapters in any VB.NET beginners book. We could tell you how to do it, but you wouldn't understand the answer.
|
|
|
|
|
how to create ribbon menus in visual basic dot net.........explain me with sample program
|
|
|
|
|
How to ask a stupid question
1 - choose a stupid header. Something meaningless, because it applies to every post in the forum. The name of the language the forum is for, is a good choice
2 - ask a broad level question that can't be answered easily or quickly
3 - ask people to provide full source code
4 - sweat while you hope the code arrives before your rentacoder client complains and the deadline passes
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
you forgot point 5:
do not say "please".
|
|
|
|
|
OK so here's the deal I'm working on loading xml from a file into certain textboxes with XMLDocument.
My first XML looked like this:
<option name="HP_LOW" value="85" />
<option name="MP_LOW_POTION" value="60" />
<option name="HP_LOW_POTION" value="60" />
The attribute called "value" was what I needed to appear in the text boxes. Those were the same so when I set a loop to load those it returned all 85's.. I fixed this by:
If m_node.Attributes.GetNamedItem("name").Value = "HP_LOW" Then
HP_LOW.Text = m_node.Attributes.GetNamedItem("value").Value
End If
and so on for the rest.
Now i have run into another problem. I have one with single attributes that are all the same.
<friend name="MyOtherCharacter1" />
<friend name="MyOtherCharacter2" />
<friend name="MyOtherCharacter3" />
<friend name="MyOtherCharacter4" />
<friend name="MyOtherCharacter5" />
<friend name="MyOtherCharacter6" />
When I run it in a loop with:
Dim friends = m_node.Attributes.GetNamedItem("name").Value
Console.Write("friends: " & friends)
I can see all of them fine in the console:
friends: MyOtherCharacter1
friends: MyOtherCharacter2
friends: MyOtherCharacter3
friends: MyOtherCharacter4
friends: MyOtherCharacter5
friends: MyOtherCharacter6
Now (finally) my question is how do i separate each line into a different text box?
modified on Sunday, April 26, 2009 4:03 PM
|
|
|
|
|
I think your core problem is that you're not using xpath to filter your nodes. Once you do that, your issue becomes, how do you write code that goes from one textbox to the next. I suspect the best way is to build a collection of only textboxes and step through it.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
No, I used XmlTextReader to load before, but because the length the xml file is always changing i cant just go down the list going from one node to the next. hence using the non-sequential 'XmlDocument'
|
|
|
|
|
The length should not matter, but if you know what XPath is and feel sure you've made a better choice, then fair enough. I'd iterate over the forms controls collection to build a list of just textboxes, then I'd keep an index in that list. Or you could just enumerate over the controls until you find an empty textbox, if the only textboxes you have, are the ones you want to fill.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
|
Help with what?? You haven't asked a specific question about the part you're having a problem with.
|
|
|
|
|
If this is paid work, tell the client you are a fraud. If it's homework, talk to your teacher, if you're too lost to ask specific questions, the teacher is the one best able to help.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hello,
In the project I am currently working on I need to create a few listboxes dynamicly. This, so far, is no problem:
The declaration:
Public newlistbox() As ListBox
ReDim Preserve newlistbox(chatnummer)
newlistbox(chatnummer) = New ListBox
Me.Controls.Add(newlistbox(chatnummer))
Me.newlistbox(chatnummer).Location = New Point(100, 150)
Me.newlistbox(chatnummer).Size = New Size(105, newrichbox(chatnummer).Height)
newlistbox(chatnummer).Name = newchannel
This part works fine, but now I want to perform an action when the listbox has been double clicked.
Normally you would use something like
.... Handles newlistbox.DoubleClick
But this gives an error.
I have seen a post using withevents as declaration but this doesnt work for me since i am using an array listbox.
Any ideas on how i can do this?
I am working with vb.net 2008
modified on Sunday, April 26, 2009 6:09 AM
|
|
|
|
|
Hi,
have a look at the AddHandler statement.
|
|
|
|
|
|
|
Can someone point me to good info for adding the ability to a RichtextBox to wrap text around an image (like in Word and Works)? I've read that the RTB doesn't support the entire RTF specification, but I'm thinking one should be able to alter the RTF code in the background to get it done. I'd rather not reinvent the wheel if someone already has some code (VB.net) posted. Failing that, any good advice on getting it done is appreciated.
|
|
|
|
|
Iam very very new to vb.net and am learning a lot through examples from code project. I want to define a user control (mybutton)
Question:
I defined an enum property for the user defined control (inherits button). The proeprty is shape of the button (round, rectangular, elliptical etc). During design time when I change the shape property from say rectangular to elliptical, the shape of the button doesn't gets updated in the form. Any help on how to achieve this?
Thanks,
GJ
|
|
|
|
|
You would normally redraw the control by handling the Paint event. If you're painting code is elsewhere, you're going to have problems.
|
|
|
|
|
Hi,
I'm a novice at writing code, especially VB, however, I need some help writing VB code or something similar. I'm open to suggestions. I need to have the program either .vbs or .bat or what is recommended look in C:\Documents and Settings or C:\Program Files\IBM or C:\Program Files\Lotus for a file called "ctman.nsf" without the quotes. If it finds that file it needs to notify the user it has found that file and the location and of course with an OK button. If it doesn't find that file it needs to notify the user that the file was not found with an OK button. I plan on emailing this out to my users via Lotus notes (they are all on the same network and its Internal and having them run this file to search) and from Lotus they will just save it to their desktop, or if it's small enough in code size I might have them run it from our server.
If you have any questions feel free to ask. I'll be on the board all day until I can get some help. Thank you.
cjc
|
|
|
|
|
|
Can I just put that code in a vbs document and run it?
-cjc
|
|
|
|
|
Sure, if you want to fail at it. Try understanding how the methods work first, then write code more appropriate for your own app.
|
|
|
|