|
I'm suing Vb2005.
I looked to the Communication >> Hyper Terminal >> Connect to on PC , and found that it using the modem to call Phone number(not mobile). so I inserted the name of modem in the : mdPhone.Port , But didn't succeed.
Imports ATSMS
Dim mdPhone As New GSMModem
mdPhone.Port = "I entere the name of modem"
txtPhoneNumber.Text = mdPhone.MSISDN
Bu the way.the information of modems is from properties of pC
I'm using Modems and the port is COM3.
modified on Tuesday, December 16, 2008 12:16 AM
|
|
|
|
|
By "name of modem", did you mean the actual name of the modem, or COM3? Also, is anything else open that is already using that COM port, like HyperTerminal? Only one app can access the COM port at a time.
|
|
|
|
|
I tried both of them the the actual name of the modem and the com3
and I tried them with this code too, but didn't succeed.
Dim mdPhone As New Modem<br />
mdPhone.Port = " the actual name of the modem or Com3" <br />
txtPhoneNumber.Text = mdPhone.Port
|
|
|
|
|
I have no idea then. I haven't used the library you're using at all. Perhaps talking to the people who wrote it may help.
|
|
|
|
|
do you have another idea can help?
|
|
|
|
|
Just the obvious one, like use a different library.
|
|
|
|
|
|
That's what Google is for. I have no idea what libraries are out there because I haven't used a modem in over 10 years and I don't touch SMS.
|
|
|
|
|
Hi all,
I am developing Application using Visual basic 2005, and I have 8 window forms hidden when my application is opened and only one window form is active, I need to synchronize all the form whenever active form is maximized all other forms to be maximized , and similarly when size of the form is changed all the form size to be changed during run time. currently i am using the code as shown below.
Private Sub fmindro_ClientSizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.ClientSizeChanged
If max_flag = True Then
For i As Integer = 0 To My.Application.OpenForms.Count - 1
My.Application.OpenForms.Item(i).DesktopBounds = Me.DesktopBounds
My.Application.DoEvents()
Next i
End If
End Sub
Private Sub fmindro_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged
If max_flag = True Then
For i As Integer = 0 To My.Application.OpenForms.Count - 1
My.Application.OpenForms.Item(i).DesktopLocation = Me.DesktopLocation
My.Application.DoEvents()
Next i
End If
End Sub
But if i use this , i am not able to change the size and location of the window form if i switch to another form, and change the window state.
Please help me to set the bounds from any form which is active and reflect change in size and location to other forms when made active.
|
|
|
|
|
If they all live in the same spot, you only need one window. Rewrite your other windows so they are user controls all within the same window, and just swap which one is visible instead of swapping the visible forms.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi Christian,
I really new to VB 2005, can u send me sample program in VB 2005 for the above mentioned.
thank u for your kind reply
|
|
|
|
|
you can use this method but code will become big but it is easy.
Change the form length X width all form and assign the active form length X width as well as left and Top.
Use a global function for this u can reduce the length of coding....
|
|
|
|
|
If i use global function , it will reduce the code but the problem still remains, it works for maximize window state but when comes to window state normal its not working correctly.
can anybody give a perfect solution to the above mentioned problem ?
|
|
|
|
|
This code is work.
Private Sub frm1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
Call resize_win()
End Sub
Public Sub resize_win()
Form2.Width = Me.Width
Form2.Height = Me.Height
Form2.Left = Me.Left
Form2.Top = Me.Top
Form2.WindowState = Me.WindowState
Form3.Width = Me.Width
Form3.Height = Me.Height
Form3.Left = Me.Left
Form3.Top = Me.Top
Form3.WindowState = Me.WindowState
End Sub
|
|
|
|
|
Hi,
I tried with the above code, its works intermittently. sometimes it works some times its not...
whenever i try to maximize and make normal in another form, and go back to some other form the form changes its size to normal and again goes back to maximised state...
please help to solve this critical issues
|
|
|
|
|
Hello,
I need some serious help... for some reason, rather recently, any application I try to develop on my home PC will not launch. It doesn't launch out of debug mode (debug mode starts and ends almost instantly), it doesn't launch if I try to run the compiled .exe from Explorer, and worse yet, an application that I develop at work (where I don't have this problem) will no longer launch if I compile it on my home PC!
Even if I make a new application from scratch, just a blank form with no controls, that won't launch. I even tried Console.WriteLine("Some message") in the Form1 Load event and in the Application's Startup event and nothing gets written to the Output window. No error ever gets reported either.
I've already tried uninstalling VB.Net and reinstalling it, and that didn't help either. I've looked all over MSDN[^] and Google, and no one else seems to have this problem.
I don't know what else to do!
As I sit here, I contemplate the last words of Socrates: "I drank what?".
Pokémon Pearl Friend Code: 4554-2418-6836
|
|
|
|
|
What if you put some breakpoints in your application, and then run from visual studio ? If they never get hit, then I'd be uninstalling and reinstalling the .NET framework.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Well, I tried uninstalling and reinstalling the framework, as well as VB.Net. I even tried a system restore. Nothing has changed.
Now what?
EDIT: Hmm, now breakpoints in both the Form1 Load event and the Application's startup event are working, as is (apparently) any code I put in there. But beyond those two subs, nothing happens, and the form never appears on the screen.
What the heck.
As I sit here, I contemplate the last words of Socrates: "I drank what?".
Pokémon Pearl Friend Code: 4554-2418-6836
modified on Tuesday, December 16, 2008 11:47 PM
|
|
|
|
|
I'll try and give a brief description of what I am trying to do... Basically I have a string that extracted from a text file called strCombined... I want to look at that string and if it contains a certain phrase then I want to act on it... If not then perform a default action...
Now I can do this pretty easily using a nested if...then...else statement... That's long winded and messy though...
If strCombined.IndexOf("Cambridge University") Then
strSearchName = "Cambridge University"
Else
If strCombined.IndexOf("FM Towns") Then
strSearchName = "FM Towns"
Else
If strCombined.IndexOf("Jupiter Cantab") Then
strSearchName = "Jupiter Cantab"
Else
strSearchName = ""
End If
End If
End If
I was hoping to use some kind of select...case statement instead...
Select Case strCombined
Case strCombined.IndexOf("Cambridge University")
strSearchName = "Cambridge Univeristy"
Case strCombined.IndexOf("FM Towns")
strSearchName = "FM Towns"
Case strCombined.IndexOf("Jupiter Cantab")
strSearchName = "Jupiter Cantab"
Case Else
strSearchName = ""
End Select
This obviously is not working... I'm hoping someone here can help me to either get this working with a select...case statement or suggest some other alternative...
Thanks in advance
|
|
|
|
|
because you're hoping to do an operation in each step, you're doing a search and not just checking different cases, there's not really an alternative that I can see.
However, this is really messy. Do you intend to accept FM Towns but not FM towns or fm towns ? Do you also intend that if someone types in more than one of these terms, then the order in which they are typed will dictate which one is accepted ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks for the prompt reply...
I don't really care if the case doesn't match... So I'll accept any variation of FM Towns... Though it comes from a Datfile and not from a user input... So it should be pretty consistent from one version of the Datfile to the next...
I've coded it using the if...then...else statement and it works just fine... Just hoping to find a more elegant solution I suppose...
|
|
|
|
|
If you want to be case insensitive, create a new string by calling ToLower on the one you have, and then compare to all lower case strings. Or there's a case insensitive compare method, but I always do the lower case string, it's surely more efficient ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
If I can't find a neater alternative to nested if statements then I'll look into that option... Anything that is more efficient and helps speed up the process is more than welcome
|
|
|
|
|
Try a test on strSearchName.Length and an if statement
If strCombined.Length = 0 and strCombined.IndexOf("Cambridge University") Then<br />
strSearchName = "Cambridge University"<br />
end if<br />
If strCombined.Length = 0 and strCombined.IndexOf("xxxx") Then<br />
strSearchName = "xxxx"<br />
end if
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
How could a zero length string contain "Cambridge University"?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|