|
Thank men. That's works.
Johnny Lizardo
|
|
|
|
|
Hi all
i am working on VB.Net project. In the project we have to draw a regression line on a graph. First the graph is plotted against the two axis and after setting all the points the regressiopn line is to be drawn..
Also the equation for the regression line and the equation of the line are to be found
Please let me know the solution for the problem as soon as possible with code if possible
regards
ManisH
|
|
|
|
|
Boy! I wish I paid attention in maths class instead of reading Visual Basic Programmer's Journal! (yeh right!)
Can any kind soul give me a function which returns a Point object, where the point is a set number of degrees around a circle which fits inside a given rectangle. I know that's an odd way to describe it!
Dim lRect As Rectangle = new Rectangle(0,0,100,100)
Dim lPoint1 As Point = PointOnCircle(lRect,45)
Dim lPoint2 As Point = PointOnCircle(lRect,135)
The above two calls will acquire Points where the X,Y coordinates are at 45 degrees around the circle (which fits in a rectangle of 100,100) and 135 degrees respectively.
The bit that gets me is the X= some sin/cos nonsense and Y= the other bit (and those bl**dy radians are involved aren't they). Maybe I did keep one eye on the blackboard.
I would be prepared to have your babies if you can pull this one off for me (which I am just sure you are dying to know how I will manage that!).
Thanks!
Ps: Sorry for all the !!! in here, well it is New Year and all that!! oops! damn! can't stop it!
Nursey
|
|
|
|
|
Jeez you guys must be peeing laughing at my math abilities 8-)
I found this website for nuclear physics (OK its an explanation of trig for 2 year olds)
http://www.updatestage.com/previous/991001.html
If anybody would like the code for building a polygon of any number of sides that fits in a specified box/circle, then let me know.
Nursey
|
|
|
|
|
Hi
please Tell me the code about how exactly i used the pathgradiant brush to draw a sphere
Thanks.
Eman Ali Moughal
Senior Software Engineer
Soon Soft (pvt) Ltd
www.soonsoft.com
|
|
|
|
|
Eman,
I just hacked this code out of my own C# project, hoping thatit will be of use to you. It may help clarify a few quirky things about PathGradientBrush. I think, by altering the focus parameter of SetTriangle... or SetSigma... in the code below, that you may be able to present a highlite at a position in a circle which approximates the look of a sphere. I honestly dont think you will get anything high quality though without breaking the sphere into triangles and shading each one appropriately, and that's way beyond me.
Another kludge you might use is to take a bitmap of a sphere, drawn in a 3D package or using Photopaint etc., and scaling it.
Well, for what its worth, here is my code, you will have to hack out my variables and try follow what's going on quite closely.
This method returns a brush that you can use on Graphics.FillPath.
prPath is a GraphicsPath
prFlip just flips a start and end color around
prBrushType is my enumeration which controls whether blends or triangle or bell type fills
public PathGradientBrush CreatePathBrush(GraphicsPath prPath)
{
Color lStart, lEnd; // Start and end color
PathGradientBrush lBrush; // Brush to assign to
lStart = Your Start Color;
lEnd = Your End Color;
// Create the linear brush
lBrush = new PathGradientBrush(prPath);
lBrush.CenterColor = lEnd;
// Create an array of colors which are the end color at each point
Color []lColors = new Color[prPath.PointCount];
for(int lCount = 0 ; lCount < prPath.PointCount ; lCount ++)
{
lColors[lCount] = lStart;
}
lBrush.SurroundColors = lColors;
// Experiment with the 0.5F figure, it should change the highlight on the shape you fill
// Of course you will want to fill a circle or ellipse would be better still.
lBrush.SetSigmaBellShape(0.5F);
return lBrush;
}
---------------
Hope this makes some kind of sense to you.
Nursey
|
|
|
|
|
Hi cnurse
thanks for the help buddy.
i have now my concept bcome bit improve about the path gradiant brush.
Thanks for your help.
|
|
|
|
|
You're very welcome. I'm glad I can offer back to a system I have gained so much from.
By the way. Watch out for my Theme system which will be released in the next few weeks. It lets you edit and manage gradients and will show you lots of ways to use them.
Regards,
Nursey
|
|
|
|
|
How can i make connection between optionbuttons and recordsets?
|
|
|
|
|
|
Hi..
I have created 3 different application.out of 3 ,one is taking care of "sales automation",second is "sales account" and last application is taking care of all MASTERS .so i want implement this in one deployment package.for example in oreder to implement in client side ,i would require a check box along with all this application name,where i can select which app is require and which is not require.so it would be easier for me to select app name accroding to users requirement.ex:an administartor might require all the application where as a normal user require only "Sales Automation" part,and a account person might require "Sales Account" part.In order to differentiate and implement i require all the application in a single deployment package other than having different 3 deployment package.
If any one know this ,please help me
Thanxs in Advance
|
|
|
|
|
I am just beginning serialization on .NET, having dealt with it many times before with other systems. I have been told serialization using the XML serializer is simple, and the documentation makes it appear so. But, do I have to make all my properties public? I create accessors for all properties, as its easier to debug things that way, and some of my properties are read-only. I can't go making my internal member variables public, that would be crazy, so what do you do about it?
(By the way, if you don't think it is crazy to make your member variables public, then how would you do range checking and protect yourself against corrupted data on de-serialization?)
I'm about to start writing my own serialization code for each class, so a quick guide would be really appreciated.
I don't care if its XML or binary format, I guess there's really not much difference from a coding point of view anyway.
Many thanks, and a Happy New Year to all.
Nursey
|
|
|
|
|
Can anyone tell me either API calls or VB.NET code to do the follow steps or items.
1. Start Windows Explorer. (ProcID = Shell("C:\Winnt\explorer.exe))
2. Size Window Explorer and set it's position.
3. Set Initial Folder.
4. Set Filter on files shown. (Not a must but would be nice.)
5. Recieve Event or know they have closed Window explorer with my ProcID.
Any assistance would be great.
Thanks
Don
Don Hamilton
VantageMed Corporation - Kansas City
|
|
|
|
|
hmm interop with internet explorer to create InternetExplorer object or
1) System.Diagnostics.Process.Create(...)
then API i suppose
2) FindWindow to find the window, and some other function to change the windows position SetWindowPos i think
3) is a command line switch
4) don't know
5) Process.Create returns a process object which, when the appropraite property is set, raises the Exit event
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
... and get special folders (windows folder) from System.Environment if you can't make it working by setting the filename to "explorer"
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
It seems there is a way to wrap text for a datagrid in .ASP and there is a way to wrap a header of a column.
Does anybody know is there is a VB.NET way to wrap text in a column?
Thanks,
cb
|
|
|
|
|
I also need this functionality. I've written a custom word wrap function, but the height of each row doesn't grow to show the wrapped text. This seems to be a real nightmare!
Don't worry, nobody lives forever.
|
|
|
|
|
It would appear that the best way tp do this would be to create a custom column class. Could anyone who's done this offer some help? I have a function that will do the word wrap based on a given width, font, and graphics object.
Don't worry, nobody lives forever.
|
|
|
|
|
Hi
I wrote a custom column style. The style only allows viewing, not editing. (Time is money, and money is something my client doesn't like parting with.)
The main problem is that the column style needs to return the preferred, and minimum, width and height for it's contents BEFORE the paint operation takes place. I fiddled this by making a fixed height, and then the form housing the datagrid resizes the wrapped column so that the sum of the column widths equals the datagrid width.
Too much code to include here, but you get the idea. Imperfect solution for an imperfect world. (Or is the world imperfect because people like me are willing to settle for less than perfection?)
Don't worry, nobody lives forever.
|
|
|
|
|
<code>Dim writer As XmlTextWriter = _
New XmlTextWriter("..\Sample0.xml", System.Text.Encoding.UTF8)</code>
|
|
|
|
|
there is a xml file: price.xml
<price>
<comdt>
<Tname id=0>AAA</Tname>
<Tprice>0</Tprice>
</comdt>
<comdt>
<Tname id=1>BBB</Tname>
<Tprice>0</Tprice>
</comdt>
</price>
the price is null,
now I have a array,arrprice(i),
arrprice(0) is AAA's price,
arrprice(1) is BBB's price,
How to use the arrprice(i) update the xml file?
I tried this way,
For x = 0 To 1
Set objprice = objDom.SelectSingleNode("//price/comdt"&[x]&"/Tprice")
objprice.Text = arrprice(x)
but it doesn't work.
Thank you!
|
|
|
|
|
Hi! I am in WAY over my head here and was hoping someone could help me out. I need a db that is like a time clock. Employees clock in and out, time is entered into table, and reports are run to show hours worked. I have no formal training in computers, so please bear with me One of my current problems is directing the data to the login or logout field. It only enters into the login field now. My next problem is that I need to tell the user his time is entered, and then refresh the form for the next user. I tried the Docmd.OpenForm, but it opens a new form on top of the previous one, creating quite a mess! I read about loop while or loop until, but...basically I'm clueless . One more problem---it doesn't always work. I don't see the rhyme or reason, but sometimes the time is entered, sometimes not, and sometimes it is entered for ALL employees. Can anyone help me? Please be gentle, remember, I am new to this!
The set up is:
tblStaff
StaffLoginName
StaffPassword
tblLoginRecords
LogStaffLoginName
LogPasswordEntered
LogINTime <---(all times currently enter here)
LogOUTTime
LogProblem (yes/no check)
frmLogin
bound controls: Your Name [LogStaffLoginName]
Enter Password [LogPasswordEntered]
(hidden) LogTime [LogINTime]
(hidden) LogDate [LogINDate]
Log IN (cmd8)and Log OUT (cmd 9) buttons (code follows)
(hidden) yes/no check box for LogProblem
___________________________________________________________________________
Private Sub Command8_Click()
On Error GoTo Err_CmdLogin_Click
If [LogStaffLoginName] = DLookup("[StaffLoginName]", "TblStaff", "[StaffPassword]=forms!frmlogin!LogPasswordEntered") Then
MsgBox "Your time has been logged.", vbOKOnly, "Login Confirmation."
DoCmd.OpenForm "frmLogin", acNormal
Else
Me!LogProblem = -1
MsgBox "Incorrect UserName or Password. Please try again.", vbOKOnly, "Login Error."
DoCmd.OpenForm "frmLogin"
End If
Forms!frmLogin.Visible = False
Exit_CmdLogin_Click:
Exit Sub
Err_CmdLogin_Click:
MsgBox Err.Description
Resume Exit_CmdLogin_Click
End Sub
Private Sub Command9_Click()
On Error GoTo Err_CmdLogout_Click
If [LogStaffLoginName] = DLookup("[StaffLoginName]", "TblStaff", "[StaffPassword]=forms!frmlogin!LogPasswordEntered") Then
MsgBox "Your time has been logged.", vbOKOnly, "Logout Confirmation."
DoCmd.Save acTable, "[LogOUTTime]", "tblLoginRecords"
Else
Me!LogProblem = -1
MsgBox "Incorrect UserName or Password. Please try again.", vbOKOnly, "Logout Error."
DoCmd.OpenForm "frmLogin"
End If
Forms!frmLogin.Visible = False
Exit_CmdLogout_Click:
Exit Sub
Err_CmdLogout_Click:
MsgBox Err.Description
Resume Exit_CmdLogout_Click
End Sub
__________________________________________________________________________
I know it's a mess now sorry. I see that in the form there are controls w/ LogIN times, but I am just not seeing the logic and how-to to seperate these and allow for logOUT times, while tying into the two seperate buttons. I hope that all made sense, and thank you to all for your attention!
Dazed and confused~~~Tiff~~~
I have no special talents. I am only passionately curious.
--Albert Einstein
|
|
|
|
|
Hello Tiff:
I have a didn't see a field for the date in the logins table and I think that in the same table you only need the user name to link this field whit the one in the staff table, to display only one time the form you can check if its display or use modal mode on when you display the from, one question what version of VB your using?.
JA
|
|
|
|
|
Hi JA! Thank you for looking The logINTime and logOUTTime are date and time fields. I thought this would be easier for calculations. They are set as 01/01/2004 12:00 in the same field.
I am using Access 2000 w/ VB6.
I have no special talents. I am only passionately curious.
--Albert Einstein
|
|
|
|
|
HI
I want to develop an interactive .net service that creates
a notifyicon at startup, so that the user can interact
with it (e.g. a double click on the icon in the systray
shall cause the service to react). So I placed such a
control in the service class and made it handle double
click events ..... but just nothing happens! When I
doubleclick the icon in the systray the appropriate code
in the service is not called and executed!!
can anyone help me??
mosquitooth
|
|
|
|