|
Hi,
This is the Solution ive got.
Dim obj As Object<br />
Dim wObj As New System.UriTypeConverter<br />
obj = "http://10.130.18.40/order445.pdf"<br />
'wBrowseObj its a Webbrowser in VB.net<br />
wBrowseObj.Navigate(wObj.ConvertFromString(obj))
Sorry for the delayed reply..............
Regards,
Bala
|
|
|
|
|
|
i have a problem in load sub report's data, the field become not consecutive
i am using this code "ReportFile.Subreports(strSubRepName).SetDataSource(dtDataSubRep)"
is there anything wrong with that??
i have try it in usual report ( not sub report ), and that is ok, but if in sub report,
it become problem, please help, thanks
|
|
|
|
|
Sorry for double posting please
my directx video object doesnt display in its owner
the owner is a picturebox
please how do i go about it?
thanks
phatkin
|
|
|
|
|
I guess posting some code would be a good start.
I also have an article on all the reasons that that namespace sucks, you should read it
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
give the owner of a video object
vdio=new video.fromFile("location")
vdio.owner=sampicturebox
vdio.play()
this is my little code
actually the video has shown before but dont know why its not
showing now
phatkin
phatkin
|
|
|
|
|
OK, that's how it works. Have you considered using the Windows Media Player control instead ? That is just plain better.
Odds are you've just made a silly mistake ( like the control is not visible ), but I'd really suggest WMP is better, overall.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thanks MVP, but i wld like to knopw if under nomral circumstance,
the video should display in its owner
does theh screen resolution matter or any other setting>
Please
phatkin
|
|
|
|
|
Hi
I am kinda new to vb.net and I am having problems with code that works when it suits it. The code is meant to check if data has been entered into the text boxes. For some unknown reason it works on one form but the same code copied and pasted does not work on a different form.
this the code.
'This checks the textboxes to see if the data entered is correct
Dim ctrlx As Control
For Each ctrlx In Controls
If TypeOf ctrlx Is TextBox Then
If ctrlx.Text = "" Then
ctrlx.Focus()
MessageBox.Show("Please enter the required data", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Exit Sub
End If
End If
Next
I hope u will be able to help me,
twsted f8
|
|
|
|
|
twsted f8 wrote: it works on one form but the same code copied and pasted does not work on a different form
What is not working? Be a little more descriptive.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi Paul
The code is meant to check all the text boxes on a form. If a blank field is found the user a msgbox is displayed asking the user to enter the required information. Similarly the code can also be used to check each text box to see if the data entered is of the correct type.
On the first form code identifies all the textboxes that have been left blank. On the 2nd form this same code does not work. When I click the button, nothing happens, the blank textboxes are not identified and no error messagebox is displayed, of which when I do the same thing on the first form the program is able to pick up all the blank fields.
|
|
|
|
|
Is this code being called in both forms ? Do you have breakpoints so you can see what is going on ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Like Christian said, is it being called by both? Have you tied in any event procedures to call it?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
twsted f8 wrote: I am having problems with code that works when it suits it.
This is almost certainly not true.
Most likely, on one form you have an event set up to call this method, and on the other, you do not.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
Do you host your textboxes into sub-containers (e.g. Groupbox, Panel, ...) If yes, then you must iterate over the controls of sub-containers.
Hope this helps
|
|
|
|
|
Hi
Thanks for helping. I do have a group box on the form. I still got a bit of a qn? What do u mean by iterate over the controls of the form, How could I go about this?
Thanks again.
twsted f8
|
|
|
|
|
i check what u have written is also not working
what i will give u this is the correct coding
copy it
Dim ctrl As Control
For Each ctrl In Me.Controls
If TypeOf ctrl Is TextBox Then
ctrl.Text = ""
End If
Next
|
|
|
|
|
Hi
I am kinda new to vb.net and I am having problems with code that works when it suits it. The code is meant to check if data has been entered into the text boxes. For some unknown reason it works on one form but the same code copied and pasted does not work on a different form.
this the code.
'This checks the textboxes to see if the data entered is correct
Dim ctrlx As Control
For Each ctrlx In Controls
If TypeOf ctrlx Is TextBox Then
If ctrlx.Text = "" Then
ctrlx.Focus()
MessageBox.Show("Please enter the required data", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Exit Sub
End If
End If
Next
I hope u will be able to help me,
twsted f8
|
|
|
|
|
Don't post the same message twice.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
You cannot compare the type of control with TextBox Class. The control has to be compared with the type of TextBox.
Possibly the the code snippet will resolve your issue
For Each ctrl As Control In Me.Controls
If ctrl.GetType() Is GetType(TextBox) Then
If ctrl.Text="" Then
MessageBox.Show("Message",MessageBoxButtons.OK,MessageBoxIcon.Exclamation)
ctrl.Focus()
End IF
End If
Next
Santosh Metal
|
|
|
|
|
hello i am new in vb.net
and i am doing phone direcroty application, so in this application input is users name, middle name, surname,home phone,mobile,email,houseno, add,town,postcode,counrty etc and i have used all this as string variable
and code is like this
Option Explicit On <br />
Option Strict On<br />
Public Class frmPhone<br />
Inherits System.Windows.Forms.Form<br />
<br />
'Globle variables<br />
Dim FileNumber, Position As Integer, FileName As String<br />
Dim MyFile As String = "phonelist.txt"<br />
<br />
'create record type the name of record is PhoneList<br />
Structure PhoneList<br />
Dim Inits As String<br />
Dim Gender As String<br />
<VBFixedString(20)> Dim FName As String<br />
<VBFixedString(20)> Dim SName As String<br />
<VBFixedArray(2)> Dim MName As String<br />
<VBFixedArray(20)> Dim HomePhone As String<br />
<VBFixedArray(20)> Dim Mobile As String<br />
<VBFixedArray(30)> Dim Email As String<br />
<VBFixedArray(5)> Dim HouseNo As String<br />
<VBFixedArray(20)> Dim FLine As String<br />
<VBFixedArray(20)> Dim SLine As String<br />
<VBFixedArray(20)> Dim Town As String<br />
<VBFixedArray(10)> Dim PostCode As String<br />
<VBFixedArray(15)> Dim Country As String<br />
End Structure<br />
'Function to use last record<br />
Private Function FindLastRecordNo() As Integer<br />
Dim Temp As PhoneList, FileNum As Integer<br />
FileNum = FreeFile() 'Free file number<br />
FileOpen(FileNum, MyFile, OpenMode.Random, , , Len(Temp))<br />
FindLastRecordNo = 1<br />
Do While Not EOF(FileNum) 'EOF() function is using to detect the end of file<br />
Dim vt As ValueType = Temp<br />
FileGet(FileNum, vt, ) 'Get file file function is using to get record from random file<br />
Temp = CType(vt, PhoneList)<br />
FindLastRecordNo = FindLastRecordNo + 1<br />
Loop<br />
FileClose(FileNum)<br />
End Function<br />
<br />
<br />
Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click<br />
Dim Response As DialogResult<br />
Dim PhoneBook As PhoneList, LastRecord, I As Integer<br />
txtName.Text = StrConv(txtName.Text, VbStrConv.ProperCase)<br />
txtMiddle.Text = StrConv(txtMiddle.Text, VbStrConv.ProperCase)<br />
txtSurname.Text = StrConv(txtSurname.Text, VbStrConv.ProperCase)<br />
txtFirstLine.Text = StrConv(txtFirstLine.Text, VbStrConv.ProperCase)<br />
txtSecondLine.Text = StrConv(txtSecondLine.Text, VbStrConv.ProperCase)<br />
txtTown.Text = StrConv(txtTown.Text, VbStrConv.ProperCase)<br />
txtPostCode.Text = StrConv(txtPostCode.Text, VbStrConv.UpperCase)<br />
LastRecord = FindLastRecordNo() 'call last record function <br />
'Check if all three text boxes in tabpage add is not blank<br />
FileNumber = FreeFile()<br />
FileOpen(FileNumber, MyFile, OpenMode.Random, , , Len(PhoneBook))<br />
PhoneBook.Inits = cboInits.Text<br />
PhoneBook.Gender = cboGender.Text<br />
PhoneBook.FName = txtName.Text<br />
PhoneBook.MName = txtMiddle.Text<br />
PhoneBook.SName = txtSurname.Text<br />
PhoneBook.HomePhone = CStr(Val(txtHome.Text))<br />
PhoneBook.Mobile = CStr(Val(txtMobile.Text))<br />
PhoneBook.Email = CStr(Val(txtEmail.Text))<br />
PhoneBook.HouseNo = CStr(Val(txtHouse.Text))<br />
PhoneBook.FLine = txtFirstLine.Text<br />
PhoneBook.SLine = txtSecondLine.Text<br />
PhoneBook.Town = txtTown.Text<br />
PhoneBook.PostCode = txtPostCode.Text<br />
PhoneBook.Country = cboCountry.Text<br />
FilePut(FileNumber, PhoneBook, LastRecord)<br />
FileClose(FileNumber)<br />
MessageBox.Show("Item successfuly Saved", "Item Saved", MessageBoxButtons.OK, MessageBoxIcon.Information)<br />
End Sub<br />
End Class
but it's shows error that bad record length i have debug program several times but i can not understand what to do, in local windows it's shows few information like name, middle name,surname,home phone,mobile but rest is nothing but how can i solve this problem
can any body help me with this
waiting for your kind rep.
-- modified at 14:49 Sunday 16th September, 2007
|
|
|
|
|
Please only post the part of the code that is having trouble. You posted more than necessary.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hello sir
thanks for your rep.
i have modifid the code
so can you please tell me how to solve this problem
waiting for your kind rep.
thanks
|
|
|
|
|
What on earth are FileOpen, FilePut, etc ? Nasty VB6 legacy methods, or methods you wrote ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: FileOpen, FilePut, etc ? Nasty VB6 legacy methods
I vaguely remember seeing something hideous like that in the early VB days.
"Try asking what you want to know, rather than asking a question whose answer you know." - Christian Graus
|
|
|
|