|
Thanks for reply
I mean that the controls is changeing it's location at design time not at run time ,,
on every time I open the project I found that the location of controls is cahnged , on every time I found that the items is go to the right and bottom may be 2 point , on my project I'm using some components whick is designed by some friends like panels ,,
I'm installing vb.net 2005 service pack 1 ,
and the prlblem is still ,,
Really it's a thing make me wondered
jooooo
|
|
|
|
|
have you asked your friends if their components use anchors? maybe it's there stuff that is causing the confusion...
|
|
|
|
|
Allah bless you !
Thanks my frind and I will do ,
jooooo
|
|
|
|
|
hi could anybody help me with this problem.. im trying to extract icon form a file and put it into the imagelist and display this icon to the picturebox.. but i got error saying "system.drawing.icon cannot converted to system.drawing.image"..
|
|
|
|
|
If the icon you are extracting is of proper .NET icon format then you should be able to use the methods of the icon class to convert to a bitmap (.ToBitmap() possibly). If the file is not carrying any .NET native icons you will need to use icon API commands. Try searching the site here, I think I have seen at least one article on this.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
I am working on a Console application at I wish to use arguments with.
I am using VS2005 system.environment.getarguments...
This returns a string array separated by a space. This does not help if the arg I am trying to pass has spaces.
How to I set the GetArgs to use a - or / as the separate (switch)?
At present I am writing the array back as a single string and using split to separate in the - but this is wrong I know.
Does anyone have advice / tutorial explaining this.
Please NO cut and paste code....
Thanks
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
japel wrote: This does not help if the arg I am trying to pass has spaces
Arguments usually are preceeded aith an escape character. Either '\', '/', or '-' for example. You can do your split and check out for that escape character at each of the splitted strings. If it starts with your escape char then it's a new argument. As long as it doesn't then simply append it to the previous one.
Regards
|
|
|
|
|
In the past I have done this with a getargs sub but why is there a system.environment.getarguments if it is so limited.
It must be how I am implementing it.
This was the way I was doing it.
<br />
Function GetCMDArgs() As String()<br />
' Declare variables.<br />
Dim separators As String = " "<br />
Dim commands As String = Microsoft.VisualBasic.Interaction.Command()<br />
Dim CMDargs() As String = commands.Split(separators.ToCharArray)<br />
Return CMDargs<br />
End Function<br />
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
hi dear friends
how can i change datagridview header color in
.net 2005 - windows application(programatic or in design mode)
thanks & regards
zahra yousefi
yousefi105@yahoo.com
|
|
|
|
|
For example:
DataGridView.Columns["ColumnName"].HeaderCell.Style.BackColor = Color.Red;
Regards
|
|
|
|
|
Dear Friends,
I have a datbase with one table with 8 filed and about 400,000 records,
I use VB.Net and connect to my Access Datbase but during the runtime the query and openning the databse is very slow,
Any Help??
Rafik Mouses
|
|
|
|
|
rafikmouses wrote: I use VB.Net and connect to my Access Datbase but during the runtime the query and openning the databse is very slow,
Care to provide more information? For example: What information do you need? what queries are slow? How is the database structured?
|
|
|
|
|
what is differeence between i.equal(j) and i=j in vb.net.
|
|
|
|
|
sathyan_8294 wrote: what is differeence between i.equal(j) and i=j in vb.net.
What's equal ?
Do you intend Object.Equals() , don't you?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
How have you declared i and j ???
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
CPallini wrote: If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
"There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable. There is another theory which states that this has already happened." - The Guide.
|
|
|
|
|
It could be that it was placed in the framework so it would be more familiar to developers who are coming from the Java programming language.
In Java, the == boolean expression returns true if two strings share the same memory address and false if the two memory addresses are different. The .equals method in Java would properly determine whether each of the memory addresses contain the same information.
For VB and VC# I would imagine that the == and .equals (or in VB's case: = and .equals) should have the same purpose, but this is just a guess as neither of the languages really use pointers.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
That depends very much on the data types of the variables.
The Equals method of the i variable is called with whatever data the j variable contains, while the behaviour of the = operator depends on the data types. If the data types are the same or can easily be converted to the same type, the = operator method for that data types is used, which usually does the same as the Equals method. Otherwise a huge method (hundreds of lines of code) in the Microsoft.VisualBasic library is called, that determines how the values can be compared and how it should be done.
---
Year happy = new Year(2007);
|
|
|
|
|
.equals is for comparing things other than numbers or words, like controls.
if textboxTMP.equals(textboxName) kind of thing, if you're working with say, forms or addressbooks and you need to have some sort of checking rather than a loop or select for each control. Personally, I don't use it, so I can't think of a useful instance, though I'm sure there are a few.
Daniel
|
|
|
|
|
I'd appreciate the code necessary to retrieve data from a column in a table. I'm setting up a public function in a module. I'm used to working with Access recordsets and am confused with .net. I need to get through this mental barrier. Thanks
|
|
|
|
|
I, too started with Access ... and have struggled with .NET ...
In this example, I am using two tables, "tblProjects" and "tblContacts" from my target Access Database, which we will call "Target.mdb"
I use a "WinComboBox" control from Xceed Software in Montreal, Canada (which will probably answer one of the next questions in your mind) which allows a multi-column ComboBox Dropdown ala Access-Style. Using the code below, I duplicate two of the most useful features of Access ... being able to select from a combobox and SEE multiple columns of data to better identify what I am selecting and... approximate the Form/Subform capability of Access as well.
Hope this helps you.
This is my first post here and I have NO clue as to how to attach a zip of the VS.NET 2005 Project ... so here is the code:
==========================================================================
Imports System
Imports System.Data
Imports System.Xml
Public Class Form1
Dim Con As OleDb.OleDbConnection = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Target.mdb")
Dim dsProjectList As New DataSet
Dim daProjectList As OleDb.OleDbDataAdapter
Dim dsProjectSelected As New DataSet
Dim daProjectSelected As OleDb.OleDbDataAdapter
Dim dsContactSelected As New DataSet
Dim daContactSelected As OleDb.OleDbDataAdapter
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Open Connection to Target Access Database
Con.Open()
'Fill Project List, daObjectName=DatAdapter, dsObjectName=DataSet, tblTableName=Table in Target Database
daProjectList = New OleDb.OleDbDataAdapter("SELECT tblProjects.P_ID, tblProjects.P_Name,tblProjects.P_Client_ID FROM tblProjects", Con)
dsProjectList.Clear()
daProjectList.Fill(dsProjectList, "tblProjects")
'Xceed WinComboBox .NET Component, Multi-Column ComboBox Control
wcbxProjectSelected.DataSource = dsProjectList.Tables("tblProjects")
wcbxProjectSelected.ColumnWidthAdjustment = Xceed.Editors.ColumnWidthAdjustment.FitToItems
'Close the Connection to Target Access Database
Con.Close()
End Sub
Private Sub wcbxProjectSelected_SelectedItemChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wcbxProjectSelected.SelectedItemChanged
Dim strSelectedText As String
Dim SelIdx As Integer
Dim ProjID, sqlProject As String
Dim ContactID, sqlContact As String
'Get String of Selected Text from WinComboBox
strSelectedText = wcbxProjectSelected.TextBoxArea.SelectedText.ToString
'Catch Empty SelectedText
If Not IsDBNull(strSelectedText) Then
'Get Currently Selected Row from the WinComboBox Control
SelIdx = wcbxProjectSelected.SelectedIndex
'Get the ProjectID from Column1 of the WinComboBox Control (by "Named Field" Method)
ProjID = dsProjectList.Tables("tblProjects").Rows(SelIdx).Item("P_ID")
'Get the ContactID from Column3 of the WinComboBox Control (by "Named Field" Method)
ContactID = dsProjectList.Tables("tblProjects").Rows(SelIdx).Item("P_Client_ID")
'Open Connection to Target Access Database
Con.Open()
'Define SQL Statement to get a single row based on the selected ProjectID
sqlProject = "SELECT tblProjects.* FROM tblProjects WHERE tblProjects.P_ID = " + ProjID
'Create the new ProjectSelected DataAdapter, then FILL it with data from the DataSet
daProjectSelected = Nothing
daProjectSelected = New OleDb.OleDbDataAdapter((sqlProject), Con)
dsProjectSelected.Clear()
daProjectSelected.Fill(dsProjectSelected, "tblProjects")
'Fill Individual TextBox Controls on Form1; note use of Iff Function to trap Nulls in Database Fields
TextBox1.Text = wcbxProjectSelected.SelectedIndex + 1 'Selected Record Number; WinComboBox is 0-based, Records are 1-based
Me.TextBox2.Text = IIf(IsDBNull(dsProjectSelected.Tables("tblProjects").Rows(0).Item("P_ID")), "", dsProjectSelected.Tables("tblProjects").Rows(0).Item("P_ID"))
Me.TextBox3.Text = IIf(IsDBNull(dsProjectSelected.Tables("tblProjects").Rows(0).Item("P_Name")), "", dsProjectSelected.Tables("tblProjects").Rows(0).Item("P_Name"))
'Define SQL Statement to get a single row based on the selected ContactID
sqlContact = "SELECT tblContacts.* FROM tblContacts WHERE tblContacts.C_ID = " + ContactID
'Create the new ContactSelected DataAdapter, then FILL it with data from the DataSet
daContactSelected = New OleDb.OleDbDataAdapter((sqlContact), Con)
dsContactSelected.Clear()
daContactSelected.Fill(dsContactSelected, "tblContacts")
'Fill the DataGridView Control on Form1
DataGridView1.DataSource = dsContactSelected.Tables("tblContacts")
'Close the Connection to Target Access Database
Con.Close()
End If
End Sub
End Class
D=
|
|
|
|
|
Thanks, but I already have a connection, and I'm passing the id of the row to the function. I'd just like to get the data from that row and return it to the program I'm writting. There must be an easier way. Thanks
|
|
|
|
|
Thanks guys, but I guess it was to easy to answer, or you figured I needed to get it on my own, so I did. Thanks
|
|
|
|
|
Hello !
I develop a program which upload a file (max 10Mo) to a server with POST METHOD.
For little files, there is no problem. But for files of 6Mo and more, the upload don't finish. I think that I upload data too quickly. With Ethereal, I saw my data. There is a frame of 1452 bytes, after a frame of 96 bytes, another of 1452 etc...
Another software (perhaps writted in C/C++) upload the data with frames of 1024 bytes. And it works perfectly.
How can I change the data buffer of TCP in .NET 2 ?
I tried to change the "BufferSize" of my stream "rs" but no change.
I post a little part of my program :
Private request As HttpWebRequest
Const BufferSize As Integer = 1024
Dim content As Byte() = New Byte(BufferSize - 1) {}
Dim dataRead As Integer
Dim fs As Stream = getStream(Me.data)
Using rs As Stream = Me.request.GetRequestStream
While True
dataRead = fs.Read(content, 0, BufferSize)
If dataRead = 0 Then
Exit While
End If
rs.Write(content, 0, dataRead)
dataReads += dataRead
RaiseEvent PercentDone(dataReads, Me.data.Length)
End While
fs.Flush()
fs.Close()
End Using
Sorry for my poor english.
Thank you for reading.
|
|
|
|