How To Code Some Triangles
Aug 6, 2010
I am trying to code some Triangles. But I am getting a not declared error and I am stuck a bit. FYI I have to use OutputTextBox.AppendText in my program.
'First Triangle
For i As Integer = 1 To 10
outputTextBox.AppendText("*")
[code].....
View 1 Replies
ADVERTISEMENT
Feb 22, 2010
Given the image below
1. I have updated the image based on feedback from Steven_W so there are 4 triangles in the right hand diagram instead of 3 which makes more sense!
2. update image again to label sub triangles as A, B, C, D in grey
What is the pseudo algorithm for mapping a coordinate (x,y) in the left hand square such that a coordinate (u,v) is produced within the rectangle bounding the triangle on the right so that points are interpolated between the mapping points as illustrated on the diagram? 1 to 4 are equidistant on the triangle from left to right even though my illustration is a bit rough around the edges :)This is to generate a rough and ready panel for the lid of a skybox from the top half a 360 degree panoramic photo.
update 3 based on feedback.The first step appears to be working out which triangle we are in for the left hand diagram based on the (x,y) coordinates.The second steep is to work out the distance along the vertices of that triangle. Then use those distances to get the coordinates on the related triangle in the diagram on the right
update 4 - code to identify triangle in left hand diagram
Public Function TriangleIndex(ByVal x As Integer, ByVal y As Integer, ByVal w as integer, ByVal h as integer) as integer[code].....
View 3 Replies
Jun 15, 2011
where I could find the code or construct it. I think its a lengthy code though.
View 6 Replies
Aug 1, 2010
I am trying to just make triangles as follows, but when I execute the program, nothing displays in my textbox. It is a windows forms application.
Should be :
*
**
***
****
*****
.....................
Here is my code:
Public Class Form1
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox.TextChanged
End Sub
[CODE]....................
View 1 Replies
Aug 8, 2011
After exporting data using a third party component the data in the excel sheet isn't type correctly. Excel thinks that some values are string while they are numbers and a little green triangle shows up.
We've coded the following to fix this:
For Each objCell As Microsoft.Office.Interop.Excel.Range In objWorkSheetReport.Range(objWorkSheetReport.Cells(1, 1), objWorkSheetReport.Cells(Me.RowCount + 10, Columns.Count + 10)).Cells
[Code].....
This removes all those little green triangles but is really slow.
Is there a faster way to convert a Range of data quickly so the green triangles don't show up?
View 1 Replies
Jan 13, 2010
Public Class form1
Private Sub btnAnswer_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAnswer.Click[code]........
how can i make vb realize that the side that is opposite of the given angle, has to be less than the other sides. Also im not sure what Acamar meant by If txtAngleA.Text <> "" AndAlso txtAngleB.Text <> "" AndAlso txtSideA.Text <> "" Then 'two angles and a side Because im not sure what <> does.
View 1 Replies
Dec 8, 2011
I have some code to execute code at runtime...
Here is the main
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
If TextBox1.Text.Trim <> "" Then
If TextBox2.Text.Trim <> "" Then
[code]....
When the button is pressed, it all works and the following files are created: yahoo.dll and yahoo.pdb My question is this: What is the code to load the already compiled yahoo files to execute the code again, without having to recompile the code?
View 1 Replies
Jul 19, 2011
This code was posted in Chit Chat and everyone is saying how great it is. I just have Visual Studio 2010 and no familiarity with VB6 so I thought it would be good to convert the code to Visual Basic 2010.
[Code]...
View 39 Replies
Sep 9, 2011
this code was not done by me originally and there are some thigns here i dont quite understand i have altered it a bit from my coworkers code to suit my data and it works. but too slow. and when i have 4000+kb excel files it might freeze altogether. ( I have checked tho that when and after this transposer runs it will still be within the excel row limit, i had done calculations before and made a macro to automatically split excel files based on number of columns and rows to make sure this is so ). This code seems to start out fast then goes slower the longer it runs. at least this is what it seems liek to me.
[Code]....
View 2 Replies
May 26, 2010
i recorded the following macro in excel 2007:
[Code]...
View 3 Replies
Jan 2, 2012
I recently found this code (provided for third party use on another VB site), however,ll of my attempts to insert it into a class library have failed.I open a new class library and past the code in, and immediately get several errors pertaining to how certain objects can't be found. I find it it is crucial to use this code, unless someone can suggest to me another example of existing code that will do the same thing: make a restricted textbox who imputs can be restricted, that can handle pasting, shortcuts, text property setting, and script-entered text.
Option Strict On
Imports System.ComponentModel
Public Class RestrictedTextBox
[code].....
View 9 Replies
Nov 24, 2010
I have been playing around with different types of native code operations in Visual Basic and then inspecting the code with Reflector to see what kind of MSIL is produced. For example, I wondered, in a one line If-Then-Else different than an If-Then-Else split onto multiple lines, ie.
[Code]...
View 3 Replies
Feb 20, 2011
what is wrong with my code and I get no feedback from my button click event, i have imported. ( code Below) and i have tied differrent combinations of the code without sucess.maybe add extra to my code for the list to show open Port or closed ports.
Imports System.Management
Imports System.Management.ManagementObjectSearcher
Imports System.Management.ManagementNamedValueCollection[code].....
View 9 Replies
May 1, 2012
This code is for 2008, 2010 and later versions of VB.Net as it uses an extension method.Please note: If you are using an earlier version ( or you do not like extension methods ) please see the next post.Here is the code I posted on Monday April 30th, 2012.>>Now you can specify the startRadius to be
View 7 Replies
Dec 13, 2009
I have this string just down loaded of a Unix server. I would like to remove the box (0x0A) Unix end line code; then replace it with CR+LF normal ASCII code. Also, I would like to do the replace before I save the data, while it in memory.
View 14 Replies
Jan 18, 2012
I had a weird series of errors involving e.Graphics.DrawString() when painting a panel.I am using a barcode font [Code 128] with a library that converts text to the proper format for Barcode readers.That's fine, however, when I draw it to the panel, that's where things stop being fine:But, here's where things get funky. When I put it into a TextBox instead of drawing it via Graphics.DrawString(), everything is peachy:In fact, the TextBox one looks much better than the Graphics.DrawString() one! Am I doing something wrong?[code]
View 2 Replies
Jan 9, 2012
I realize this post is rather long, but I wanted to give all the information up front instead of people having to ask me for more information.At the end of the re-installation of Visual Studio 2008, there is this message:
"Microsoft SQL Publishing Wizard: [2] Error: Installation failed for component Microsoft SQL Publishing Wizard. MSI returned error code 1638" in the log file dd_error_vs_procore_90.txt.
I have searched on Google for this whole message and found some references to this error, but I have done what they said worked for them and it did not fix the problem for me.When I searched for just "MSI returned error code 1638", I got that it cannot install something because it is already installed:"Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel".In Add/Remove Programs I see these two programs:
Microsoft SQL Server Database Publishing Wizard 1.3
Microsoft SQL Server Database Publishing Wizard 1.4
Are these programs/versions what the error is refering to? Am I safe to remove them and depend on the similarly-named item which would be newly installed with Visual Studio 2008 - "Microsoft SQL Publishing Wizard"? I still use SQL Server 2000 and 2005 on my computer, as well as 2008. I had installed VS 2008 on my computer before without this problem and also have VS 2005 and 2010.
View 1 Replies
Sep 1, 2011
I'm using ASP.net 4.0 VB,I am using a session variable to add a user entered code into the url of each page. I can get the code to show up at the end of the page's URL that my textbox is on, but what do I add to every page to make sure that the session stays at the end of every URL that person visits during their session? This is the code from the page that the user enters their user code.
Protected Sub IBTextBoxButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles IBTextBoxButton.Click
Session("IB") = IBTextBox.Text
Dim IB As String = Session("IB")
End Sub
[code]....
This is what I have in the page load of one of the other pages. What else do I add to make sure that variable is added to the URL of that page?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim IB As String
IB = Session("IB")
End Sub
View 3 Replies
Jan 24, 2011
i am asking that can i use c# language to implement "actions" fired on "click side events" such as mouse over the reason for this stupid question is that i remember some syntax of registering functions for particular events of formview, which are call when the event occurs (yes there ispostback involved" is something like the above possible for client side events using c# or even vb.net
protected void Page_Load(object sender, EventArgs e)
{
Label3.Text = "this is label three";
[code]....
View 3 Replies
Feb 15, 2009
I have a program that runs some code when i click a button on a form when done running the application ends. I want to automaticaly run the code when the users clicks on the exe. I have put the code that i want to run in the startup forms load event but that doesn't start
View 2 Replies
Sep 10, 2010
In my project, I have a local dataset (XSD) that I am using as local-temporary tables. I am getting a System.InvalidCastException when trying to access the field in one the tables. I believe this is because I my code is (incorrectly) not setting a field's value in a row before trying to access it.My problem is that the exception is breaking in the designer file and not in my code. As a result, I'm having difficulting determining which line of my code reading the field value before it has been set. Is there any way to configure Visual Studio to break in my code instead of in the designer created file?
View 1 Replies
Jul 2, 2009
I have made an application in VB.NET.The Button click codes are working fine. I have made a small modification in the code. I have commented the line 'Me.Close'But still my form gets closed. I think the application is executing from elsewhere.
View 8 Replies
Feb 23, 2010
There has been an Visual Studio addin created by Heslacher based on code by JohnWein which allows one to copy code in Visual Studio and paste it as HTML code block here in the forums.urls...
View 10 Replies
Aug 4, 2010
i am searching for gtalk open source code if anybody knows please let me know I need it urgently
View 1 Replies
Sep 18, 2010
I have a code in VB that looks like this:'Server.Transfer(txtUser.Text + "_page.aspx")which is taking a forms authenticated user to their page. For example if John logs in, it will take him to john_page.aspx.How will I be able to integrate this in a PHP login script?I'm trying something like:header("location: $member ._page.php");but I don't think I'm doing this correctly.
View 1 Replies
Jan 22, 2012
Wondering if it is possible. It works on the idea that all files share common code. The program would ideally analyse the source file and compare it to the reference files. It would then find common parts of the code and write it to a rebuild file. At the end the rebuild file and the reference files would then be able to rebuild the source file without it being present.
For Example.
source file code = xxyyzyzyxw
ref file 1 = xyxxzyzxwyy
ref file 2 = zxxwyzzywxx
The program would then analyse these files and make a rebuild file like the following
source(0,1) = ref1(2,3)
source(2,3) = ref1(10,11)
source(4,7) = ref2(5,6) + ref2(5,6)
source(8,9) = ref2(2,3)
Thus you would be able to build the source file using these instructions and the reference files.
View 1 Replies
Feb 17, 2012
I am trying to make a voice recognition thing with google's voice api.I modified UPLOADFILEEX function that can be found on codeproject.The file I wish to delete is C:ecord.flac Here is the function below
Public Shared Function UploadFile(ByVal uploadfilename As String, ByVal url As String, ByVal fileFormName As String, ByVal contenttype As String, ByVal querystring As System.Collections.Specialized.NameValueCollection, ByVal cookies As CookieContainer) As String If (fileFormName Is Nothing) OrElse (fileFormName.Length = 0) Then
fileFormName = "file"
[Code]...
View 2 Replies
May 25, 2009
I've been working on a project the last couple of day with the help of a lot of you out there. I've more or less finished the design of the interfase, but there are stange this happening with the form. I can say much about what is wrong because I dont understand it, but I would like to. I have added the form Class code and the Designer Code, is that enough or is more required? Theres a msgbox that popup in the form Load event which I placed there to see what I could learn about the GraphicsBuffer.
Imports System.Drawing
Imports System.Drawing.BufferedGraphics
Imports System.Drawing.BufferedGraphicsContext
[CODE]...
View 1 Replies
May 20, 2012
How can I change my code # to Code & in All the text files within a folder
View 10 Replies
Jun 21, 2012
I spotted this ina piece of code I am trying to decipher, and it made me giggle...
Public Const INFINITE As UInt32
Infinity in an unsigned 32-bit Integer.
View 6 Replies