|
sorry it's not show the underline i put tag but it not show.
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
allStands = new List[] { Stand1plates, Stand2plates, Stand3plates };
// Stand2plates.Add(3);
}
List[] allStands;
List Stand1plates = new List();
List Stand2plates = new List();
List Stand3plates = new List();
private void MoveFromTo(int source, int dest)
{
int top = allStands[source-1][allStands[source-1].Count - 1];
allStands[source - 1].Remove(top);
allStands[dest-1].Add(top);
RedrawPanels();
}
=================================
I change it to VB.net as bellow:
Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
' Stand2plates.Add(3);
allStands = New List() {Stand1plates, Stand2plates, Stand3plates}
End Sub
Private allStands As List(Of Integer)
Private Stand1plates As New List(Of Integer)
Private Stand2plates As New List(Of Integer)
Private Stand3plates As New List(Of Integer)
Private Sub MoveFromTo(ByVal source As Integer, ByVal dest As Integer)
Dim top As Integer = allStands(source - 1)(allStands(source - 1).Count - 1)
allStands(source - 1).Remove(top)
allStands(dest - 1).Add(top)
RedrawPanels()
End Sub
End Sub
VB.Net
|
|
|
|
|
I am trying to develop a ambitious program, that moves a telescope and much more. I need to access the ascom interface. It is accessible with vbscript 5. I understand I need to call a vbscript from within my vb2005 program and have the control return back to the program. I understand this is done using a thread.
Can someone point me in the right direction?
modified on Friday, August 22, 2008 11:15 PM
|
|
|
|
|
Do you have the script to run as a .vbs file? You can run the .vbs file by executing cscript.exe and passing the name of the .vbs file as an argument. Check out the System.Diagnostics.Process class. Also, that class has a WaitForExit() method which will allow the .vbs script to finish executing before returning control to your VB program.
|
|
|
|
|
I am working with VB.Net 2005 and I am re-writing a small program that was in VB6 format. I currently have a Dataset looking at my Access database. In the old code it used these statements to look at the database.
Public dbComp As DAO.Database
Dim qdf As DAO.QueryDef
Dim tdf As DAO.TableDef
The routine that I am working with looks at the database (dbComp) and it deletes quries and creates them and then populates them.
I am hoping that I can use my existing Dataset that I created instead of using these DAO connections. Can anyone help me out with this? I just need to know what I can use in .Net in place of those commands above.
Thank you in advance for any help you can provide!
|
|
|
|
|
You can certainly use ADO.Net and OLEDB via DataSets and DataViews to retrieve, update, insert or delete records in an Access database from .Net.
However, you can not use ADO.Net to create an Access database, or any of the objects (tables, queries, etc.) in an Access database. One way to create an Access database and table objects from .Net would be to first create references to, and corresponding InterOps for, Microsoft ActiveX Data Objects. I imagine that a google will turn up lots of examples on creating Access databases and tables from .Net after making the proper references to ActiveX Data Objects.
Good luck with your project.
|
|
|
|
|
Another way to create an Access database without all of that hassle:
If you know the basic structure of the Access Database, then you create the basic 'template' in Access and then embed the database into your application. Then through the use of File.IO and Reflection you can stream the template to a local file for alteration. (It is simpler than it may sound).
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
hi evryone
i am developping a window application and i need to use the crystal report to generate reports
i have 2 databases named : Butterfly and Butterfly_Test
Butterfly is used to real Data
Butterfly_Test is used for testing
i am using this code to load the report
Dim myDbConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
With myDbConnectionInfo
.ServerName = Glbl_Conn_Config.Server_Name
.DatabaseName = Glbl_Conn_Config.Database_Name
.Password = Glbl_Conn_Config.Password
.UserID = Glbl_Conn_Config.Login
End With
Dim myTableLogonInfo As New CrystalDecisions.Shared.TableLogOnInfo
Dim myDatabase As CrystalDecisions.CrystalReports.Engine.Database = My_Report.Database
Dim myTables As CrystalDecisions.CrystalReports.Engine.Tables = myDatabase.Tables
Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
For Each myTable In myTables
myTableLogonInfo = myTable.LogOnInfo
myTableLogonInfo.ConnectionInfo = myDbConnectionInfo
myTable.ApplyLogOnInfo(myTableLogonInfo)
Next
'
' Get the report parameters collection.
'
crParameterFieldDefinitions = My_Report.DataDefinition.ParameterFields
' Add a parameter value - START
crParameterFieldLocation = crParameterFieldDefinitions.Item("@Language")
crParameterValues = crParameterFieldLocation.CurrentValues
crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
crParameterValues.Clear()
crParameterDiscreteValue.Value = 1
crParameterValues.Clear()
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldLocation.ApplyCurrentValues(crParameterValues)
Me.CrystalReportViewer1.ReportSource = My_Report
Me.CrystalReportViewer1.PrintReport()
evrything work fine when Glbl_Conn_Config.Database_Name = Butterfly_Test
once i changed into Butterfly i have an error on loading report:
Procedure or function SP_Select_All_User Expect Parameter @Language
Can please any one help me
waelhawari
|
|
|
|
|
Waoula,
Check the connection type your report uses internally when you designed it. Crystal likes to flake out when using certain connections. Try using the OLE DB (ADO) connection as a datasource when designing the report. Easiest way to change the datasource internally is by using the Set Datasource Location function, otherwise you will have to recreate some of the report.
Let me know if that helps at all.
|
|
|
|
|
Is there away for us consumers to take back control of our mice? What I am referring too is the middle "scroll wheel." I am totally fed up when viewing a web page and trying to scroll down, where suddenly my mouse becomes stuck in quick sand and "recovery is futile." I have to move the mouse out of the little advertising window before my scroll wheel will work again. This is hijacking plain and simple and I would like full control of my mouse at all times. HELP!
PS: I think the feature is something to do with "disabling flyouts" but I am not positive.
Dennis
|
|
|
|
|
This site is not for troubleshooting consumer issues. This site (and especially this forum) is meant to assist in programming issues. If you are a programmer and you are having issues regarding this in your own code then the forum might be able to help, otherwise don't post here.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
I'm looking for a solution using VB 2003, 2005, or even 20008 to prevent other applications from taking control of my mouse. Do you understand know what I am looking for now?
This has nothing to do with troubleshooting or repairing a consumer application such as IE7. It is about using an appliction development tool such as VB.net to prevent other applications from taking control or disabling functions "of a mouse in particular".
And by the way, I am still in the process of learning VB. I own VB 2005,and 2008.
Now, if you can't answer my question properly then maybe you should not post here.
|
|
|
|
|
This is what I was under the impression of your original message(as well as other members based on what I have been reading):
Some random consumer who is getting really frustrated with their computer suddenly stumbles upon a programming website and expects the computer nerds to answer the frustrating question without the said consumer paying attention to any of the rules of this site.
Now that you have mentioned VB and it can inferred that you are actually trying to create a solution accordingly, here is my answer: the interaction of flash and web web browsers cannot be tamed through any programming solutions. Flash advertisements have a mind of their own and the only way to prevent these annoyances is to speak with the website that has those advertisements (not the CodeProject). The other option would be to write your own web browser and handle everything yourself with regards to these said interactions.
Dennis Lokken wrote: Now, if you can't answer my question properly then maybe you should not post here.
Just because you are a new member and this is your first forum thread, does not give you the right to disrespect any members who have been here much longer than you have. Learn proper netiquette and people will be more willing to help you.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Thank you for the information. I apologize for the rather negative comments earlier, but another poster kind of set me off and put me in a rather bad mood this morning.
I must say that I am rather suprised that there not a way in VB to intercept "browser commands,flash, or whatever the culprit is,etc."
My earlier thoughts were that VB could monitor any calls to the mouse functions in the BIOS and if the calls were by programmatic control rather than an by actual hardware"mouse" call that VB could possibly prevent or intercept the attempted access. Of course, I was also assuming that the VB program would probably have to run as a service in the background. Now that I know this is not possible I will try and think of another VB project to work and learn on...hopefully simpler too.
Thanks again for your response.
|
|
|
|
|
First off, assuming the other poster you speak of was still in this thread: nothing they said was out of line, and either way do not let anything said in the forums go to your head unless you are really trying to abuse the system (which, I must admit, was my initial impression of your first few posts).
Second, you seem to have a few things mixed up with VB.
1)None of the languages are really meant to target the bios. Languages are meant to extend the operating system.
2)Through Windows API you can create listeners for events similar to what you are speaking of, but VB is not the best language to do this. C++ would be more better language for this task. However, since you are a beginning programmer I would not tackle API listening this soon.
3)VB programs can run as a service or background program, but you need look into it more. It is possible, but I would still suggest you look into a simpler program to start your programming off.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Thomas Stockwell wrote: nothing they said was out of line
Very true.
Thomas Stockwell wrote: trying to abuse the system (which, I must admit, was my initial impression of your first few posts).
That was my initial thought as well, so that's why he got the replies he did from me.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
What does this have to do with VB.NET? You sound like you are totally in the wrong forum.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hey jerk, why don't you get a life? If you can't answer a question then don't reply. Can even you understand this?
Whats it got to do with it? It's seems elementary, I want a VB solution that prevents any other application such as IE7 or IE6 or Firefox from taking control of my mouse.
Do you get it know? Or should I type slower just for you?
|
|
|
|
|
Dennis Lokken wrote: Can even you understand this?
I would have if you would have had the brains to mention wanting a VB solution in the first place
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I would think it should have been obvious even to people with limited intellegence that I wanted a VB solution being as I posted in a VB forum. That should have been your first clue.
Now, lets move on. I want a solution, not retorical nonsense.
|
|
|
|
|
Dennis,
Calling Paul a jerk is really not nice. He's a really cool guy and since you did not say aything at all about looking for a solution in VB in your original post, how was anyone supposed to know?
Jeff
|
|
|
|
|
I respect your opinion. However, I don't think his original reponse was appropriate nor were his favorite quotes.
And persoally, I think he owes me an apology.
I have been programming for over 30 years and I have never treated anyone with the disrepect, Paul, has shown me.
Also, I have been a member on this site for well over a year and I have never seen any such disrespect and untasteful comments posted by other forum members.
Also, It doesn't require a "rocket scientist" to figure out that if somebody is posting in a VB.net forum then he/she is most likely "and it should be quite obvious and should be readily assumed" looking for a VB solution rather than jumping to some other conclusion.
Or should one waste time and put (VB) in every sentence of a vb.net posting. I can do that if that is what is expected. I can even put (VB) every other word if neccessary.
And I will be happy to argue my point until the end of time.
|
|
|
|
|
Dennis Lokken wrote: appropriate nor were his favorite quotes.
I could really careless if you don't like my sigs. Each to his own.
Dennis Lokken wrote: have never treated anyone with the disrepect
Sure, calling me a jerk, it just goes to show.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Dennis,
I don't feel that Paul did disrepect you. I have talked with him and he's a pretty alright guy. Maybe you should get off of his case. You should just let this go, because this kind of behavior you are exhibiting will not get you far in these forums acting like this.
Jeff
|
|
|
|
|
csciwizard wrote: don't feel that Paul did disrespect you
Thanks, Jeff. I wasn't trying to disrespect the guy at all. Just his OP was off or subtle or whatever. The real disrespect is calling me a jerk in the other post. Again, don't let it bother you.
PJC
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Dennis Lokken wrote: I have been programming for over 30 years
Using what, with 30yrs experience I would have thought you would have gained a deeper knowledge of what an OS and development platform can do, unless of course you have spent that time on a non windows platform!
Dennis Lokken wrote: Or should one waste time and put (VB)in every sentence
Now see if you answered some of the questions in the forums (as Paul does) you would come to expect what sounds like an idiot question, they turn up daily. This is the 3rd I can recall this week where someone wants to manage the OS with VB, always newbies, so the response you got was reasonable.
Never underestimate the power of human stupidity
RAH
|
|
|
|