|
Hi all,
I have used Windows API function : FindWindow(), now I want to use the VB.NET (Framework 2.0) function not the Win API function.
Thanks in advance,
Hung.
Hung
|
|
|
|
|
Can anybody please tell me how to export crystal report in PDF format from VB.
|
|
|
|
|
Can I have multithreaded programming in VB and How can objects on different threads communicate with one another?
|
|
|
|
|
in vb6 no you cannot. some body told me you can use doevents in vb but it is very limited and I have not explored much what does it do. so check it out . in vb.net there are many samples available on net. go to articles in codeproject and search threading you will found your answer.
Rizwan Bashir
|
|
|
|
|
I take it your talking about VB.NET.
It can be done using delegates. I dont have time to give you an example but there should be loads of information if you google. You can probably find some info in the articles here as well.
Jon
|
|
|
|
|
hi ,
i am building a report in CR , that have duplicate records !
i use the distinct in my SQL Statment , and i still get the duplicate records , is there a soulotion for this problem ? , can anyone help ?
thxx
|
|
|
|
|
in the crystal report you have one options saying distinct record. open the crystal report help and search it you will found exactly where you have to check the checkbox to get distinct records. I cannot tell as I worked on crystal around 3 years back last time.
Rizwan Bashir
|
|
|
|
|
that's great thank u i know how to use the distinct , i go to the report ,
DataBase-->Log on/off Service --> Options --> i i click the -V- on Distinct , the problem is that it is not working ! , i can even see the distinct in the sql statment ! , but it is not working !
help please ,,
|
|
|
|
|
there could be some reason why records are duplicating.. may be any id is different between two records. ok tell me if you directly place that query in query analyzer then does it display fine or duplicated. if duplicate records then fix the query over there. and after that it will work fine in crystal. as if database is returning the duplicate records then crystal will do nothing. because on checking the distinct in crystal, it just put the distinct in the query.
Best Regards
Rizwan Bashir
|
|
|
|
|
hellow ,
thank you Rizwan , i think the problem is from my database , not from the query , if u know anyway that can remove duplicating records , tell me , thank you ..
|
|
|
|
|
Hi all,,
I am trying to make a vb.net socket that allow user to upload image files from clients machines to server machine. i searched the net and i found the following code samples.
Code for Server:-
Const portNo As Integer = 500
Dim localAdd As System.Net.IPAddress = _
IPAddress.Parse("127.0.0.1")
Dim listener As New TcpListener(localAdd, portNo)
listener.Start()
Console.WriteLine("Listening...")
Dim tcpClient As TcpClient = listener.AcceptTcpClient()
Dim NWStream As NetworkStream = tcpClient.GetStream
Dim bytesToRead(tcpClient.ReceiveBufferSize) As Byte
'---read incoming stream
Dim numBytesRead As Integer = NWStream.Read(bytesToRead, _
0, CInt(tcpClient.ReceiveBufferSize))
'---write the bytes to file
Const FILE_NAME = "c:\image.gif"
Dim fs As System.IO.FileStream
fs = New FileStream(FILE_NAME, FileMode.CreateNew, _
FileAccess.Write)
fs.Write(bytesToRead, 0, numBytesRead)
fs.Close()
tcpClient.Close()
listener.Stop()
Console.ReadLine()
Code for Client:-
Const portNo = 500
Const FILE_NAME = "c:\ondotnet_logo.gif"
Dim tcpClient As New System.Net.Sockets.TcpClient
tcpClient.Connect("127.0.0.1", portNo)
Dim NWStream As NetworkStream = tcpclient.GetStream
Dim bytesToSend(tcpClient.ReceiveBufferSize) As Byte
Dim fs As FileStream
fs = New FileStream(FILE_NAME, FileMode.Open, _
FileAccess.Read)
Dim numBytesRead As Integer = fs.Read(bytesToSend, _
0, bytesToSend.Length)
fs.Close()
'---send the text
Console.WriteLine("Sending ...")
NWStream.Write(bytesToSend, 0, numBytesRead)
Console.ReadLine()
tcpclient.Close()
I tried the code and it worked succesfully..but i noticed that the new file image.gif will be corrupted if the original one has size larger than 8192 bytes!!
1- i don't know how to make it works for larger files!!!
2- i need it to be work if multiple users upload file at the same time!!!
i am new in sockets programming , so any comment will be very helpful
thanks
shelal
shelal
-- modified at 3:25 Thursday 18th May, 2006
|
|
|
|
|
please while i am reading from txt file
i faced some problems please help
dim i as io.streamfile
dim t as io.file
i=t.open("c:")
while t.read
listview.add(t.readline)
end while
the code is similar to this
but the problem is when he type any row he missed the first char so that this is wrong
please help me how can i solve this problem as type all of the string
when i try to print "amarni"he types "marni"
Amarni
|
|
|
|
|
Amarni wrote: io.streamfile
Does not exist.
Amarni wrote: the code is similar to this
You should always post the actual code - It makes it much more difficult for people to help you when you post "similar" code.
Amarni wrote: the problem is when he type any row he missed the first char so that this is wrong
The While t.Read is likely wrong but since it does not match any valid method signature on FileStream (which is what I can only assume you meant my streamfile above) I can't tell. You should always post the actual code you are using.
Also FileStream does not have a ReadLine method so this code should not even compile. You should always post the actual code you are using.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
so that tell me the code that i could read from txt file
Amarni
|
|
|
|
|
Post YOUR code so we can see what the problem is.
If you don't do this then we cannot help you.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
then what should i do
Amarni
|
|
|
|
|
After you've posted your code, you sit back and wait for somebody to (hopefully) reply.
This is pretty simple.
1) Copy the code you have written by highlighting it and pressing Ctrl+C
2) Paste it into a reply using Ctrl+V
3) Sit back and wait (Could be anywhere between 1 second and 1 year)
4) Read reply
5) Thank respondant
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
-- modified at 5:00 Thursday 18th May, 2006
|
|
|
|
|
Well you could go for a walk, wash the dog, polish the dolphin, have a good meal, or perhaps post your code?
Maybe - just maybe - someone will then look at it and see where you need to modify the code so it will work. Posting nothing will get you the same in return.
Since you are a newbie, you may not realize that the forum members are not blessed with telepathy so do yourself and us a favour - provide sufficient information for us to help.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Best Regards,
Apurva Kaushal
|
|
|
|
|
Can any body please tell me difference in early and late binding (in VB6) along with example or link.
|
|
|
|
|
Basically: with early binding the compiler knows the type of object at compile time. With late binding, the type of object is only known at runtime.
There are cases for using one or the other but my preference would be for early binding where possible because many problems and type-related issues can be sorted out during development. If you late bind, some problems may not be evident until your application is live!
There are many samples of this on the web - including The Code Project. Simply search for them.
In the meantime, very brief samples are shown below...
' Early Binding
' Compiler knows what type x is.
Dim x As Word.Application
Set x = New Word.Application
' Late Binding:
' Only know what type x is at runtime.
Dim x As Object
Set x = CreateObject("Word.Application")
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
In addition to what Steve said, I should add that early-binding is much much faster than late-binding and is the only case to select (unless you HAVE TO use late-binding) for example when you don't have compile-time access to the COM...
|
|
|
|
|
I ve added skin in my dotnetnuke project it is uploading correctly but when i want to view that in my site under portal sin and admin skin i am not able to see it.
I need urgent help.
aashutosh tiwari(aashutosh.tiwari@sakasolutions.com)
|
|
|
|
|
I have the below source code:
<webservice(namespace:="http: tempuri.org="" ")=""> _
<webservicebinding(conformsto:=wsiprofiles.basicprofile1_1)> _
<global.microsoft.visualbasic.compilerservices.designergenerated()> _
<policy("servicepolicy")> _ '(or <policy(gettype(usernamepolicy))> _ )
Public Class Service
Inherits System.Web.Services.WebService
<webmethod()> _
Public Function test1() As String
Return "Test1 Function Called"
End Function
<webmethod()> _
Public Function test2() As String
Return "Test2 Function Called"
End Function
End Class 'Service
Now I want to do 2 things:
1. The policy will be only applied for test1 Function, not Function test2()
( some things like that:
<webservice(namespace:="http: tempuri.org="" ")=""> _
<webservicebinding(conformsto:=wsiprofiles.basicprofile1_1)> _
<global.microsoft.visualbasic.compilerservices.designergenerated()> _
Public Class Service
Inherits System.Web.Services.WebService
'The policy will be applied for test1 function
<policy("servicepolicy")> _
<webmethod()> _
Public Function test1() As String
Return "Test1 Function Called"
End Function
'and the policy will not be applied for test2 function
<webmethod()> _
Public Function test2() As String
Return "Test2 Function Called"
End Function
)
2. By using an application the Admin can configure what policy will apply on the web service without rebuild (recompile) the web service.
( The service is deployed on IIS server, and then the admin will use another application to configure that web service)
Thanks in advance!
Hung.
Hung
|
|
|
|
|
I'm a senior student. I'm making graduation report so I need your help!
I have MDI application with MainMenu on FormMain. When runtime i opened a childform,i do something on it and i want to control(enable/disable) some of MenuItem on MainMenu. This is my code:
//////Module/////
Module class......
public sub ControlMenu(Byval mnu as system.windows.forms.form.MenuItem,Byval bool as boolean)
mnu.enable=bool
end sub
........
End class
////////FormMain////
Class FormMain
..declare some var
...
private child as ChildForm
.....
//event MenuItem childform.click()
private sub childform_click(byval sender as object, byval e as ...)Handle childform.click
child =new childform
child.MdiParent=Me
child.show()
end sub
....
End Class
/////ChildForm//////
Class ChildForm
..do something
//set a MenuItem
Me.parent.ControlMenu(NameOfmnuItem,fasle)
//Close child form
Me.close (or Me.hide)
End Class
But I get an error or ControlMenu not declare this show up whenever i move mouse on Me.parent.ControlMenu(NameOfmnuItem,fasle). Everybody help me Plz. Thanks
|
|
|
|