
I tried replacing Me.Invalidate() with Me.Refresh and unfortunately I got the same results. It didn't affect it at all.





HI,
I'm using VBA to dynamically change the value rannge of several charts. All works as designed until the 78 pass throught the loop. Then the macro starts ignoring code that up until monents ago worked fine? I've run debug and everything works upuntil line 10.
What's up with this??? Is this a memory issue???
Here is my code:
Function Top_Charts(I, Title1, YAxisLable)
Data_Address_String = "R" & CStr(I) & "C4:R" & CStr(I) & "C65"
Data_Address_String1 = "R" & CStr(I) & "C2"
ActiveSheet.ChartObjects(1).Activate
ActiveChart.PlotArea.Select
Data_Address_String2 = "='Month to Date'!" & Data_Address_String
ActiveChart.SeriesCollection(1).Values = Data_Address_String2
Data_Address_String2 = "='Month to Date'!" & Data_Address_String1
ActiveChart.SeriesCollection(1).Name = Data_Address_String2
ActiveChart.ChartTitle.Select
10 Selection.Characters.Text = Title1
ActiveChart.PlotArea.Select
Data_Address_String2 = "=UCL!" & Data_Address_String
ActiveChart.SeriesCollection(2).Values = Data_Address_String2
Data_Address_String2 = "='+2 sigma'!" & Data_Address_String
ActiveChart.SeriesCollection(3).Values = Data_Address_String2
Data_Address_String2 = "='X Bar'!" & Data_Address_String
ActiveChart.SeriesCollection(4).Values = Data_Address_String2
Data_Address_String2 = "='2 sigma'!" & Data_Address_String
ActiveChart.SeriesCollection(5).Values = Data_Address_String2
Data_Address_String2 = "=LCL!" & Data_Address_String
ActiveChart.SeriesCollection(6).Values = Data_Address_String2
Data_Address_String2 = "='+1 sigma'!" & Data_Address_String
ActiveChart.SeriesCollection(7).Values = Data_Address_String2
Data_Address_String2 = "='1 sigma'!" & Data_Address_String
ActiveChart.SeriesCollection(8).Values = Data_Address_String2
Neil





Hi,
i have searched for a code which shows me the actual webcamimage. so i have found the DirectShowLib, all fine with it.
Now i want to capture a singe Bitmap from this "stream". In the Code there is something like that:
hr = Me.CaptureGraphBuilder.RenderStream(PinCategory.Preview, MediaType.Video, sourceFilter, Nothing, Nothing)<br />
Debug.WriteLine("Render the preview pin on the video capture filter : " & DsError.GetErrorText(hr))<br />
DsError.ThrowExceptionForHR(hr)
There i also can say, that the Stream should be saved into an .aviFile. But How can I Capture a single Image and display it in a picturebox?
I always found examples for c, c++ or c#, but no vb.net examples.
Can anyone help me??
thanks
milschkuh





It always amazes me that people think C# and VB.NET are so different. Look at the C# example and you can figure out what the VB.NET code is quite easily. Or you can copy and the code into an one of the online C# to VB.NET conversion tools. To find those, all you need to do is Google for "C# to VB.NET conversion".





Hi milschkuh,
Have you had the solution for This Post ?
Can you please share to us ?
Thanks alot,
VuVinh





