|
|
I downloaded this from one of your articles.
Very useful code and control – thank you.
I have one question – how would you reset the picturebox to display its image in the original (first loaded) orientation?
I have tried setting rotation to zero but this leaves the image where it is, I have tried recording the current rotation and then tried to put the image back by setting the rotation to (360 – current value) but this does not seem to work either.
BTW: I am using the control to produce a slowly rotating image whilst a particular process is going on and then reset it when the process has completed.
Thanks in advance.
Peter F Diamond
|
|
|
|
|
This is a community. The articles are written by community members. To talk to the member who wrote an article, use the forum that is provided at the bottom of an article.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian,
Sorry if I have abused the format, I have tried to use the methods at the bottom of the original article but get the mails bounced back. I suppose I was just hoping some one might pick it up and assist.
Thanks again.
Peter.
Peter F Diamond
|
|
|
|
|
You don't email the person. You post a message in the forum at the bottom of that article and wait for a response.
|
|
|
|
|
hi everyone,
at design time , i have a datagridwiew which have a column of combo box type. How can i add data to this column(which is of combo type) at run time Without binding ?
any help will be appreciated.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Why? It's far easier just to bind the combo to a collection of items.
Read this[^] entire string of posts.
|
|
|
|
|
Hi,
I am exporting to a CSV file. Every column and field needs to be in quotes. If I open the CSV file in Notepad then it will look something like:
"ID"
"5555"
I am having difficulty because one of my fields, the description field has a " in it's text, and I think it is this " that is throwing my field values in more than one column.
How do I cater for this?
Please can some get back to me.
Regards
ma se
|
|
|
|
|
You need to escape your quotes.
So:
My field that contains "quotes".
would be represented in a CSV file as:
"My field that contains ""quotes""."
I find that the easiest way to find out how CSV files should be constructed is to use MS-Excel to create a CSV file.
|
|
|
|
|
Hi,
Can you please help me?
This is how I loop through my fields and write it to the file. How would I check for " and replace it with "" like you mentioned?
Here is my code:
strRow = """"
For Each dc As DataColumn In columns
strRow += dc.ColumnName.ToString() & """" & "," & """"
Next
strRow = Left(strRow, strRow.Length - 2)
writer.WriteLine(strRow)
Please help.
Regards
ma se
|
|
|
|
|
You should be replacing the double quotes in the value from dc.ColumnName to 2 double quotes.
So
"In and out of the "garden" he goes"
Turns into:
"In and out of the ""garden"" he goes"
Mike Lasseter
|
|
|
|
|
How to back Up MSSQL Database with VB.Net?
|
|
|
|
|
Execute the BACKUP DATABASE query from the frontend.
The name is Sandeep
|
|
|
|
|
Dim cmd As DbCommand
Dim str As String = "Backup Database " & "Mydatabase" & " To Disk = '" & 'C:\Documents and Settings\Dotnetuser\Desktop\bkdatabase' & "'"
cmd = db.GetSqlStringCommand(str)
db.ExecuteNonQuery(cmd)
I face problems "Time Out Expired and server is not responding"
|
|
|
|
|
Did u specify the backup filename (backup.bak) in the destination directory?
The name is Sandeep
|
|
|
|
|
You can find a sample code snippet here[^]
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
I need some help regarding the creation of control instances during runtime of an application. For eg: I have a tabcontrol with only one tab, and a textbox in that single tab. When I click a 'NEW' button, a new tab must be created in the control AND along with that I want a new text box in the latest tab. I am using VB
Thnx for any help...
The name is Sandeep
|
|
|
|
|
The textbox needs to be added to the tab control's controls collection, and the tab page is added to the tab controls collection of tab pages.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello Christian,
Thnx for your suggestion. But can you explain it? I understood what you said, but still didnt get how to do it. I hope you have not forgotten that I'm using VB.
The name is Sandeep
|
|
|
|
|
Add the control you created to the forms Controls collection:
Dim tb As New TextBox
tb.Location = ...
tb.Size = ...
Me.Controls.Add(tb)
For the tab page, you add it to the TabControl's Controls collection.
|
|
|
|
|
Adding an control at runtime
The following routine adds the Email label and associated text box at run time.
Private Sub AddEmailAddress()
Dim txtEmail As New TextBox
Dim lblEmail As New Label
' Set the desired properties
txtEmail.Top = txtAddress.Top + txtAddress.Height + 10
txtEmail.Left = txtAddress.Left
lblEmail.Text = "Email"
lblEmail.Location = New Point(lblAddress.Location.X, _
txtEmail.Location.Y)
' Add to the collection
txtAddress.Controls.Add(txtEmail)
txtAddress.Controls.Add(lblEmail)
End Sub
The above is adopted from MSDN. When you are creating controls at runtime you need to add event handlers in runtime also..
Read the following topic..
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/controlarrays.asp
|
|
|
|
|
Why are you telling me this? Tell the original poster! That way, he'll get a message that you replied instead of me. I already know how to do this stuff...
|
|
|
|
|
obviously u must be knowing dave...
this is code is not for you.
yeah by mistake i replied your post...
|
|
|
|
|
Hey:
I have my data in two dimensional arrays. I want to display those data in Datagrid. Can anybody guide me how can I do this?
hsprasain
|
|
|
|
|
Hopr the Article by Mihail Stefanov here[^] in CP will Help you.
Regards,
Satips.
|
|
|
|