|
Herein lies another problem, when I enter the string()strings=string.split("-") VB gives me a syntax error stating that 'String is a class type, and so is not valid. Also Name 'TheString'is not declared. UFFFFF! You see my frustration. LOL
|
|
|
|
|
12String wrote: You see my frustration. LOL
Yes, the problem is that you're looking for a cut and paste solution instead of thinking about it.
string.split is my way of showing you where this function lives
myString.split obviously requires you to replace myString with the name of the variable that holds the string in your program.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian, you deserve some sort of an award You are certainly blessed with above average patience!
...Steve
|
|
|
|
|
I regard it as a challenge at times to lead people to their required solution. It would be easy just to give him the code, but that's not really helping him, is it ?
Having aspirations to project management, I need to work on my communication skills anyhow
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: It would be easy just to give him the code, but that's not really helping him, is it ?
Bravo! One of the few who thinks it's better to learn by doing (and screwing it up!) than by having it spoon fed to you!
To offer a different answer to his problem though... I've always done one of two things. Either used a Masked Edit Box or (more directly to his problem) just let the user type whatever they wanted into the box. Then in the validation or submit process, strip out everything that wasn't a number to create a string of numbers, measure the length for completeness, then put the dashes and parentheses (if needed) back in where they're supposed to go. Walla! Instant phone number that can be re-edited at any time, if needed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote: Masked Edit Box
Yeah, the easiest way to validate is to only let the user type in something that is valid I can't recall if it was apparent if this was a web or windows UI though. I know it can be done with a web UI, but I tend to shun Jscript as I fear browser issues.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Just a thought, what if we create a custom textbox which allow you to type only numbers and inserts "-" at proper places automaitcally
- ashish
|
|
|
|
|
How would we go about doing that?
|
|
|
|
|
I know generally how to raise and detect/handle events in my own programs, but how does one detect system events? I can't imagine there aren't events raised when someone selects a start menu item, much less something like a system error or a new usb device being inserted.
anyone have a few hints where to start looking for things like this? and what about making my programs raise system-wide events? are all events system-wide(if they are public that is)? thanks to anyone with this info.
sincerely, Brett Peirce - PolerBear
To err is human; To forgive: divine.
|
|
|
|
|
There are code samples for HID/USB events around. A start menu item, I'm not so sure of, but you can write global hooks for global events, in C++ at least.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Lot of stuff all together.
There are classes in the .NET Framework you can use to get some system events (i.e. FileSystemWatcher, ...)
Others, like USB or PCMCIA insertion have some sample code around here (as stated in previous reply)
I don't believe a there's a system event for a start menu selection. Only way could be to get all the system msg but I guess you need to use something different than VB.NET (I may be wrong).
To generate system event is a slightly diffent, and depends on what do you mean. Create "fake" events? Notify every task of something (or only some "listening" tasks?)?
|
|
|
|
|
Hi,
I want to Change the date format(which is comming for Date Time picker control) to YYYYMMDD.
Plz help me.
regards,
Paritosh
Paritosh
|
|
|
|
|
Hi,
I'm only do work in C# but i am sure about you can do this small work by yourself. Anyways...
On desgin Time
change date picker control Properties (Press F4)
===========================
CustomFormt = yyyyMMdd
Format = Custom
================
Through codeing change date format
string dt = dateTimePicker.Value.ToString("yyyyMMdd");
MessageBox.Show(dt);
Hope this work!
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
Hope this works for u.
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
TextBox1.Text = DateTimePicker1.Value
End Sub
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DateTimePicker1.CustomFormat = "yyyy/MM/dd"
DateTimePicker1.Format = DateTimePickerFormat.Custom
End Sub
End Class
|
|
|
|
|
Is it possible to develop a user control or windows form that can be embeded in an html document. The html document will not necessarily be served by a web server but may be located on the local machine.
If so, is it possible to have this control/windows form automatically deployed using click once?
I'm essentially trying to mimic an ActiveX control being embeded into an html document.
Thanks
|
|
|
|
|
Hi, suppose i have username, password, ISP phone number and i want to create network connection to dial to that ISP. How could i create the dial up connection from vb.net by using the information that I have above?
|
|
|
|
|
hi there,
You might play with WinInet API
WinInet API
<< >>
|
|
|
|
|
Hi Everybody
I'd like to know if there's a way to put a reference on a Visual Basic project to a OpenOffice.org program to run it and control it from my Visual Basic Application. I know that we can do this with Microsoft Office applications, in fact I'm using Excel in my project but I'd like to try something different as OpenOffice Calc for example. I searched in the internet but I didn't find anything If you know something about, then please let me know.
Thanks in advance.;)
TK
|
|
|
|
|
To open and run it you just need a shell command from VB ... to control it is more OO related (and dependant to). So I guess you'll get more info if you ask it on its website!
|
|
|
|
|
Hello
How I can show TV with Managed DirectX 9 ?
Can you showme a sample ? please
Thanks
|
|
|
|
|
This is such an amazing question - how would a software SDK get a TV signal unless you have the hardware to recieve/decode it ?
The answer is no, you need a TV card to recieve a TV signal.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
Im trying to get computer information of all PC's on a domain.
I got the following code from Microsoft:
Dim TheDomain As IADsDomain
Dim Computer As IADsComputer
Dim strDomain As String
Dim iMousePointer As Integer
'Accept the Domain name
strDomain = InputBox("Domain Name: ")
'Use the WinNT Directory Services
strDomain = "WinNT://" & strDomain
'Create the Domain object
Set TheDomain = GetObject(strDomain)
'Search for Computers in the Domain
TheDomain.Filter = Array("Computer")
For Each Computer In TheDomain
List1.AddItem Computer.Name
Next Computer
My problem is that this is VB6 code and I need a working dotNet equivalent.
All works fine up untill the Array("Computer") function, VB .NET doesn't support this function.
Can anyone help me with an alternative way to build this collection so that I can use is in the "For Each" loop?
I'm guessing Active Directories will be the answer but I cant seem to get it right.
Thanx!
|
|
|
|
|
I got it right afterall.
I wrote the code in VB6 and built it as a DLL.
Then referenced the DLL in VB .Net, works like a bomb!
|
|
|
|
|
hi,
i have to set timer in my windows application.
if date of set_timer column in database is equal to system date time then a beep should be generated.
i am unable to write exect code for retrieving that perticular date where set_timer= system.datetime.now()
i had write sql query in adapter, all were failed to get data from data set.
select * from case_details where (set_timer= dt)
select * from case_details where (set_timer= 'dt')
select * from case_details where (set_timer= '&dt&')
where dt was declared as
dim dt as system.datetime
dt= datetime.now()
i had also use convert function
as
select * from case_details where (set_timer= CONVERT(DATETIME,dt,102))
it is also not woking plz help me.
hi this ajay bharti
|
|
|
|
|
A datetime runs right down to the millisecond. You need to make your query so that it has less granularity, by either stripping info from all datetimes you store ( for example, set all milliseconds to zero ), or by using a range in your query.
Christian Graus - Microsoft MVP - C++
|
|
|
|