|
Do the dashes have to be in the exact same place every time? Are you talking about a North American phone number?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes but after working on it I was able to figure that one out. Still having problem with the code but at least I got that part. For some reason, my message box does not appear when I click on the validate button but when I click on the exit button. These projects are killing me, guess that's what school is all about. Once I get that worked out, the only thing left will be to break it down into area code, prefix and suffix substrings textboxes. Getting there.
Private Sub Button1_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Button1.Validating<br />
<br />
If Phone.Text.Length = 12 Then<br />
MsgBox("You have entered a valid phone number")<br />
ElseIf Phone.Text.Length <> 0 Then<br />
Phone.Text = String.Empty<br />
Phone.BackColor = Color.Red<br />
e.Cancel = True<br />
Else<br />
Phone.Text = String.Empty<br />
Phone.BackColor = Color.Plum<br />
e.Cancel = False<br />
End If<br />
End Sub
Believe me guys, I am totally confused.
|
|
|
|
|
I've got MSDN integrated help installed with my copy of VS.net. The mouseover function descriptions work fine in C#, but don't even want to know in VB.
Where can i enable this feature so that mousovers in VB will display a description of the function / object, etc.
Cheers
Tris
|
|
|
|
|
It should be enabled by default. I don't know where it is, but you might want to check under Tools/Options/Environment.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well, i checked all these settings first. It was odd because it's enabled and works fine with C#. I'm not sure if it's a problem with VB, or VS.net?
Any more ideas? Is this a known issue? Or shouldn't it happen?
Cheers
Tris
|
|
|
|
|
I haven't heard of it happening. My next check would be the VS.NET installation log.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I was wondering if anyone knew how to create only one instance of an application. I have created a startup module to run my application but I would like to prevent the user from opening more than one instance of my application.
How would I approach this? Would I need to check for an existing process or form instance? Could someone point me in the right direction?
Any guidance would be much appreciated. Thanks.
|
|
|
|
|
Search the articles for "single instance" and you'll come up with a bunch of ideas. Results[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks Dave
|
|
|
|
|
I found an easy way of accomplishing this. In the startup module simply put:
If Process.GetProcessesByName(Process.GetCurrentProcess.ProcessName()).Length > 1 Then Exit Sub
|
|
|
|
|
I have a Tab Control on my form with 4 tabs
How can I via code, default back to tab 1 or how can I default to tab 1
Any ideas?
|
|
|
|
|
TabControl1.SelectedIndex = 0
Selects the first tab added to the control. The index is zero based, so tab page 1 would be index 0, tab page 2 would be index 1, ...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a text file that was generated from a report that is in a strange format. I need to be able to convert this to a text file that can be used to import into an access database. I have no idea how to go about this and a helping hand in terms of what functions to read up on or websites (please not mdsn or google) but a tutorial on how to do this would be great.
Here is an example of what i mean.
<br />
7/20/2005 8:14 AM A C C O U N T M A S T E R R E P O R T PAGE: 1<br />
ZONE: < All Zones > STATUS: ALL<br />
<br />
---ACCOUNT---- ------------NAME------------ CLASS -STATUS- -SERVICE / MAILING ADDRESS--<br />
------------------------------------------------------------------------------------------------------------------------------------<br />
01-0005-00 PHILLIPS & LUCKEY COM ACTIVE 555 blahstreet<br />
PO BOX 1417 Blah, TX 1234567, B009<br />
<br />
SERVICES: ==METERED==<br />
-SERVICE CODE- TBL ACT ----DESCRIPTION---- SCALE DIALS UNITS METER NO# LAST READ DATE LAST READING<br />
10-WATER 5 Y COMMERCIAL 1.000 7 1.00 56914331 6/05 0<br />
<br />
==NON METERED==<br />
-SERVICE CODE- TBL ACT ----DESCRIPTION----- STEP/QUAN ---AMOUNT--- ---TYPE---<br />
<br />
01-0010-00 ROCKDALE School COM INACTIVE 166 Hello Steet<br />
PO BOX 111 Blah, TX 765670632, B099<br />
<br />
SERVICES: ==METERED==<br />
-SERVICE CODE- TBL ACT ----DESCRIPTION---- SCALE DIALS UNITS METER NO# LAST READ DATE LAST READING<br />
10-WATER 5 Y COMMERCIAL 1.000 7 1.00 58456106 6/05 285<br />
<br />
==NON METERED==<br />
-SERVICE CODE- TBL ACT ----DESCRIPTION----- STEP/QUAN ---AMOUNT--- ---TYPE---<br />
40-SEWAGE 5 Y COMMERCIAL 00 0.00 DEPEND<br />
It needs to somehow be placed in a text file that access will understand (headers and field information). Any and all help would be appreciated on this. Thank you for your help.
Win32newb
"Programming is like sex, make one mistake and you have to support it for a long time"
|
|
|
|
|
win32newb wrote:
I have no idea how to go about this and a helping hand in terms of what functions to read up on or websites (please not mdsn or google) but a tutorial on how to do this would be great.
Well, there's the problem. There is no one tutorial to teach you how to do this. You have to read up on stuff like Reading/Writing Text Files, control-break processing, parsing strings, database creation, database access, and RegEx expressions might be helpful too. If you can find a single tutorial for all this, great! You're on your way.
But, chances are you're going to have to use Google to find multiple examples of each topic to get to know how to do each thing seperately. Then you'll have to figure out how each item will fit together to get an application that you want. This is the part that you won't find a tutorial on.
The hardest part of all this is reading a line then trying to figure out what kind of line you read. This can be minimized by closly examining your data and determining each each type of line contains so you can code some kind of recognition method. After you that, this method can then call an appropriate parser to actually get the data out of the line.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
no actually i want to minimise or maximise any application window by clicking on button
|
|
|
|
|
I'm assuming you wanted to minimize another applications window without clicking it that window's minimize button. You'd have to enumerate through all the windows, using FindWindow, EnumWindows, GetWindowText, until you found the window that you wanted. Then after getting the handle for that window you'd have to use SendMessage to post a WM_SIZE message with a SIZE_MINIMIZED parameter, I think.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello all
actualy i wanted to open a window like my computer & other operating system window inside the vb form.
as all window open on windows desktop
Mannoj
|
|
|
|
|
The short answer is, you can't do that.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In VB.Net how can I get a value masked e.g.
Putting a date into a text box and want to make sure the following format
dd/mm/yyyy
Showing in the text box would be __/__/____ and all the user does is put in the values 01/01/2005 and no other value.
Hope this makes sense?
|
|
|
|
|
Use the Masked Edit Control[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How to extract icon from exe file by vs.net 2005 beta 2?
In vb 6.0 , we could use API functon.
Now , how to do it?
Thanks!
|
|
|
|
|
The same way you do it in VB6. You just have to modify the code a bit to use the correct data types. For exmaple, a Long in VB6 is now in Integer in VB.NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
It seems the Windows API could not use in vs.net.
The .net project only accept .net of ocx components.
|
|
|
|
|
rushing wrote:
It seems the Windows API could not use in vs.net
Nothing could be further from the truth.
Perhaps if you posted the code you're using, a brief translation could be made?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In vb 6.0 , you could use these code:
Private Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long
total = ExtractIcon(App.hInstance, Me.CommonDialog1.FileName, -1)
For I = 0 To total - 1
p(I) = ExtractIcon(App.hInstance, Me.CommonDialog1.FileName, I)
Next I
For I = 0 To total - 1
DrawIcon Picture1.hdc, 34 * I, 0, p(I)
Next I
|
|
|
|