|
hey,
i need to communicate between processes in the same system using VB .Net. I was looking at shared memory, but am not sure how to implement it. I am new to this stuff and hence wud appreciate ur help.
thanks,
kalyan
|
|
|
|
|
I'm trying to make a program that sends data to another computer throught a net.
I have follow an example but I can not establish connection.
In the sender, I have this code:
'CREAR EL SOCKET Y CONECTAR<br />
Dim iphe As IPHostEntry = Nothing<br />
iphe = Dns.Resolve(server)<br />
<br />
Dim ipad As IPAddress = iphe.AddressList(0)<br />
<br />
ipad = iphe.AddressList(0)<br />
Dim ipe As New IPEndPoint(ipad, port)<br />
Dim tmpS As New Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp)<br />
<br />
tmpS.Connect(ipe)<br />
<br />
'******************************************<br />
<br />
'ENVIAR<br />
Dim ASCII As Encoding = Encoding.ASCII<br />
Dim envio As String = Me.txtAccion.Text<br />
Dim ByteGet As [Byte]() = ASCII.GetBytes(envio)<br />
Dim RecvBytes(255) As [Byte]<br />
Dim strRetPage As [String] = Nothing<br />
<br />
tmpS.Send(ByteGet, ByteGet.Length, 0)
And in the client pc I have this code:
'CREAR EL SOCKET Y CONECTAR<br />
Dim iphe As IPHostEntry = Nothing<br />
iphe = Dns.Resolve(server)<br />
<br />
Dim ipad As IPAddress = iphe.AddressList(0)<br />
ipad = iphe.AddressList(0)<br />
<br />
Dim ipe As New IPEndPoint(ipad, port)<br />
Dim tmpS As New Socket(ipe.AddressFamily, SocketType.Stream, ProtocolType.Tcp)<br />
<br />
tmpS.Connect(ipe)<br />
<br />
'******************************************<br />
<br />
'RECIBIR<br />
Dim ASCII As Encoding = Encoding.ASCII<br />
Dim [Get] As String = "GET / HTTP/1.1" + ControlChars.Cr + ControlChars.Lf + "Host: " + server + ControlChars.Cr + ControlChars.Lf + "Connection: Close" + ControlChars.Cr + ControlChars.Lf + ControlChars.Cr + ControlChars.Lf<br />
Dim ByteGet As [Byte]() = ASCII.GetBytes([Get])<br />
Dim RecvBytes(255) As [Byte]<br />
Dim strRetPage As [String] = Nothing<br />
<br />
' Receive the server home page content.<br />
Dim bytes As Int32 = tmpS.Receive(RecvBytes, RecvBytes.Length, 0)<br />
<br />
' Read the first 256 bytes.<br />
strRetPage = strRetPage + ASCII.GetString(RecvBytes, 0, bytes)<br />
<br />
While bytes > 0<br />
bytes = tmpS.Receive(RecvBytes, RecvBytes.Length, 0)<br />
strRetPage = strRetPage + ASCII.GetString(RecvBytes, 0, bytes)<br />
End While<br />
<br />
MessageBox.Show(strRetPage)
Maybe all the code is wrong (sure!). Someone can help me with this?
Maybe there is an easy way to make this... I'm sure someone will teach me
|
|
|
|
|
How to view Vedio Stream in VB6? How to captures stills from it and store?
Shoaib Nawaz
|
|
|
|
|
Hello,
Thanks to an article I found here, I finally have figured out how to put a combobox into my datagrid.
It works great!
I'm still going through it, trying to figure out how it works (and why it works
Now I'm struggling with this:
I populate my datagrid with a SQL command that pulls a table from SQL.
I populate the values in my combobox with a SQL command that pulls several items from a different table.
When I click on my column in the datagrid that triggers the combobox, and select a value from my combobox, then move to another cell in the datagrid, how do I keep my newly selected item?
I'm having trouble wrapping my head around how best to do this...
Thanks in advance!
Amber
|
|
|
|
|
OK, if I understand your problem, you have a DataGrid. When you pick a cell from a certain column, a ComboBox is shown. You select a new value, then move away from the cell. The ComboBox disappears, but the cell now still contains the old value. Is this an accurate description of your problem?
If so, the part you are leaving out is updating the new combobox selection back into the DataGrid's undelying data source for the row just changed.
|
|
|
|
|
Yes, you understand exactly what I'm trying to do.
I'm unclear how to update the datagrid with the new selection...
Thanks!
amber
|
|
|
|
|
I've never actually done this - embed controls in a DataGrid. So someone else can probably give you a better answer. But what I think you need to do is first get the column and Row numbers corresponding to the cell with the combobox. You can do this from the DataGrid.CurrentCell.RowNumber and DataGrid.CurrentCell.ColumnNumber.
Then you translate those numbers into the specific datacolumn and datarow position in the DataSet your Grid uses. I say "translate" because you may not be showing all columns in the DataSet in your grid, etc. Then you update that value in the actual DataSet.
At least I think that works - again, I've never actually added a combobox to a DataGrid.
|
|
|
|
|
hi to all
i want to print content of a MSFlexgrid in visual basic, the content
of this MSFlexgrid is result a query.
i don not khonw can use crystal report for this reason, and if yes, how do this.
please help me.
|
|
|
|
|
Open Field Explorer in Crystal Report 9.
Create a new SQL Expression Field and Assign a Unique name [MySQLQuery] to it.
Use the same Query Here that You used to fill your MSFLAXGRID.
click on [+] besides Your Query name [MySQLQuery], It will expand.
Drad all the fields on to "detail" and then press F5 to refresh.
Shoaib Nawaz
|
|
|
|
|
hi all!
I want to put a form(instead of a List items)in a combobox .
my means is , everytimes , i Press the combobox button , instead of item , a form or any controls (checkbox,radiobutton,etc.) is appeared .
how can i do it?
mostafa hosseiny b.
|
|
|
|
|
AFAIK, you can't. The ComboBox will render strings in it's list, not graphical object. If you wanted to do this, I think you would have to make your own version of the control and write the proper rendering code.
You might get some useful information out of this[^] article here on CP.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thanks , but about datepicker , how does it to be designed?
mymeans is if it's possible , i can to design like this ...
thanks to guide ...
mostafa hosseiny b.
|
|
|
|
|
The DateTimePicker is a very custom Combobox. Everything about the DTP control overrides the original code of the ComboBox. This is a topic that is much too large for a forum discussion. I would suggest going to Google and searching for articles on "Custom Controls", or "Custom ComboBox" for more information and examples on how you can ownerdraw your own ComboBox.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I stored 5 records in a tables whose first field (ID) is assigned a primary key and autonumber properties. During the test phase I deleted 2 records.
The query "SELECT Max(ID)From TableName" returns 3. But Whenever I store a new record by a query "INSERT TableName (_2ndFiled,_3rdField) VALUES('the value for 2nd field','The value for 3rd field')" the new record is stored having ID as 6 Why??
Whenever I record a child record into a child table with reference provided by this query "SELECT Max(ID)From TableName" . The error occures! How to deal with this problem.
Shoaib Nawaz
-- modified at 8:45 Saturday 24th September, 2005
|
|
|
|
|
Because once a autonumber field uses a number, it's never used again.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Doesn't, what in Access is called, Compact and repair databases - reasign the autonumber field, so it can reuse previously used but deleted numbers?
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
Nope. Autonumber fields are not reset to the lowest unused number. Identity fields are also not renumbered to compact unused numbers.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well....
It resets incrementing AutoNumber fields so that the next value allocated will be one more than the highest value in the remaining records. For example, if all the records in the database have been deleted, after you compact the database, the value in the AutoNumber field will be 1 when the next record is added. If the highest remaining AutoNumber value in the database is 50, after you compact the database, the value in the AutoNumber field will be 51 when the next record is added. Note that this is true even if records containing values higher than 50 were added previously but were deleted prior to compacting.
Some MS support article for access 2002 (and the same is said in the 2000 and 97 articles)
So while it doens't automatically reassign all existing autonumber fields, it does infact seem to reassign the next number in the list after a repair, and that you can reuse previously used autonumber fields.
---------------------------
127.0.0.1 - Sweet 127.0.0.1
-- modified at 1:12 Sunday 25th September, 2005
|
|
|
|
|
So it does. :-> But it still won't result in what the OP was talking about.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I am new to .NET.
I am working on an assignment as given below.
Assignment - Class and events concepts.
Create a class clsPaint
This should draw circle,rectangle,ellipse on the form.
Take a menu with 3 options - circle,rectangle,ellipse
Trap mouse events and do the drawing.
I want to know, how to draw the objects without using graphics.
Can anyone help me out here?
Thanks in advance!
|
|
|
|
|
How on earth do you expect to draw anything with using a Graphics object?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
image.SetPixel
|
|
|
|
|
Paper and crayon would be quicker!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I will try and makes this question simple, so if anyone could lend a hand that would be great...
Basically, I want certain tabs on my tab form disabled but not removed completely when a certain condition has not been met (such as a user not logging in)
and clickable and functional when they have logged in.
please help asap =)
|
|
|
|
|
In the tab control use the tabs collection like tabl(0) to enable or disable any tab on appropriate time/action you want to perform.
you can even set the visibility as well and any other action.
Regards,
Asim
|
|
|
|