|
1. How do I dynamically generate a datagrid and trap the keyboard keys or mouse click in a datagrid cell?
2. How do I prevent from user to add more rows to datagrid?
3. How do I add the footer totals and change them according to the datagrid cell values?
Simpra
|
|
|
|
|
hi guys!
I'm working on a project now, i need to shut down windows XP via vb6 code.
Can somebody please help me about this subject?
|
|
|
|
|
Run the remote windows shutdown application using the "shell" command. The path for the application is:
C:\WINDOWS\system32\shutdown.exe
°[Halo]°
Project Basilisk
|
|
|
|
|
You can shutdown, and optionally restrat, the system by calling the Win32 API function ExitWindowsEx[^]
Declare Function ExitWindows Lib "user32" Alias "ExitWindowsEx" ( _
ByVal dwReserved As Long, ByVal uReturnCode As Long) As Long
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a vb.net project with a few web pages, in each of the pages they call a custom control type which has scroll bar built in, thats fine and when the pages call each other i can controll the call to the other page by adding scrollbars=no in the window.open call, but when i set one of the pages to set as start page how do i them control if a scroll bar appears?????
any ideas?
Thanks
|
|
|
|
|
Can't you set the .scrollbars = no in the form "Load" event?
Thanks,
Taen Karth
|
|
|
|
|
I have a vb.net project with a few web pages, in each of the pages they call a custom control type which has scroll bar built in, thats fine and when the pages call each other i can controll the call to the other page by adding scrollbars=no in the window.open call, but when i set one of the pages to set as start page how do i them control if a scroll bar appears?????
any ideas?
Thanks
|
|
|
|
|
Assignment #3
Q1. Which of the following is a valid condition for an IF …THEN…ELSE statement?
a. Val(txtage.text > 65)
b. Val(lblprice.text) > 0 AND < 10
c. curSales > 500 AND < 800
d. curCost > 100 AND curCost <= 100
e. UCase(strstate) = “Alaska” and UCase(strstate) = “Hawaii”
Q2. Evaluate the following expression: 3 > 6 AND 7 < 4
a. true
b. false
Q3. Evaluate the following expression: 7 >= 3 + 4 OR 6 < 4 AND 2 < 5
a. true
b. false
Use the following information to answer questions Q4 to Q8
X = 5, Y = 3, Z = 2, A = True, B = False
Q4. Evaluate the following expression: X * Z > X * Y AND A
a. true
b. false
Q5. Evaluate the following expression: X * Y > Y ^ Z
a. true
b. false
Q6. Evaluate the following expression: X * Y > Y ^ Z AND A OR B
a. true
b. false
Q7. Evaluate the following expression: A OR B
a. true
b. false
Q8. If the testexpression used in the SELECT CASE clause is the numeric variable curSales, which two of the following CASE clause is valid?
a. CASE 2, 4, 6, 8
b. CASE “1” TO “3”
c. CASE IS < “6”
d. CASE IS >= 8
e. CASE 4.5 Through 8.5
Q9. Assume the form contains two grouping objects(i.e controls). Each group object contains three options buttons. How many option buttons can be on at any time?
a. one
b. two
c. three
d. four
e. six
Q10. Assume the form contains two grouping objects (i.e controls). Each group object contains two check boxes. How many check boxes can be on at any time?
a. one
b. two
c. three
d. four
e. six
Q11. You can use the ____________ statement to invoke a user defined sub procedure.
a. CALL
b. DoProcedure
c. GET
d. INVOKE
e. ProcedureCall
Q12. The MsgBox function displays a dialog box that contains ____________
a. a message
b. one or more command buttons
c. an optional icon
d. all of the above
Q13. Assume IntCount is a numeric variable, what is the value of the IntCount when the loop stops?
FOR IntCount = 1 to 6
Lbldisplay.text = IntCount
Next IntCount
a. 1
b. 5
c. 6
d. 7
e. 8
Q14. Programmers call the ____________ loop a posttest loop because the condition is tested at the end of the loop.
a. DO… UNTIL
b. DO… WHILE
c. FOR…NEXT
d. a and c
e. b and c
Q15. Items appearing within the parentheses after an event procedure’s name are called ____________.
a. arguments
b. controls
c. indexes
d. properties
e. values
Q16. The ____________ statement turns the error trapping process on
a. Error
b. On Error GoTo
c. On Error Process
d. Process Error
e. Trap Error
Q17. Which of the following descriptions and filters tells Windows to display only project filenames – those ending in either .vbp, .mak, or .vbg?
a. “Project Files(*.vbp;*.mak;*.vbg)| *.vbp|*.mak|*.vbg”
b. “Project Files(*.vbp;*.mak;*.vbg)| *.vbp;*.mak;*.vbg”
c. “Project Files(*.vbp|*.mak|*.vbg)| *.vbp;*.mak;*.vbg”
d. “Project Files|*.vbp;*.mak;*.vbg)| *.vbp;*.mak;*.vbg”
Q18. If you invoke the UpdateAge procedure, passing it a string variable named strFriend and an integer variable named intAge, which of the following is a correct Private Sub statement for the UpdateAge procedure?
a. Private Sub UpdateAge( )
b. Private Sub UpdateAge(intAge as integer, strFriend as string)
c. Private Sub UpdateAge intAge as integer, strFriend as string
d. Private Sub (UpdateAge) intAge as integer, strFriend as string
yo
|
|
|
|
|
krugerkelly wrote:
Assignment #3
You're an idiot. You snooze while we do your homework for you? Who do you think you are?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is this becoming a big problem? I got into it with a poster on another site for something similar. They wanted someone to code their project for them and they offered to pay. The only outcome here is that this person will graduate and not know anything and get a job by lying then be someone's inept co-worker.
Cleako
|
|
|
|
|
I have an app i am working on that reads a .csv file to validate it.
here is the connection styring i am using to upload it:
Dim conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & pather & ";Extended Properties=""text; HDR=No; FMT=Delimited; IMEX=1\"""
The problem i am having is that i do NOT want the first row to be counted as a header, I even have it specified in the string, but without fail, it always loads the first row as one.
It is driving me nuts, am i missing something?
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
Well, using your code and my test file, I don't have that problem. But, you might want to clean up your connection string a little bit the part with the IMEX value is malformed.
Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\;" & _
"Extended Properties=""text;HDR=No;FMT=Delimited;IMEX=1"";"
Dim conn As New OleDbCommection(connString)
Dim comm As New OleDbCommand("Select * From TestData.csv", conn)
conn.Open()
Dim dr As OleDbDataReader = comm.ExecuteReader()
If dr.HasRows Then
Do While dr.Read()
Debug.WriteLine(String.Format("{0} - {1}", dr.GetValue(0).ToString(), dr.GetValue(1).ToString())
Loop
End If
conn.Close()
Are you doing something in your reading that is skipping the first row?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Not that i am aware of. here is how i am using it:
<br />
Private Sub btnUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpload.Click<br />
<br />
Dim conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _<br />
Session("pather") & _<br />
";Extended Properties=""text;HDR=No;FMT=Delimited;IMEX=1"";"<br />
<br />
<br />
If f = ".csv" Then<br />
xl = "SELECT * FROM " & filer<br />
Fill(xl, conn)<br />
End If<br />
End Sub<br />
<br />
Private Sub Fill(ByVal xl As String, ByVal con As String)<br />
<br />
Dim com As New OleDbDataAdapter(xl, con)<br />
Dim ds As New DataSet<br />
<br />
com.Fill(ds)<br />
com.Dispose() <br />
<br />
Me.DataGrid2.DataSource = ds<br />
Me.DataGrid2.DataBind()<br />
End Sub<br />
<br />
all i am doing at this point is grabbing the data in the .csv file and populating a dataset with it. No matter what i do, however, it keeps using that first row as a header, even with the cleaner connection string.
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
I tried it with this and found no problems:
Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\;" & _
"Extended Properties=""text;HDR=No;FMT=Delimited;IMEX=1"";"
Dim conn As New OleDbCommection(connString)
Dim da As New OleDbDataAdapter("Select * From TestData.csv", conn)
Dim ds As New DataSet
da.Fill(ds)
conn.Close()
conn.Dispose()
DataGridView1.DataSource = ds.Tables(0)
The DataGridView control replaces the DataGrid in 2002/2003. Since it can only display a single table at a time, you must specify which table in the dataset to bind to.
What's in the first 10 rows of this .CSV file? Could the data in the file be misinterpreted by the ISAM driver?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
the .csv files are pretty big, they have 39 columns with values ranging from decimals, to text, to ints and datetimes. I suppose that the driver may be having an issue with the sheer volume of information being selected.
The real pain in the butt is that if the users were being required to include the header field, none of this would be a problem.
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
I'll be damned if I can figure out what's causing it. I can get it to do everything perfectly, even tell it to use the first row as column headers, thereby duplicating your problem. I'd need a sample of the data to test it any further, only about the first 10 rows...
By any chance, have you installed the lastest MDAC[^]?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I can't for the life of me figure out why the hell it wasnt working. The syntax appeared correct....
Thanks for all of your help with this, i really appreciate it.
Want to hear the real kick in the cajones?
After 2 days of beating my head against the wall on this, I found out that i was trying to rewrite a function that had already been built and worked.... I was supposed to be tweaking the existing code, not writing a new page.
So, I ended up using code that had been previously written and worked.
At least we have along weekend to recover
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
I am a VB.NET learner and experienced in VB6.
I want to make a real life application/project using VB.NET application or database application using VB.NET as front end and SQL/Oracle as a database that should be different from general VB6 project and here I want to apply the extra features of VB.NET that is notavaible in VB6.
can u suggest me some good topics
I want to make something new/diffrent
so plz help me
|
|
|
|
|
I have to transfer some data from a public pc on to server.
I have tried using MSMQ but the problem is that we have to configuure firewall to allow messages to reach server.
How can i transfer data from client system through internet on to server without any configuration to server. (This is a Win application)
If i am not clear let me know.
|
|
|
|
|
That depends on the server type your trying to connect to and what ports the firewall will let through. Without knowning that, you're groping around in the dark.
Are you trying to connect to an FTP server? Upload a file to a web server? What kind of server is this?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Now i am using Web Services as http is allowed through firewall
|
|
|
|
|
Hi Buddy,
I want to do the same job in C#.Net [Winform to Web Forms]. I have no idea how i do this. Please if you please send me the example of it. I will be very thankful to you.
Yours Sincerely,
Muhammad Waqas Butt
waqasb4all@yahoo.com
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.waqasbutt.freewebspace.com
|
|
|
|
|
Create a simple function in the web service which do the data transfer either through dataset or xml files or any other medium. Then add refference of that web service to your project.
Remember: If WS is on a server then you have to pass the name like this "http://ServerIP/Service.asmx.
That it.
|
|
|
|
|
Hi all,
I have an application that has an OCX embedded and it writes a log during the session. From time to time I receive a "Runtime error 70" that is a permision denied error but I check the log file and it has the correct user access. The only concurrent access is just for reading from a different process but I don't write the file so it wouldn't be the problem.
As it's in a customer machine I can't debug it as it's in a remote machine.
Any idea or suggestion about what it could be?
Thanks in advance,
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Are you trying to read the file while it is being written to? Although this should generate an Access Deined exception, not Permission Denied.
Are you using MTS?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|