
LostProgrammer
Avatar/Signature-
Posts
125 -
Joined
-
Last visited
Everything posted by LostProgrammer
-
Anybody know how to cast sql money to a string or a decimal in vb.net? Need something like txt.Text = cType(sqlDataReader(col_Number), decimal) or use a number format string like txt.Text.Format = "{0:c}" Thanks for the help.
-
I have a application I would like to send to the System tray when the minimize button is clicked. I can send the application to the system tray, I just cant send it when I click the minimize button. What event or function do I use to catch a form being minimized. Thanks LP
-
I want to setup a intranet messenging program. Using the command Net send #machinename# #message# Thanks LP
-
Is it possible to call a dos command in vb .net? Thanks LP
-
Yea it puts a squiggly blue line under anything related to Directx.
-
Last night I downloaded the 222mb directx 9 SDK. When I open up Visual Studio .net I can not import Microsoft.Directx. Am I missing somthing? LP
-
Can anyone point me to some good tutorials on how to use Crystal Reports .net? Thanks much LP
-
All the programs I write need some form of authentication. Generally I create a users table in SQL server that authenticates for me. What I am thinking would be nice though is if I could somehow authenticate my users using NT's domain authentication. So I guess my question is this, can I pass a username and password from my .net program to my authentication server somehow so that it will tell me if this person is a valid user or not? By doing it this way all the users passwords would be dynamic and change when there server passwords change. Where as right now if they change there server password I have to manually go into my SQL Users table and manually reenter the password cause they like the passwords to match. Any ideas? LP
-
I am trying to setup a datagrid but I keep getting this error: An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll Additional information: Object reference not set to an instance of an object. Here is my code: The error here : dGridOneDay.TableStyles.Add(dGridTableStyle) Dim adaptOneDay As New SqlClient.SqlDataAdapter("Select logtime, username from timelog", conSql) Dim dsOneDay As DataSet Dim dGridTableStyle As DataGridTableStyle Dim dGridColumnTime As DataGridTextBoxColumn Dim dGridColumnUser As DataGridTextBoxColumn dGridOneDay.DataMember = "TimeLog" dGridOneDay.DataSource = dsOneDay dGridOneDay.HeaderForeColor = System.Drawing.SystemColors.ControlText dGridOneDay.Location = New System.Drawing.Point(8, 152) dGridOneDay.Name = "dGrid" dGridOneDay.Size = New System.Drawing.Size(272, 208) dGridOneDay.TabIndex = 2 dGridOneDay.TableStyles.Add(dGridTableStyle) 'dGridOneDay.TableStyles.AddRange(New System.Windows.Forms.DataGridTableStyle() {dGridTableStyle}) dGridOneDay.Visible = False dGridTableStyle.DataGrid = dGridOneDay dGridTableStyle.GridColumnStyles.Add(dGridColumnTime) dGridTableStyle.GridColumnStyles.Add(dGridColumnUser) ' dGridTableStyle.GridColumnStyles.AddRange(New System.Windows.Forms.DataGridColumnStyle() {dGridColumnTime, dGridColumnUser}) dGridTableStyle.HeaderForeColor = System.Drawing.SystemColors.ControlText dGridTableStyle.MappingName = "TimeLog" dGridColumnTime.Format = "MM/dd/yyyy hh:mm tt" dGridColumnTime.FormatInfo = Nothing dGridColumnTime.HeaderText = "Log Time" dGridColumnTime.MappingName = "logTime" dGridColumnTime.Width = 150 dGridColumnUser.Format = "" dGridColumnUser.FormatInfo = Nothing dGridColumnUser.HeaderText = "Username" dGridColumnUser.MappingName = "username" dGridColumnUser.Width = 75 adaptOneDay.Fill(dsOneDay, "Timelog") For the life of me I do not know why.... Thanks Lp
-
****Ugh this was supposed to be a reply to my previous post on datagrid woes... Sorry for the spam***** Resizing doesnt help, I dont really have any code to put forth. I used a sqldataadapter wizard to create my connection and dataset. I then bound a textbox to my time field and bound the time field to my datagrid. I have a button on the form that when pushed fills the sqldataadapter1.fill(mydataset) When it is done filling my textbox shows time as 11/03/81 11:45 pm and my datagrid shows the same field as 11/03/81 Kinda a strange one that I really am confused on. Thanks much! LP
-
Well last night I made a tic tac toe game, works like it is supposed to and the AI seems to work like it should. I guess I would like to try a new game and I was thinking of doing tetris. My question is where should I start? I dont have a clue on how to setup a animation on a program. I think if I knew what kind of object .net uses to do animation I might beable to slowly figure this out. Also my problem might be I just dont have a clue on how animations work in programs :D Anyways sorry to bother you all with my silly questions. Hope everyone is having a good monday! Take care LP
-
Here is my problem, I have a dataset with a datetime column in it. I create a form with a textbox, a datagrid and a button. When the button is pushed it populates the textbox with the first datetime in the dataset and the datagrid is populated from the dataset. So what happens is the Textbox text changes to somthing like this: 11/23/02 10:53 AM The datagrid column for the same data populates like this: 11/23/02 My question is how do I make my datagrid show the entire length of the time. I want it to show what the textbox shows. The purpose of this program is to verify login and logout times. As of right now the datagrid is worthless to me, I am really lost on this one. Can anyone throw me a line? Thanks so much LP
-
DataAdapter Configuration wizard not working :( When I get to the screen where it asks me to choose a connection, I hit the New Connection button. After clicking the button nothing happens. I am using a academic version of visual studio .net. Anyone have any ideas on why this is not working for me? Or what I should do to fix it? LP
-
Well done for the day atleast! All the programs I always write are very simple in the sense that the user runs them. They enter data and then close the program. I just got the info on how to make the program run in the system tray. What I would like this program to do is while sitting in the system it would pop up a reminder to do somthing with say a message box. Like at 11:55 am it would pop up a reminder saying "Hey dont forget to log out!" I can honestly say I do not have a clue on how to achieve this. I tried to make a while loop: while (alarmTime <> system.datetime.now) obviously this did not work, it just put a really long loop on my machine until that time was achieved. Can anyone throw me in the right direction, or point me to some good info on how I write a program like this? I just dont think I am thinking properly about how this program should be solved. Thanks so much LP
-
Thank you very much Hey that is perfect! Exactly what I needed, thanks so much! LP
-
I would like to setup one of my programs to minimize down in the system tray and then when clicked it reopens back to the user. I searched around but could not find anything on this, could anyone throw me a idea on this, or maybe a website that gives some info on how I might acoomplish this. Thanks much LP
-
Once again I cant thank you all enough for all the help you guys and gals have provided me with on previous questions. My question for today is kinda a goofy one, one of my programs authenticates users through a sql table I created with a username and password field. If they are in the table boom they are authenticated. What I would like to do is instead of having them have to enter a username and password could I somehow take my NT authentication. Im guessing maybe there is a class I can import and play around with, does anyone have any ideas? It would be neat to beable just run the program and in the background it pulls nt authentication from the server to determine if that username and password they supplied when they first logged onto there computer was correct. Thanks for all help again LP
-
Its deffinatly not a network issue, cause I just tried copying the exe to the machine locally and they have very similiar performance. Actually I can not tell the difference between the local copy and the intranet copy. Soooo I am guessing I need to precompile the forms, because its not my code that is slow (its only like 100 lines) but its the startup that is so slow. So is there a way to precompile the forms so that it will speed up the startup of the program for my users? Oh and I have heard of ngen, but I was not sure how to use it. Does anyone have any links to some useful info on its use? Thanks for all the help LP
-
Last question, I promise.:D I have the app up and running and I placed the .exe file out on a network drive. I then created shortcuts for 8 machines to run the program and log there time. 5 of these machines are windows 98, 2 are 2000 and 1 is xp. The one that runs xp executes the program (displays the form) in about 4 seconds. The 2000 machines execute in usually 5- 20 seconds. The 98 machines execute in atleast 30 seconds - 2 minutes time. The executable file is only 30kb, I just can not figure out why it would take so long to start up this program. I am wondering if I have to compile the program in a special way or set some options so that it can start the program faster. My best guess is that when the icon is clicked the program is compiled and is running in some kind of verbose debugging mode or somthing and this is why it takes so long for certain machines to start it up. Can anyone help me out, I am kinda trialing .net for my company to see if we want to jump to it. My boss is kinda nervous when he sees a 30kb .exe file take 2 minutes to open, it makes him a bit jumpy. Oh I almost forgot, once the program displays, you can enter data and what not extremely fast. It is just the startup. Thanks for all the help LP
-
problem with my program
LostProgrammer replied to LostProgrammer's topic in Database / XML / Reporting
Wooo that code worked! Thanks very much, that takes care of that problem! Thanks LP -
Hello everyone, thanks for the help on my last problem. My problem is this. When I pass my variables to the sql server, one of the strings has a chunk of text and if the user puts a ' in the string it makes my program crash. So lets say the user enters for my string variable reason = "Didn't make it on time" the ' in didn't would crash my program. Here is my code. commsql.CommandText = "INSERT INTO TIMELOG ([uSERNAME],[LOGTIME],[REASON]) VALUES ('" + username + "','" + loginTime + "','" + reason + "')" Anyone have any ideas on that one? Thanks much LostProgrammer
-
My first time to forum and I have a question for everyone. This is probly a easy question, but I am completely lost. I made this stored procedure in SQL CREATE PROCEDURE procGetSystemDate AS DECLARE @SQL nvarchar(100) Select @SQL = "SELECT GetDate() AS SysDate" EXEC sp_executeSQL @SQL GO Very simple, when executed it returns the current date/time from the server. I would like to beable to call this procedure in VB .net and store the time in my own vb.net datetime variable. Im clueless on how to do this. Here is my latest attempt at getting the variable. Dim curTime As DateTime Dim cmdSql As New SqlClient.SqlCommand("procGetGystemDate") Dim conSql As New SqlClient.SqlConnection() Dim rdrSql As SqlClient.SqlDataReader conSql.ConnectionString = _ "Integrated Security=True;Data Source=10.10.1.47;Initial Catalog=TimeLog;" cmdSql.Connection = conSql conSql.Open() rdrSql = cmdSql.ExecuteReader(CommandBehavior.CloseConnection) rdrSql.Read() curTime = rdrSql.GetDateTime(0) lbl.Text = curTime rdrSql.Close() So anyways I dont think I am even close to getting this right, I have never used procedures before. Anyone have any ideas? LostProgrammer