|
hi
this might work
try setting the border style property of child form to none.
Computer... Programming... What That
|
|
|
|
|
Hmmm... it does work. I fail to see what good it is though...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello folks...
Here am i again with part 2 of the serialization problem over sockets:
GAC and adding assemblies...
Well, after a few hours of searching and debugging i found out this much:
Apparently i need to add an assembly of my server code in the Listener code...
This has to do something with a shell tool called
GACutil.exe
I printed msdn help on it but it still confuses me terribly!!!!!!
Can some of you "supercodeguru's" tell me what Global Access Assembly is
and how i can add my server assembly to the listener project??
Many many thanx in advance!!
If you make something idiotproof, someone else will make a better idiot.....
|
|
|
|
|
Hi. I am doing one small application in VB.NET
I am doing "LAN messenger" using concept of "net send"
In this, I created one Form, on which 2 text boxes & 1 button.
1 text box is for typing messege & other for receiving messege.
I can send messege properly. Receiver is gettting that messege
But receiver can see that messege in one small window with "OK"
button, (as usual when we send msg using "net send")
NOw I have to access that messege & display it in text box which I created on form.
So how can I access that messege?
I am using following code for sending messege.........
shell (net send & computer_name & textbox1.text )
|
|
|
|
|
u need to capture the stdout
help on how to to this is simple:
type "capture stdout vb.net" in google....
and useful topics will popup
If you make something idiotproof, someone else will make a better idiot.....
|
|
|
|
|
|
i connected my database (access) within the vb.net. I made an address book which and i connected it within the program. I need to make a button which can be used for searching within the db!
Adrian De Battista
|
|
|
|
|
Welcome to programming. I'd suggest as a first move that you change language to C# while you can. Either way, this next bit is called research. www.google.com/msdn.microsoft.com are two good resources besides the site you're now on. Assuming your app is connected to your access data file, and you're displaying the result, you're just a short step away from filtering, and it's such a basic step that anyone who gives you the code so you don't need to research it yourself will be doing you a disservice.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hi,
i have a set of controls inherited from the picturebox control.
i draw a curve using graphics.drawcurve to link 2 controls.the problem that i'm facing is that the curve disappears under any other (inherited)picturebox control in its path. Is there some way to avoid this ie.drawing under the control? or can i make the control transparent.
|
|
|
|
|
Hi
I've got Webbrowser control inside my VB form. Kind of like making my own browser using IE engine. When I open Word/Excel files, they open inside webbrowser all right. But how can I properly close the host application when I move to next document (like a web page) ? I guess simply moving off to another web page (using the navigate method) does not properly close the host application and the document. That's what I am doing now.
Also, after I deploy my application, in some computers Word's or Excel's toolbar is visible (when word or excel file is opened) and in some computers it is not visible. What could be causing this ?
mecracked
|
|
|
|
|
Hi all!!
Could somebody please tke a look at the the following?
I have been searching an anwser for a de-serialization trouble i am having in my project, however i cannot find a cause as why it should not work..... The project a server listner setup using sockets so i will post both parts of the code
However, the server side file is equal to the listener side received file, I compared both files in Textpad and it says they are byte identical. Also the serialized class is available in both project parts. I tried both soap and binary formatters which both will not work...
ServerSide Code;
<code>
Dim io As MemoryStream = New MemoryStream
'Dim Bf As BinaryFormatter = New BinaryFormatter
Dim Bf As SoapFormatter = New SoapFormatter
SendXML = False
'-- convert file to byte array
Dim Br As New BinaryReader(File.OpenRead(filepath))
Dim bytes() As Byte = Br.ReadBytes(Br.BaseStream.Length)
Br.Close()
'--set filesize of the file buffer
ReDim SdServerSend.File(bytes.Length)
'-- copy array to .file
SdServerSend.File = bytes
'-- serialize class to IO stream
Bf.Serialize(io, SdServerSend)
'-- testpurpose;
Console.WriteLine(System.Text.Encoding.Default.GetString(io.GetBuffer))
'-- writes IO to hdd
Dim BW As New BinaryWriter(File.OpenWrite("C:\PLC\Listener\Received\temptest " & SdServerSend.Type.ToString & " " & EventCounter & ".bin"))
BW.Write(io.GetBuffer, 0, io.Length)
BW.Close()
'-- set io.postion to 0
io.Position = 0
'-- send serialized data to listener
Form1.ClientSocket.Send(io.GetBuffer, io.Length, 0)
</code>
Listener side;
<code>
'-- Receive Message from Current Connection
numbytes = CurSocket.Receive(Buffer, Buffer.Length, 0)
Dim fs As FileStream
Dim filepath As String = "c:\PLC\Listener\Received\Temp " & EventCounter & ".bin"
lstStatus.Items.Insert(lstStatus.Items.Count, "Received Message " & CurRemIp)
lstStatus.SelectedIndex = lstStatus.Items.Count - 1
'-- write this file to HDD location filepath as temp buffer;
Dim BW As New BinaryWriter(File.OpenWrite(filepath))
BW.Write(Buffer, 0, numbytes)
BW.Close()
'-- copy contents of temp.bin into a byte buffer
fs = File.OpenRead(filepath)
Dim SdServerSend As SerialData = New SerialData
Dim bf As SoapFormatter = New SoapFormatter
'Dim Bf As BinaryFormatter = New BinaryFormatter
'-- deserialize memorystream into dsrecv as SerialData
Dim SocketListenerSDRecv As SerialData = CType(Bf.Deserialize(fs), SerialData)
'-- close filestream
fs.Close()
</code>
So the file i receive is temporarily stored on hdd and reread as a bytearray to de-serialize it into memory,
The deserializer turns up with the following error for soap formater:
ParserError. No assembly is attached to the soap formatter a1:http://schemas.microsoft.com/clr/nsassem/C1000Client/C1000Client%2C%20Version%3D1.0.1899.16105%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull
SerialData;
binary formatter errorcould not find assembly version=1.0.1896.29558, culture=neutral, publickeytoken=null
The files in question both on server and listener are identical
either in SOAP;
<code><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<a1:SerialData id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/C1000Client/C1000Client%2C%20Version%3D1.0.1899.16105%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<PLCname id="ref-3">System001</PLCname>
<Type>EVENT</Type>
<File href="#ref-4"/>
</a1:SerialData>
<SOAP-ENC:Array id="ref-4" xsi:type="SOAP-ENC:base64">77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS1YTUxFVkVOVC54bWwgY3JlYXRlZCBhdCAxNC0zLTIwMDUgMTA6MTY6MTIgb24gUExDIGV2ZW50LS0+DQo8SFdGWE1MVjEgeG1sbnM9Imh0dHA6Ly90ZW1wdXJpLm9yZy9IV0ZYTUxWMS54c2QiPg0KICA8VkVSU0lPTj4wMTwvVkVSU0lPTj4NCiAgPEFNU05FVElEPjE5Mi4xNjguMjU1LjIwNC4xLjE8L0FNU05FVElEPg0KICA8QklOPg0KICAgIDxJRD5UZXN0MTwvSUQ+DQogICAgPFZBTFVFPkZhbHNlPC9WQUxVRT4NCiAgICA8Q0FVU0U+RVZFTlQ8L0NBVVNFPg0KICAgIDxRVUFMSUZZPlZBTElEPC9RVUFMSUZZPg0KICAgIDxUWVBFPk1JTjwvVFlQRT4NCiAgICA8U1RBTVA+MTQtMy0yMDA1IDEwOjE1OjU4PC9TVEFNUD4NCiAgPC9CSU4+DQo8L0hXRlhNTFYxPg==</SOAP-ENC:Array>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope></code>
or in Binaryformatter;
<code>
" ÿÿÿÿ" ' IC1000Client, Version=1.0.1899.16105, Culture=neutral, PublicKeyToken=null" C1000Client.SerialData PLCnameTypeFile"C1000Client.Type' '' System001üÿÿÿC1000Client.Type" value__ ' " ¤" '<?xml version="1.0" encoding="utf-8"?>
<!--XMLEVENT.xml created at 14-3-2005 10:18:38 on PLC event-->
<HWFXMLV1 xmlns="http://tempuri.org/HWFXMLV1.xsd">
<VERSION>01</VERSION>
<AMSNETID>192.168.255.204.1.1</AMSNETID>
<BIN>
<ID>Test0</ID>
<VALUE>True</VALUE>
<CAUSE>EVENT</CAUSE>
<QUALIFY>VALID</QUALIFY>
<TYPE>MAX</TYPE>
<STAMP>14-3-2005 10:18:23</STAMP>
</BIN>
</HWFXMLV1>
</code>
If you make something idiotproof, someone else will make a better idiot.....
|
|
|
|
|
Hello guys,
Now I am trying to develope a software using GIS technology. I am using the SpatialWare to store spatial data in database (MS SQL Server 2000). But SpatialWare is not free, so I want to ask if you can tell me some software have same ablilties as SpatialWare and it's freeware. Could you tell me.
Thanks with best regards,
nobita3x
|
|
|
|
|
Have a look at the spatial extension of PostGreSql. I think its named PostGIS or something similar. Dont forget to look at the license. If I remember right it was rather restrictive.
|
|
|
|
|
Thanks Robert. But PostGIS is used for PostgreSQL database, not for MS SQL Server 2000. I hope U can tell me another that is used for MS SQL Server 2000.
Thank U very much.
nobita3x
|
|
|
|
|
I didnt get that you were fixed to Ms SqlServer
I havent yet heart about anything giving free spatial functionality to SqlServer (and I work in a company which creates GIS software). If you need something without costs you will probably have to move to something which is closer to the opensource community.
|
|
|
|
|
Hi,
I have searched in Internet, but result is nothing.
I am using the VB.Net to develope this software.
Could you ask my question.
Thanks,
nobita3x
|
|
|
|
|
This code is not displaying the contents of my text file.. Am I missing something?
Dim TestFile As StreamReader
Dim LineofText As String
TestFile = File.OpenText("C:\dvdpath.txt")
Do Until TestFile.Peek = -1
LineofText = TestFile.ReadLine()
Console.WriteLine(TestFile)
Loop
TestFile.Close()
I'm actually trying to read a file that is over 800k in size and am just trying to learn how to open and read simple text files first. I've already added the System.IO namespace and it compiles fine.. When I execute it an empty window shows and it should show at least 4 lines of text.
Thanx in advance for any assistance!
-mark-
|
|
|
|
|
Try this:
Dim TestFile As StreamReader
Dim LineofText As String
TestFile = File.OpenText("C:\x.txt")
Do Until TestFile.Peek = -1
LineofText = TestFile.ReadLine()
Console.WriteLine(LineofText)
Loop
TestFile.Close()
"The things that will destroy us are: politics without principle; pleasure without conscience; wealth without work; knowledge without character; business without morality; science without humanity; and worship without sacrifice."
-Mahatma Gandhi (1869-1948)
|
|
|
|
|
Thanx!! Was a basic mistake I guess
-Mark-
|
|
|
|
|
I have a program that accepts an Arrival Date and a Departure Date. I need to calculate the number of "Years if any, Months if any, Weeks if any and Days if any" between the arrival and departure date. Datediff does not work for me. Any Idea's
Regards
"The things that will destroy us are: politics without principle; pleasure without conscience; wealth without work; knowledge without character; business without morality; science without humanity; and worship without sacrifice."
-Mahatma Gandhi (1869-1948)
|
|
|
|
|
What do you mean that datediff doesn't work?
If you want something like "1 year, 2 months, 3 weeks and 5 days" then you have to implement the function yourself.
E.g.: you can use DateDiff to find out how many years is the difference between Arrival and Departure, display year, then use DateAdd to change one of the dates (e.g. add the years to Arrival Departure date) and use DateDiff to find out how many months the difference is now, display months, then use DateAdd to add months to Arrival date, display weeks difference, and so on...
Hope it helps
|
|
|
|
|
can you elaborate?
"The things that will destroy us are: politics without principle; pleasure without conscience; wealth without work; knowledge without character; business without morality; science without humanity; and worship without sacrifice."
-Mahatma Gandhi (1869-1948)
|
|
|
|
|
What I meant was, if you need to get the date difference between arrival and departure dates in terms of X years, Y months, Z weeks, and Q days then you need to write your own function.
Your function should first calculate the year difference between the arrival and departure date.
Then you need to either:
- add the years to departure date; or
- deduct the years from arrival date.
After this, you can calculate the remaining month difference between the arrival and departure date by using the modified date and so on.
Example
Departure date = 01/01/2005
Arrival date = 03/02/2006 05/03/2006
Year difference = DateDiff('y', '01/01/2005', '05/03/2006') = 1
Modified departure date = DateAdd('y', 1, '01/01/2005') = 01/01/2006
Arrival date = 03/02/2006
Months difference = DateDiff('m', '01/01/2006', '05/03/2006') = 2
...
and so on till you get the difference in days.
Got it?
Edbert
|
|
|
|
|
Edbert, How did you get the date of 05/03/2006 for a departure date...
Regards
"The things that will destroy us are: politics without principle; pleasure without conscience; wealth without work; knowledge without character; business without morality; science without humanity; and worship without sacrifice."
-Mahatma Gandhi (1869-1948)
|
|
|
|
|
Whoops.. sorry . The example arrival date was 03/02/2006 but I changed it to 05/03/2006 because I feel it's a better date example (has 1 year and 2 months difference to the departure date).
I've modified the post. You can check the modified one now.
I hope that explains it,
Edbert
|
|
|
|