I am Using Oracle8i with Vb.net 2003
I am trying to connect to Oracle database...
but it is giving me TNS errror: Unable to connect to designation
myConnection = New OleDbConnection("Provider= MSDAORA.1; UserID=scott;password=tiger; datasource; database=demo1)
i want to know ,should datasource be empty in this
i am using oledb connection,
can anyone specify the corrrect format





parkash_C wrote: should datasource be empty
No
parkash_C wrote: can anyone specify the corrrect format
Look here[^]





thanks for your time,
i ve visited this, but can you explain me
what is datasource ,
iN MS access , i write pathname to file,





I don't know, I don't use Oracle.
I do know how to use Google.
I found this[^].





connection string for the oracle
use the following string as connction string
"Provider=msdaora.1;Data Source = ORA9I;User ID = myuser;password = mypass;"
provider: provider is provided by the oracle corporation. it install in your pc while oracle client(minimum) installing
oracle provides two providers
1. msdaora.1
2. OraOledb.Oracle
Data Source : Host string of your server, if u r using standlone this will empty like this
"Provider=msdaora.1;Data Source =;User ID = myuser;password = mypass;"
userid,password: user id , password
Thanks
Rajesh B > A Poor Workman Blames His Tools <





hi,
i am developing billing software in vb.net.
i want to export all accounts details into Tally software.
how is it possible for that?
plz help me...
Yours,
KaNNaN

"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com





For developing a pariticular interfaced software you should know that what this software can access?
Like: If Tally or Other softwares can import data from Excel,Word,Access or Other Medium then you can export data by that source.
Best Regard
Anubhava Dimri
If you can think then I Can.





Your going to have to consult with either the Tally documentation or contact Tally Support to get that kind of information. Or you can try to Google for something like "Tally import file".





Hi All
I am working on a vb 6.0 + MySQL project.
I need to create a Database(for local use Ex: If user wants to create database they can create and dump data from online databas) Dynamically and restore the database with production database backup.
Is it possible?
Thanks,
Willington D





Yes.. it is.. (As long as you code it)
Do Or Don't, there is no "try catch ex as exception end try"





Why in VB 6.0?
Surely you have VB.Net?
VB 6 is deeply unsupported, whereas VB.Net is not only supported but has more inbuilt sql connectivity.

"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers. I despair for the future."
Socrates 400BC





Hi Guys,
not sure if im in the right forum but this is the error i am getting in my script.
i have googled and tried many things but to no avail....
the error:
"Object Required: WScript"
the code:
dim wshShell ,Wscript
set WshShell = CreateObject("WScript.Shell")
while StockCode <>""
Wscript.Sleep 1000
wend
the error fails on Wscript.sleep command...
any idea on how to solve this....
thanks in advance
Anoop





You create WshShell in line 2 but never create Wscript!
Never underestimate the power of human stupidity
RAH





how do i do that? i.e. create the wscript?
thanks





The same as you did for wshscript.. but i'm guessing this is copy past. Brushing up on OOP could help a lot more ..
Do Or Don't, there is no "try catch ex as exception end try"





It's obvious you have no clue what you're doing. I suggest starting with the basics, here[^].





I'm looking for some help with computing values of a triangle and then drawing it to screen
Known;
Two points in degrees exist on a circle
Two line lengths representing ;
base, adjacent side (a)
and
opposite (c)
we want to derive side (b) hypotenuse
and also angles (A), (B), (C)
We already know that sides (a) and (c) join and we know that the longest side length will not exceed the diameter of the circle that the triangle is circumscribed within
The triangle created will be variable as different degrees and side lengths are entered, typically this will be scalene triangles but the may also be at times right triangles
I've been using a derived arc cos function ;

Public Function Arccos(X As Double) As Double
Arccos = Atn(X / Sqr(X * X + 1)) + 2 * Atn(1)
End Function

I know we can convert degrees to radians via "* Pi) / 180"
I know I can get the hypotenuse by;

side_b_squared = CDbl(c1 ^ 2 + a1 ^ 2  (c1 * a1)) * Cos(angle_B_degree_value_radians)
b1 = Sqr(side_b_squared)

I know we can get the angles A,B,C via ;

angle_C_cos_value = CDbl(a1 ^ 2 + b1 ^ 2  c1 ^ 2) / (2 * (a1 * b1))
angle_B_cos_value = CDbl(c1 ^ 2 + a1 ^ 2  b1 ^ 2) / (2 * (c1 * a1))
angle_A_cos_value = CDbl(b1 ^ 2 + c1 ^ 2  a1 ^ 2) / (2 * (b1 * c1))
angle_C_acos_value = (Arccos(angle_C_cos_value))
angle_B_acos_value = (Arccos(angle_B_cos_value))
angle_A_acos_value = (Arccos(angle_A_cos_value))
angle_C_degree_value = angle_C_acos_value * 180 / Pi
angle_B_degree_value = angle_B_acos_value * 180 / Pi
angle_A_degree_value = angle_A_acos_value * 180 / Pi

Although, I've had some trouble with this since some of the returned angles for some previous testing I did didn't
seem to be working very well, for instance I'd enter 60 degrees for angle (B) but it would somehow crunch it to
angle_B_Degree Value 38.8700377933938
I'm a little stuck on the math for all this.... here is an example scenario that I hope illustrates really clearly what I'm trying to do ;
A small VB app does the following ;
A small circle is drawn to the screen
On the form of the VB app there are text boxes that accept inputs ;
Text 1 = side (c) length as a number
Text 2 = side (a) length as a number
Text 3 = a value in degrees that represents a point of one of the ends of side (c)
Text 4 = a value in degrees that represents a point of one of the ends of side (a)
Then the following are computed ;
side length of the hypotenuse as a number, and output to a different text box
Angles (A), (B), (C) are computed as values in degrees, and output to another text box
The drawn circle may be say four inches in diameter, and all side lengths computed, regardless of their number value
are fit proprotionally, circumscribed within the circle, so even if one of the side lengths is really long, all side lengths are fit proportionally in the circle but retaining the same intrinsic unit measure values of their lengths.
Any help or insights on the above are really appreciated, especially the math and formula end and any code ideas, samples are a God send.
I'm a bit of a newbie with all this and I'm using an older version of VB (4.0)
I have a basic idea on using some of the draw functions and I think I can tinker my way through this, but again am very open to any feedback
Thanks people!





It would help if you stopped using the term Hypotenuse, as this only applies to Right Angles.
Also, is the radius known or unknown?

"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers. I despair for the future."
Socrates 400BC





Ok, will stop using the term hypotenuse!
Also, the longest triangle side will never exceed the diameter of the circle, but here are some more notes that may be helpful in better understanding what I'm trying to do ;
The triangle, circumscribed within the circle is situated so that each point of the triangle must fall somewhere on the perimeter of the circle itself For example sides 'a' and 'b' both have one of their ends at the centerpoint of the circle, and the angle between them is angle 'C'
What Im hoping for here, is that the circle centerpoint is not used at all, so no ends of the triangle will everland there
There needs to be actually four inputs... I know this sounds a bit unorthodox, but here is the interesting part of the problem... I'll clarify this.....
We want two inputs that store the lengths of two of the sides of the triangle ;
Text 1 = side (c) length as a number
Text 2 = side (a) length as a number
We also want two inputs that store two values that are points on the perimeter of the circle in degrees
Text 3 = a value in degrees that represents a point of one of the ends of side (c)
Text 4 = a value in degrees that represents a point of one of the ends of side (a)
So in the end we know that we have two sides of specific lengths that must fit within the circle, and we know that one of the ends of each line is connected to a specific degree point on that circle, we also know that both these side lengths do join somehow somewhere, but the degrees that are input ARE NOT the angles of any part of the triangle, here in this case, the degrees that are input are ONLY points on the circle itself that are simply where the lines of each respective triangle, so for example
A circle of four inches diameter
a line length of 10 units has one end point at 30 degrees
a second line length of 8 units has its end point at say, 78 degrees
where does the third point fall on the circles perimeter? at what degree?
what is the line length of the missing side, and then what are the angles contained within the triangle....
This is the math, code part I am hoping for help on..... I hope this clarifies?
Also... I'm using VB 4.0 and can't upgrade for a while  long story





Rockoon!
Thank you so much for your reply!
I just realized I made an assumption that may not be correct at all.
I had thought earlier that if we knew two points in degrees on the circle, then the difference or sum between them must be either one of the values of the unknown internal angle, or at least it would represent the other 3rd unknown point on the circle.
Now I'm thinking that, thats just a poor guess on my part!
Although, I then realized that if we knew two of the lengths of two of the sides, and if we knew that each line was associated with one of the points, then one of the lines must also intersect the two known points, and since that is the case then if the line that joins the two points is not equal to either of the two known line lengths then that gives us the missing side!?
If thats the case then its a matter of deriving where the third unknown point in degrees on the circle would be where the two known line lengths would meet?
I'm guessing, but if I'm not mistaken there could only be a maximum of two specific points on the circle where these two lines could join? But maybe only one place?
I'm hoping there is a way to 'algebratize' all this and then code it!?
Also, this is really important I feel ;
The lines of the triangle will be variable and in generic units, but say we know that the diameter of the circle is four inches. Line lengths may be values of 10, 23, 5, what ever... but they will fit proportionately in the circle, so the lines of generic unit measure need to be fit within the circle.
Here, we only know two of the points on the circle
In this exercise we don't know any of the internal angles, all we know are two points in degrees on the circle (the third is unknown) and we know that each point will be associate with one of the two known line lengths
We have the following unknowns;
All three internal angles, and one of the side lengths
All we know is two side lengths, two points on the circle in degrees where each point is associated with one of the side lengths, and we know which point on the circle is associate with which line,
We also know that the two known points on the circle must join and that this line may or may not be one of the known lines. Some sort of check, if statement could verify it when measured proprtionately somehow and if its not one of the known line lengths then we have our third unknown line




