|
hi all
i have download one project in vb6 and i have also convert in to vb.net but there is one problem Me.Line
this is the code in vb6
Sub AngleLineXY(ByRef X As Single, ByRef Y As Single, ByRef LineLength As Single, ByRef Angle As Single, ByRef LineID As Short, Optional ByRef Color As Short = 0)<br />
Dim X1 As Single<br />
Dim Y1 As Single<br />
Dim X2 As Single<br />
Dim Y2 As Single<br />
<br />
X1 = CenterX + X<br />
Y1 = CenterY + Y<br />
X2 = CSng(X1 + (System.Math.Cos(Angle - Radians(90)) * LineLength))<br />
Y2 = CSng(Y1 + (System.Math.Sin(Angle - Radians(90)) * LineLength))<br />
<br />
'UPGRADE_ISSUE: Form method Main.Line was not upgraded. Click for more: 'ms-help:
Me.Line (X1,Y1)-(X2,Y2)<br />
Me.Line (X1,Y1)-(X3,Y3)<br />
<br />
AL(LineID).X1 = X1 - CenterX<br />
AL(LineID).Y1 = Y1 - CenterY<br />
AL(LineID).X2 = X2 - CenterX<br />
AL(LineID).Y2 = Y2 - CenterY<br />
<br />
CurLineID = CShort(CurLineID + 1)<br />
End Sub
so how can i change this
this project is for rotate 3d qube i am new in vb.net and i just want to create 3d qube with rotation
any help
please
|
|
|
|
|
Have you checked what the help article that the code references has to say?
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
you need to handle your forms paint event and then use the graphics object passed in there to draw lines
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 )
|
|
|
|
|
I hope I'm posting this on the right board;
Using VB6 & Win 98, I spent many days trying to make an old (cash register) program I wrote many years ago talk. ie; "two at three dollars and twenty-five cents each", "Total due is" , "Your change is", etc. I had little or no success. One member suggested I up-grade my OS & up-grade from VB6 to VB.NET. I did up-grade to Win XP Pro & will try to learn VB.NET later.
Still trying to accomplish my goal, I purchase several third-party APIs (Alive Text to Speech, TextSound, & TextAloud) at a cost of $25 to $29 each. They all had problems and wouldn't work for me. I sent numerous e-mails to their support address for help. I got zero response from "Alive Text to Speech" & "TextSound". I did get immediate response from "TextSound". "TextSound" was NOT able to help me with my problem which turned out (according to their forum) to be shared by other users of their application. Additionally, "TextSound" wanted an additional $250 for a developers license if I wanted to use their command line feature for more than 30 days. Since it wouldn't work for me anyway, this discussion became mute.
About to give up, I decided to download the free SDK5.1 (Speech Development Kit) from Microsoft. Only having dial-up this took 4 hours. Boy, was it worth it!
Not only did the download come with several complete sample speech projects, they all compiled & ran on VB6. Even better yet, they all had complete, well commented source code. After getting this download, I had my old program running & talking perfect in about 45 minutes.
I hope this might be helpful to someone.
Robert, still trying
|
|
|
|
|
Robert from Florida wrote: this discussion became mute.
you mean moot ?
Robert from Florida wrote: About to give up, I decided to download the free SDK5.1 (Speech Development Kit) from Microsoft. Only having dial-up this took 4 hours. Boy, was it worth it!
Yeah, as I was reading, I wondered why no search you did brought this up.
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 )
|
|
|
|
|
Actually I want to display the Amount of Available Memory and CPU Usage and also its history on Screen just like one on Task Manager. So far I am able to display the Available Memory on Screen by using a Performance Counter under Memory Category "Available KBytes". But how can i display the CPU Usage and its History. I am using the "% Processor Time" Performance counter but can't see anything happening on screen. What should i use for this purpose. Thanks for your cooperation !
AliAmjad(MCP)
|
|
|
|
|
Would you care to show the code that you are using for the PerformanceCounter class? It sounds like it ought to be working. I've done this numerous times in the past and it works.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
I am using the RawValue Property of "Available KBytes" Performance Counter and also used the same one for "% Processor Time" under a Timer which updates the Text of the Label after every Second But I Get always a '0' for "% Processor Time" is there any other way of using this counter and also what about the real time graph how can i display it on screen.
AliAmjad (MCP)
|
|
|
|
|
Do you get values when you try the performance counter properties through the actual performance counter tool in the Admin Tools?
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
Paul Conrad wrote: Do you get values when you try the performance counter properties through the actual performance counter tool in the Admin Tools?
Yes i am getting values. But not on the form. I have actually created a new category and then created a copy of "% Processor Time" performance counter in it. What else should i do?
AliAmjad (MCP)
|
|
|
|
|
Ok I've found the Solution for this Problem I am using the following Code now:
Dim CPULoadCounter As New PerformanceCounter
Private Sub tmrUsage_Tick(ByVal sender As System.Object, ByVal e As system.EventArgs) Handles tmrUsage.Tick
Dim lCPULoadCounterNextValue As Single = CPULoadCounter.NextValue()
Me.lblCPULoad.Text = CType(lCPULoadCounterNextValue, Integer) & "%"
End Sub
Private Sub CPULoadCounterInitializer()
CPULoadCounter.CategoryName = "Processor"
CPULoadCounter.CounterName = "% Processor Time"
CPULoadCounter.InstanceName = "_Total"
End Sub
Can you please tell me how can i get the Total Physical RAM Size in VB.NET?
AliAmjad (MCP)
|
|
|
|
|
AliAmjad wrote: Can you please tell me how can i get the Total Physical RAM Size in VB.NET
I have found its solution too here it is:
My.Computer.Info.TotalPhysicalMemory
Thanks man for your cooperation !
AliAmjad (MCP)
|
|
|
|
|
why VB 2005 doesn't allow subreport on its integrate report object..
|
|
|
|
|
My input text from a .txt file is
this is the first line
this is the second line
this is the third line
I need to capitalize the first letter of each word by placing it in a textbox, I have the following code:
Dim aString As String = My.Computer.FileSystem.ReadAllText("input.txt")
Dim stringReturn As String
If My.Computer.FileSystem.FileExists("input.txt") Then
Me.xInputTextBox.Text = (Convert.ToString(aString.ToLower))
End If
Do While (aString.IndexOf(Space(2)) >= 0)
aString = aString.Replace(Space(2), Space(1))
Loop
Dim caparray() As String = (aString.Split(" " & "ControlChars.NewLine"))
For I As Integer = 0 To caparray.Length - 1
If caparray(I).Length = 1 Then
caparray(I) = caparray(I).ToUpper
Else ' ***join them back together
caparray(I) = caparray(I).Substring(0, 1).ToUpper & caparray(I).Substring(1).ToLower
End If
Next
stringReturn = String.Join(" ", caparray)
Me.xInputTextBox.Text = (stringReturn.ToString)
My output is then
This Is The First Line
this Is The Second Line
this Is The Third Line
It will not capitalize the first letter of the second and third line. Can someone please tell me what I am doing wrong?
Thanks, Jesi
|
|
|
|
|
JessicaD523 wrote: This Is The First Line
this Is The Second Line
There is a newline but no space between Line and this, so to your algorithm they are
just one word! A simple debug session would have told you that.
You will have similar problems with punctuation: "aha" will be seen as a word starting
with " not a.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thank you, I kind of thought that was the problem...but how do i fix that? I'm very new at vb.net. Thanks.
Jesi
|
|
|
|
|
Hi Jesi,
JessicaD523 wrote: but how do i fix that?
as always:
1. define the requirements as accurately as possible (what is a word, which
words need capitalization, ...)
2. analyze, design, implement, test
3. iterate until satisfied.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
stringReturn = String.Join(" ", caparray)
I do not have your answer but what does this String.Join do, is it joining the first line to the second line and so on?
Can you use vbcrlf to go to the next line or 'proper case' instead of 'upper case'.
|
|
|
|
|
How do i call Other programs like office and Excel , Outlook From my VB App
|
|
|
|
|
The esiest way to launch any external application or file is to use Start method of System.Diagnostics.Process class.
Following line may be used to start MS Word application –
System.Diagnostics.Process.Start("C:\Program Files\Microsoft Office\OFFICE11\winword.exe")
You should change the path of winword.exe according to your installation folder.
I hope this helps .
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Hi,
I am using VB in MS ACCESS and is not able to update a date field in the database, I am taking the value from a textbox in the form.
This is the query I have been using...
s = "Update Table1 set DOB = """ + Text2.Value + """ where name = """ + Text0.Value + """ "
DoCmd.RunSQL (s)
It is showing the type mismatch error.
Can somebody please help me with this.
Thanks
|
|
|
|
|
A date in Access is written between # characters, not quotation marks.
A string in SQL is written between apostrophes ('), not quotation marks.
You should read up on SQL injection. Your code is wide open for SQL injection attacks.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hi ,
I am writing a datatable to xml file , i am using xmlwriter in vb.net to write .I am setting the prefix by writing the namespace using these things
xw.WriteStartElement("Name")<br />
xw.WriteStartAttribute("fn",nothing, "c:/Font.xsd")<br />
xw.WriteStartAttribute("txt", "Text", "c:/Text.xsd") so that i can use the prefix in the program while using <br />
xw.WriteStartElement("txt", "TextBackColor", Nothing)<br />
xw.WriteString(dtTextBox.Rows(iTextBoxesCount).Item("BackColor").ToString())<br />
xw.WriteEndElement()
i am getting the output like this on top of xml page
<Name <big>fn="" lbl:Label="" txt:Text="" pos:Position="" xs=""</big> xmlns:xs="http://www.w3.org/2001/schema-instance" xmlns:pos="c:\Position.xsd" xmlns:txt="c:\Text.xsd" xmlns:lbl="c:\Label.xsd" xmlns:fn="c:\Font.xsd">
Now the thing i dont want these things highlighted in bold .This is the exta information .How to remove these things ??
Thanks,
Dvs
|
|
|
|
|
I am trying to develop a application using vb.net. printer connected with server also it shared with all their clients. now my application exactly find the printer status like how many print made by particular system. examble if i give 10 copy print from system1 and 5 copies from system2, my application in server system store this information like
system1 - 10 copies - date & time
system2 - 5 copies - date & time
( pear to pear network )
please any one help me
|
|
|
|
|