|
1) What do you mean by a "VB.NET file"?
2) A group box has a frame.
3) Do you mean a library? Create a Class Library project.
---
b { font-weight: normal; }
|
|
|
|
|
1 - a ASP.NET page IS a VB.NET or C# file. But you can add code files as well, either in dlls, or ( in .NET 2.0 ) to a special folder where they will be compiled as needed.
2 - A panel has a background
3 - By creating a dll project.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi
I have designed an application to send SMS via GSM Modem in vb6.0 using MSCOMM control. Used At commands to send the SMS.
The modem replies me with "OK" message for the common settings At commands ( AT + CMGF = 0 ), but getting the reply as "Error" for the At command (At + CMGS ) which is used to send the SMS.
Please help me out to solve this problem.
I used the following code in my application.
For SENDING SMS
MSComm1.CommPort = 3 (GSM modem is connected on the Port 3)
MSComm1.PortOpen = True
MSComm1.Settings = "115200, n, 8, 1"
' Send an 'AT' command to the phone ----> chr(13) -> carriage return
MSComm1.Output = "AT" & Chr$(13)
'strData$ = MSComm1.Output
' The phone will respond with an 'OK'
timedPause 8
' Set up the phone for a text message
'Do
DoEvents
MSComm1.Output = "AT+CMGF=0" & Chr$(13)
buffer$ = MSComm1.Input
MsgBox buffer$
'Loop Until InStr(buffer$, "OK")
buffer$ = ""
' The phone will respond with an 'OK'
timedPause 8
' Chr(34) --> Double Quotation
'Do
DoEvents
MSComm1.Output = "AT+CMGS= " & Chr(34) & txtDestinationNumber.Text & Chr(34) & Chr$(13) & Chr(10)
MSComm1.Output = txtDataToTransmit.Text & Chr$(26)
buffer$ = MSComm1.Input
MsgBox buffer$
'Loop Until InStr(buffer$, ">")
If buffer$ <> ">" Then
MsgBox "Sending Failed"
MSComm1.PortOpen = False
Exit Sub
End If
buffer$ = ""
MsgBox "SMS Sent"
MSComm1.PortOpen = False
Thanks in advance.
With Love,
Sathish
|
|
|
|
|
hi,
Hope this code solves your problem.
it works in my application.
it sends sms to destination mobile.
MSComm1.Output = "at+cmgf=1" & Chr(34)
do
strbuffer=strbuffer+ MSComm1.Input
while(!instr(strbuffer,0,"OK"))
MSComm1.Output = "at+cmgs=+91323232323" & Chr(34)
strBuffer = strBuffer + MSComm1.Input
MSComm1.Output ="your message" & vbnewline
do
strBuffer = strBuffer + MSComm1.Input
while(!instr(strbuffer,0,"OK"))
hope this works.
Nitin...
Nitin.
|
|
|
|
|
can u make an sample of this and send me to e-mail please.
|
|
|
|
|
|
What does your code look like?
|
|
|
|
|
Can someone help me with the following:
1- I have xml text data that i need to take out invalid characters from.
2- this data contains extraneous characters that i need removed in order to use xmlDocument.LoadXml(str)
3- when this characters are in the str variable i get an XmlException that indicates that there's an invalid character with hex value of 0x0B.
4- how can i remove that character from the string prior to loading it in with xmlDocument.LoadXml(str) ?
5- i am using VS2005
Your help is greatly appreciated....
-- modified at 23:11 Thursday 17th August, 2006
|
|
|
|
|
The string class has a replace method, you would generally call that to remove anything you didn't want in there.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
1- I see.
2- I see.
3- I see.
4- You can use the Replace method of the string class.
5- Good for you.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks to Christian and Guffa.
Below is the solution I was able to come up with...
Public Structure HexReplacement
Public HexCharacter As Char
Public Replacement As String
End Structure
Public Shared Function ConvertHexToChar(ByVal hexValue As String) As Char
Dim convertedChar As Char = Nothing
Try
convertedChar = Chr(Int32.Parse(hexValue, Globalization.NumberStyles.HexNumber))
Catch ex As FormatException
' Error handling here....
Catch ex As ArgumentException
' Error handling here....
End Try
Return convertedChar
End Function
Public Function CleanOutHexValues(ByVal dirtyString As String, ByVal hexReplacements As HexReplacement()) As String
Dim cleanString As String = dirtyString
For Each hr As HexReplacement In hexReplacements
cleanString = cleanString.Replace(hr.HexCharacter, hr.Replacement)
Next
Return cleanString
End Function
Public Sub TestHexCharCleanUp()
Dim hr(1) As HexReplacement
hr(0).HexCharacter = ConvertHexToChar("0b") ' "0b" = or single space.
hr(0).Replacement = ""
Dim dirtyString As String = "Testing the removal of "
MsgBox(CleanOutHexValues(dirtyString, hr))
End Sub
Comments will be greatly appreciated.
|
|
|
|
|
Been playing around with the progressbar, just trying to figure it out. Got it running for the most part but here's where it gets weird.
On my laptop I changed the ForeColor to red and it ran in red. When I port the same project over to my main machine & run it, the progressbar forecolor is not red it's the default green color. I checked my properties & it's still showing red as my forecolor. I tried changing it in code, same thing. Both my laptop are main machine are running XP Pro w/SP2 installed. This is VS 2005 .Net btw.
Any ideas, thoughts on why this won't change colors when I run it?
Thanks!
|
|
|
|
|
-John-
I have had this problem before when working with a progress bar, but my program also changed the buttons. In my case it was the theme that I had set on the computer overrode the setting that I had in VB. This may not be the case in your situation but it is worth a try to change the theme on your computer and see if this changes the progress bar in your app. If this is the case I am not exactly sure how you can fix it but there is a setting in VB under Project and properties on the application tab where you can check "Enable XP visual styles". Unchecking this may fix the prob.
-Erik-
|
|
|
|
|
That was it! Thanks much! I switched to a Windows Classic theme & ran it. Ran perfect. Then used your suggestion of making the change under my IDE. That too fixed my issue.
Thanks again for your advice!
|
|
|
|
|
Wonder if anybody can point me in the right direction? I'm wondering what I'm doing wrong.
I have a parent and child form. On the parent form, I have a CustomerID field - which is a CustomerID field in my tblCustomersParent table my Access database. I have a similar field in tblCustomersChild to create the relationship, and a field on the child form to display it.
This CustomerID field is passed to the child form using:
Me.frmCustomerContacts = New CustomerContacts<br />
frmCustomerContacts.ValueFromParent = Me.CustomerID.Text<br />
frmCustomerContacts.ShowDialog()
The customer ID is then copied to the child form using:
Public WriteOnly Property ValueFromParent() As String<br />
Set(ByVal Value as String)<br />
Me.CustomerID.Text = Value<br />
End Set<br />
End Property
This works well except for when tblCustomersChild does not have an existing entry for that CustomerID. For example, if I create a new customer (or even if I have an existing customer entry in tblCustomersParent), and then wish to add contacts for that customer, the CustomerID field on the child form does not get populated because tblCustomersChild does not have any corresponding entries already recorded. I can enter a record in Access to make it work, and it does carry that CustomerID through from parent to child, and I can add new contact records to the child form.
I am using a standard SELECT statement to collect the data for the child form based on what the CustomerID field is on the parent form.
I'm using VB.NET 2003.
|
|
|
|
|
Try declaring the id variable as public so the child form can access it.
|
|
|
|
|
Why not just pass in the value to the constructor of the form:
Me.frmCustomerContacts = New CustomerContacts(Me.CustomerID.Text)
On the chidl form, have a read-only property:
Private _customerID As String
Public ReadOnly Property CustomerID as String
Get
Return _customerID
End Get
End Property
Modify the constructor of the child form:
Public Sub New(ByVal CustomerID As String)
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
_customerID = CustomerID
End Sub
|
|
|
|
|
Is it possible to make an form in wich you type a text in textbox and wen press find it that it searches google for the PICTURES with my string from textbox? and when found all the pictures by that string if i chose picture exsample "Picture 6" that google found that it downloads to some folder and then use it with my program.
Please help... If we finish that program it will be usefull to all of you.
Thx.
|
|
|
|
|
You can do some searches with google and work out how to form a google URL. To put images back out will be a little more complex.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian thx for anny help... i am searching all the net for this, the google, the pgodak, the msdn and everiwhere but not easy... Now i go sleep i cant do annymore. I am tierd.
Well thx man.
|
|
|
|
|
|
Thx mubashir i hope that will help me.
|
|
|
|
|
hi,
strURL="http://images.google.co.in/images?q=" + textbox1.text + "&hl=en"
redirect to this in your find button.
hope this works.
Nitin...
|
|
|
|
|
Thx man it works buth is it possible that it shows only pictures not the whole site? how to do that?
|
|
|
|
|
I am selecting and inserting large amounts of data into a SQL database and I would like to inform the user of the progress. How do i do this using a progress bar or something similar.
|
|
|
|