|
I would highly recommend picking up a book on VB.NET and SQL Server and working through them before taking this project on. The code you're written so far is terrible and if you continue to use the techniques you've demonstrated so far, your project is going to fail miserably.
Amazon results[^]
|
|
|
|
|
I have recently read a VB book, as you can imagine, i am a complete novice when it comes to vb and programming. I have written this piece of code. I was wondering if you could tell me if this would create a valid connection or not.
Imports System
Imports System.Data
Imports System.Data.SqlClient
Public Class frmLogin
Public sqlconnection As SqlConnection = New SqlConnection("Data Source=TG-IT-TPSRV;Initial Catalog=AFQ;User ID=sa;Password=;")
Public Sub frmLogin()
Dim sqlConn As SqlConnection = sqlconnection
Dim sqlComm As String = ("SELECT * FROM Users")
End Sub
Private Sub BtnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
Me.Close()
End Sub
Public Sub Logon_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub BtnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
Dim sConnectionString As String = "Source=TG-IT-TPSRV;Initial Catalog=AFQ;User ID=sa;Password=;"
Dim objConn As New SqlConnection(sConnectionString)
Dim sqlComm As String = ("SELECT * FROM Users")
Dim objComm As New SqlCommand(sqlComm, sqlconnection)
objConn.Open()
End Sub
End Class
|
|
|
|
|
Yeah, it would create a connection, but your design is going to cause you problems down the road.
|
|
|
|
|
Hi!
Have made an application in vb.net visual studio 2008.
Need some help to use a splash screen, that waits for about 4 seconds before it
show the main form. And of course close the splash screen...
Have Added the splash screen to my project, but thats it.
And the splash screen is loaded, but need to set timer and to start the main form..
Please help me with example source on this one..
Thanks
|
|
|
|
|
On your main mdiForm in the Load event show the splash screen
Private _splash As SplashScreen
Sub Form_Load() Handles Me.Load
_splash = New SplashScreen
_splash.Show(Me)
End Sub
Then in the Shown event close the splash Screen
Sub Form_Shown() Handles Me.Shown
_splash = New SplashScreen
_splash.Close
_splash.Dispose
_splash = Nothing
End Sub
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
2008? There's a Splash Screen component built in. All you have to do is right-your project in the Solution Explorer, and click Add New Item... It's in the list that shows up. Everything is already done for you.
|
|
|
|
|
Thanks You
when apllication in on that time first the splash screen show and hold for a moment than after the mdiform to display that are not happen please if u have a solution so please help me and if u have a code so that's also give it please
|
|
|
|
|
I already gave you the solution.
|
|
|
|
|
i want's to ask that i can hold splash screen for a 5 second and all other this are done but the splash screen can't hold for some moment i want to try but that's not work please help for that propblem
thanks
|
|
|
|
|
Show your splash screen form and then call Thread.Sleep(5000) .
|
|
|
|
|
thank for this advices but...
That's also i done but on that time the splash screen are not look proper
that's look like some process are happen hear that's not possible other wise i will give u printscreen but when i will try but on the process are occoure so the splash screen are not show in that printscreen only the backgroud are show
|
|
|
|
|
You didn't use the SplashScreen component, did you?
|
|
|
|
|
I use the Slash Screen Componet
Hear We put the what to do i in my project
1) Add the Splash Screen component in my Project
2) That's define as StartUpForm
3) Than i Code in Splash Screen that's below
remarks : form1 is mdiform
Dim showForm As New Form1
Me.Show()
Me.Activate()
System.Threading.Thread.Sleep(5000)
showForm.ShowDialog()
4) if i didn't Write the me.show the splash Screen form are not show that's the me.show and me.active are define
5) in that time the splash screen are show but that's display not perferct that's look like when some process are occoure in backgroud i want's to display splash screen in perfect
please help me
|
|
|
|
|
hi can u suggest me that the tools for converting vb source code to vb.net.
|
|
|
|
|
You really should start again and rewrite from scratch, to ensure you take full advantage of the .NET Framework and the OO capabilities.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
thnx Steven but i dnt have tht much of time its urgent so i m trying for conversion tool
|
|
|
|
|
Why is it urgent to convert it? If you need to urgently add something, do it in VB.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Visual Studio 2005
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Use the Visual Studio.NET to do it. Tools Menu -> Upgrade Visual Basic 6 Code...
|
|
|
|
|
i used my first form as a startup screen of pc.After enter password you can able to enter into my desktop screen.I need disable taskmanger here for to stop user to end this peocess from taskmanger.
so i need code to disable taskmanger in vb.net
|
|
|
|
|
This sounds allot like a malware program.
I don't think there is a way to disable the taskmanager since that would be taking control of the pc away from the user.
Nor do I think anyone here will help you do this since it could potentially be used for viruses and spyware
|
|
|
|
|
You can use registry and disable the task manager. that value is store in policies. u can use this registry disable the taskmanager.
Registry path "Software\Microsoft\Windows\CurrentVersion\Policies"
and remember 0-Enable and 1-disable
Don't use for bad purpose.
|
|
|
|
|
hi
thanks for reply,i try it but it doesn't work.
|
|
|
|
|
TaskManager can only be disabled through policies. I'm not going to tell you how to do it because it's too easy to use the technique for dubious purposes.
|
|
|
|
|
hi;
thanks for reply.i need it in stand alone pc. i am developing a cybar cafe software in vb.net.So i do not grant permission to user to access my computer without successful log in.
An user can press alt+ctrl+del to close my application.for that i need to disable the task manger.
How can i do it programatically by .net?
Thanks in advance
Anup
|
|
|
|