|
Try with windows registry methods such as
GetFromRegistry and SetRegistry so to retain the default values.
Sabarinathan T, India.
The interests are to know something about everything and everything about something...
|
|
|
|
|
Hi to all
if i type B in text box which is for qualification of user input then
it should write like B.COM or B.E.
Thanks & regards
Sonia.
|
|
|
|
|
Write it on textbox_textchanged() event
if text1.text="B" then
text1.text="B.E"
|
|
|
|
|
Hello every one
I have a vb.net application.
I wanted to export data to Excel from a DataViewGrid
I was able to do it by creating a stream an having vbTab between each data item
Now I want to set the Wrap Text property to True of the newly created file.
Is there any way I can do that?
Regards,
Nishkarsh
modified on Friday, February 8, 2008 5:50 AM
|
|
|
|
|
Hi,
I have a doubt whether is it possible to create an object on another Thread. I'll explain with an example:
<br />
<br />
Public Class GSM<br />
Private m_Port As SerialPort<br />
Public response As String<br />
<br />
Public Sub OpenPort(ByVal PortName As String)<br />
Try<br />
m_Port = My.Computer.Ports.OpenSerialPort(PortName, 115200, Ports.Parity.None, 8, Ports.StopBits.One)<br />
Catch ex As Exception<br />
'handle exeption<br />
End Try<br />
End Sub<br />
<br />
Public Sub ClosePort()<br />
m_Port.Close()<br />
End Sub<br />
<br />
Public Function IsOpen() As Boolean<br />
Return m_Port.IsOpen<br />
End Function<br />
<br />
Private Sub write(ByVal mText As String)<br />
m_Port.Write(mText)<br />
End Sub<br />
<br />
Private Sub Read()<br />
response = m_Port.ReadExisting<br />
End Sub<br />
<br />
End Class<br />
<br />
This is my object GSM and now I want to use it on with my form so :
<br />
Dim myGSM as GSM<br />
myGSM = New GSM<br />
myGSM.OpenPort("COM1")<br />
but if I want to use it in several parts of my code it will be a mess trying to launch it on seperates threads. So is there a way to tell visual that this object GSM is a seperate thread itself ... so I will only have to write MyGMS.write("blabla") from my form?
thank for the help ...
Splater
|
|
|
|
|
I think u can use a queue.
|
|
|
|
|
Dear Friends,
I am new to .net development. I wrote this code in vb.net and in .net 2.0 frame work, I used iTextSharper.dll to convert html to pdf, but after converting the .pdf file is not opening. when I tried to open .pdf file it showing the follwoing error message.
"Adobe Reader could not open text.pdf because it is either not a supported file type or because the file has correpted."
The code is as follows.
Try
Dim document As New Document()
PdfWriter.getInstance(document, New FileStream ("C:\html\sample.pdf", FileMode.Create))
'Dim handle As New ITextHandler(document)
Dim handle As New ITextmyHtmlHandler(document)
handle.Parse("C:\html\sample.xml")
Catch ex As System.Exception
Console.[Error].WriteLine(ex.Message)
Console.[Error].WriteLine(ex.StackTrace)
End Try
Thanks and Regards,
sudhakar venati,
Mob: 0 984 55 989 71.
|
|
|
|
|
Hi,
It sounds like the DLL is not properly creating the PDF file.
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" -ALbert Einstein
|
|
|
|
|
I am using Stored Procedure for viewing crystalreportviewer in vb.net
and i am passing 3 parameters to the stored procedure tooo.
but when ever i run the page its always asking the parameters.
Dim myReportDocument As CrystalDecisions.CrystalReports.Engine.ReportDocument
myReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument
myReportDocument.Load(ReportAddress & "InvoiceRenewal.rpt")
objCmd = New SqlCommand("sp_InvoiceRenewal", objIDB.OpenConnection)
objCmd.CommandType = CommandType.StoredProcedure
objCmd.Parameters.Add(New SqlParameter("@intID", SqlDbType.Int, 10))
objCmd.Parameters("@intID").Value = Request.QueryString("ID")
objCmd.Parameters.Add(New SqlParameter("@NoOfEachPlan", SqlDbType.Int, 10))
objCmd.Parameters("@NoOfEachPlan").Value = NoOfEachPlan
objCmd.Parameters.Add(New SqlParameter("@Names", SqlDbType.VarChar, 2000))
objCmd.Parameters("@Names").Value = names
objDa.SelectCommand = objCmd
objDa.Fill(objDs)
myReportDocument.SetDataSource(objDs)
CrystalReportViewer1.ReportSource = myReportDocument
CrystalReportViewer1.DataBind()
here @intID,@NoOfEachPlan,@Names are the 3 parameters tat am using in SP
but whenever i run the page its always asking for the parameters again
Parameter Field(s)
(THe format that comes when i run the page is as follows)
The report you requested requires further information.
@intID
Value (Here a text box will appear)
(Here a checkbox will appear ) No Value
@NoOfEachPlan
Value (Here a text box will appear)
(Here a checkbox will appear ) No Value
@Names
Value (Here a text box will appear)
(Here a checkbox will appear ) No Value
|
|
|
|
|
Hi Everyone,
I've got an FTP problem. I've been trying to make my own FTP program but it doesn't quite work and I'm not sure why.
Dim FileName As String = xmlFileName
Dim ftpServerIP = "202.62.33.220"
Dim fileInf As New FileInfo(FileName)
Dim uri As String = "ftp://" + ftpServerIP + "/" + fileInf.Name
Dim reqFTP As FtpWebRequest
' Create FtpWebRequest object from the Uri provided
reqFTP = DirectCast(FtpWebRequest.Create(New Uri("ftp://" + ftpServerIP + "/" + fileInf.Name)), FtpWebRequest)
MsgBox("ftp://" + ftpServerIP + "/" + fileInf.Name)
' Provide the WebPermission Credintials
reqFTP.Credentials = New NetworkCredential("MHR\administrator", "sbanks@#@")
' By default KeepAlive is true, where the control connection is not closed
' after a command is executed.
reqFTP.KeepAlive = False
' Specify the command to be executed.
reqFTP.Method = WebRequestMethods.Ftp.UploadFile
' Specify the data transfer type.
reqFTP.UseBinary = True
' Notify the server about the size of the uploaded file
reqFTP.ContentLength = fileInf.Length
' The buffer size is set to 2kb
Dim buffLength As Integer = 2048
Dim buff As Byte() = New Byte(buffLength - 1) {}
Dim contentLen As Integer
' Opens a file stream (System.IO.FileStream) to read the file to be uploaded
Dim fs As FileStream = fileInf.OpenRead()
'Try
' Stream to which the file to be upload is written
Dim strm As Stream = reqFTP.GetRequestStream()
' Read from the file stream 2kb at a time
contentLen = fs.Read(buff, 0, buffLength)
' Till Stream content ends
While contentLen <> 0
' Write Content from the file stream to the FTP Upload Stream
******strm.Write(buff, 0, contentLen)*********
contentLen = fs.Read(buff, 0, buffLength)
End While
' Close the file stream and the Request Stream
strm.Close()
fs.Close()
'Catch ex As Exception
'MsgBox(ex.Message, "Upload Error")
'End Try
Where all the stars are is where the error occurs. The error message is this: (421) Service not available, closing control connection.
Does anyone have any ideas? I was thinking it was something to do with no port declaration but I'm try to find out how to declare one to see if that fixes the problem.
All your help is muchly appreciated in advance.
Cheers.
Michael
|
|
|
|
|
Hm, code looks correct on a quick view. Since you provided user/pass for that ftp server i tried a connection and got:
E:\WINDOWS>ftp
ftp> open 202.62.33.220
Verbindung mit 202.62.33.220 wurde hergestellt.
Verbindung beendet durch Remotehost. ("Connection terminated by remote host")
Connection with an ftp client(ultrafxp):
Network subsystem is unusable
Seems to be a server issue, try your code on another server to see if code is working :p
|
|
|
|
|
hi guys
i have a class library project named jdl, in this project i have a class named Constants,
i have a public constant readonly string in this class whic is assigned the value of "NY"
now i am facing a probelem it is not giving me the currnet value , it is giving me a previous value which i assigned to this variable so other time , why is that ?
i have unloaded and loaded the project, i also have created an other project and in this project i referenced to this project but the problem still persists.
any hint , solution , thanks in advance
hello
|
|
|
|
|
As it's a constant, the value is copied into the code that uses it when it's compiled. You have to recompile the code that uses it for the change to take effect.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
ok
i am facing a problem , thre is no debug, release folders under bin folder of my project,
exe is created under bin folder and all other referenced assemblies are also in the bin folder ,
why ?
thanks in advance
hello
|
|
|
|
|
ghumman63 wrote: thre is no debug, release folders under bin folder of my project,
exe is created under bin folder
There doesn't have to be any. The build settings for the solution configuration contains the output path, which you can change to anything you like.
ghumman63 wrote: and all other referenced assemblies are also in the bin folder
Each reference has a setting whether it should be copied to the output path or not. Framework references and GAC references are not copied, other references (files and projects) are.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
I am a new to the world of VB.Net and programming in general. I am attempting to add a very basic undo / redo feature to a paint type application that uses a shape (line, box, circle, etc) collection object. I am lost as to how to implement this feature. Can anyone provide some basic ideas? Thank you.
Nosiller
|
|
|
|
|
Do a google search on: "VB.Net"+Undo+Redo
may your code be error free.
(okay, maybe two lines.)
|
|
|
|
|
What you're looking for is writing your own implementation of the Command pattern[^].
|
|
|
|
|
We are integrating different systems into one solution, each system is consisting of one project and we are using source safe to maintain our codes. we are having problems in downloading one project for each programmer, how can we distribute each project without downloading the whole solution.
for example, we have 2 programmers and 2 dependency projects, let's say programmer A and programmer B, project A and project B, respectively. Those projects are dependencies of project C. We are avoiding each programmer to download both project A and B.
modified on Thursday, February 7, 2008 10:10 PM
|
|
|
|
|
I have a problem on how to distribute different projects to our programmers using visual sourcesafe. Our IDE is visual studio 2k5.
Can you help me, please...
|
|
|
|
|
I am trying to read a list of PointPairList points and put them into an array. I want to perform some math functions on the list of points. Also I am only going to want the y points in the list. Wonder if that is possible? The y points are values and the x points are just points for time.
|
|
|
|
|
You' going to have to use the forums[^] for Zed Graph for this question. What you're asking has nothing to do with the .NET Framework or VB.NET.
|
|
|
|
|
I'm writing a small app in Access using VB. I need to loop through all of the control names in the form and then delete the one in which the control name is "Title", and which is a label.
'Suppose all declarations are already made'
For Each ctl In frm.Controls<br />
If ctl.ControlType = acLabel Then<br />
If ctl.name = "Title" Then<br />
ctl.?????? - removing/deleting step<br />
End If<br />
End If<br />
Next ctl
I don't know how to actually delete the controls. I can ADD controls and EDIT them OK, but deleting them is misleading me. Any ideas? Thanks.
|
|
|
|
|
reegan41 wrote: I'm writing a small app in Access using VB.
That's not VB. It's Access VBA.
Try posting your question in the SQL forum.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Actually, I've seen VBA questions here before. VBA is more VB than it is SQL, I'd say the problem is that we really don't have a 'right' forum for this question.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|