Answer Questions
Aaron Silverwatch Error using Math.Floor()
Hi again. in the JScript i was converting to VB i got an error that i dont have a solution to. the code is: jd = Math.Floor(jd) + 0.5 . whe the program runs i get the following error message: System.Reflection.AmbiguousMatchException was unhandled by user code Message="Overload resolution failed because no Public 'Floor' can be called without a narrowing conversion: 'Public Shared Function Floor(d As Decimal) As Decimal': Argument matching parameter 'd' narrows from 'String' to 'Decimal'. 'Public Shared Function Floor(d As Double) As Double': Argument matching parameter 'd' narrows from 'String' to 'Double'." Source="Microsoft.VisualBasic" StackTrace: at Microsoft.VisualBasic.CompilerServices.Overlo ...Show All
Jesús López plz help me
Can i design a website through vb.net Hi Yes & upcourse you can designe a web site with VB.NET, C# .NET and J#.NET. for further detail http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/cpconaspnetapplicationwalkthrough.asp ...Show All
Martin Hart Turner Textbox Focus From Form Load
I am trying to focus a textbox when the form loads. Although TextBox.Focus() works with most events, It do not work when in form load or activated. I would be grateful for help just to add, tried doing this in the form Shown event The problem with the Load event is it is one event in a series of events currently in the queue. Calling a Focus method while processing the Load event means any subsequent Focus-changing events in the queue will simply overwrite it. The other problem is the Load event is one event in a series of events that occurs when a Form is created, loaded, and displayed. At the time of the load event not all of these events that will occur are in the queue yet. In the same ...Show All
xRuntime Not Checking and What is this Error?
I'm pulling my hair out on these 2 problems! How Come this does not get ticked I have as a menu None White Black ------ Custom For the transparency color of a form. When the form loads it loads each one of these (wether it's ticked or not and sets it's property accordingly). When it loads... it does nothing! The transparency gets set correctly but these do not get ticked! I also have more menus for forecolor and back color and they work fine and they use the same type of code. This does not make sense, i know the If is following through because a msgbox comes up when the form loads. If GetSetting("My_Program", "Program_Options", "Trans_Col-None", True) = True Then UnTickAll_TransCol() "Untick ...Show All
Emadkb Can't add DLL's from GAC through References-Add Reference
Hi all, I need added a DLL to my GAC (C:\Windows\Assembly) but when I want to add a reference to this newly added DLL I can't seem to add through right-clicking on 'References->Add Reference' and then selected the 'Browse' tab in the 'Add Reference' dialog. I can locate the dll, but when I click 'OK', nothing happens. Any ideas I agree with you and think it is a shame that there is no easy way to directly reference an assembly in the GAC if it’s not on the provided list. As for why you cannot select it when browsing to C:\Windows\Assembly... look at the folder again in the Windows shell... it’s not a traditional folder that you can so easily access as it is really an app known as the Assembly Cache Viewer and that provides a ...Show All
zoki977 VB2005 Code Sample to handle restaurant operation
Hi, I was wondering if anyone has found on the Internet VB.NET code to handle the day to day operation of a restaurant/bar I can learn from. Functionality to look for would be: - Table Reservations - Handling of the food menu - Inventory handling - Billing - Printing on different ticket printers I'm just looking for samples, either using Access or SQL Server. Thanks, ST Hi The best thing is that You create Yourselves a VB 2005 application cause knowing the restaurant job only You can create an proper architecture realy functioning. With time You can improve the preformance of it till to make it a solid app. In my job I have made proper really good vb applications cause i know the job first. just to ad ...Show All
Picasso Problem with GetChanges() from a DataTable Object
I am trying to find out if a DataTable object has any changes that need to be saved to it's SQL Database using the Update() method. I looked throughout the properties of the DataTable object and can't find a Dirty property. But I did find a GetChanges() method. Problem is whenever I execute the GetChanges() method, which claims to return a DataTable of records that have been modified, I get the following error: MissingMethodException was unhandled No parameterless constructor defined for this object. Does anyone know why this is Or better yet, anyone know how I can accomplish what I am trying to do Me.DataSet.HasChanges() returns a FALSE, even when changes have been made. You don't...it is a common error though... ...Show All
Salim Hemdani Conversion from .Net 2003 to .Net 2005 using VB.Net
We've just received .Net 2005 upgrade and are in the process of converting two projects. Both Projects have User Controls and we are having some issues with them. 1st, one of the user controls has 2 classes in it and the conversion moved the declarations from the class into another file, but not the code. Is there a way to convert a user control that has two classes without it doing this 2nd, We are getting errors on all the user control names. This error comes up: "Type uc_mc_btn_footer is not defined." Can anyone please tell me why we are getting this error when it seems all the user controls (except the one with 2 classes) seemed to convert correctly - adn how to fix it 3rd, where did the bin directory get moved to ...Show All
louissan round down function
is there any function can do round down. eg. 127.35 round down to 120.00 Like so: System.Truncate(127.35 / 10) * 10 -- SvenC well ya.. just divide by 10 and use the standard rounding function dude.. Regards Ahmad Microsoft Student Partner - India ...Show All
Aistina Complex Operations with DateTime
Hi, I have a datetime var to which I would like to substract "x" minutes but I don't get the correct datetime result, for example: 23/11/2006 02:25:10 p.m. and I need to substract 10,434 minutes so I can get the starting date: Dim xDate as datetime = Cdate("23/11/2006 02:25:10 p.m.") Dim xNewDate as datetime = xDate.addminutes(-10434) xNewDate= 16/11/2006 08:31:10 a.m. If 10,434 minutes = 7 days, 4 hours and 24 minutes then the correct date should be: 16/11/2006 10:01:10 a.m. What am I doing wrong Thanks in advance. George the result I am getting is actually 15/11/2006 20:31:10 Dim theDateTime as new DateTime(2006, 11, 23, 02, 25, 10) theDateT ...Show All
DarkAurora Stopping a timer from ticking (VB, VS05)
I am using this code to try automatically stop the System Process MDM as part of a project I am working on; Private Sub AutoCloseMDM_CheckedChanged( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AutoCloseMDM.CheckedChanged If AutoCloseMDM.CheckState = CheckState.Checked = True Then Dim T As New Timer T.Interval = 600000 T.Start() AddHandler T.Tick, AddressOf AutoStopMDM If AutoCloseMDM.CheckState = CheckState.Checked = False Then T.Stop() End If End If End Sub Private Sub AutoStopMDM( ByVal sender As Object , ByVal e As System.EventArgs) Try StopMDM.ServiceName = "MDM" StopMDM.Stop() Catch EX As InvalidCastException MessageBox.Show( "Invalid Cast Exception" ) Catch Ex A ...Show All
MichaelEaton In need of help with RawPrinter and Win98
I use the RawPrinter class, as per MSDN discussions. This has printed perfectly well from a Win98 client to a shared printer on a WinXP machine. I now get error 120 when I try to run the OpenPrinter. All I know is that we have re-installed Win98 on the client, but I cannot find any info as to what might be generating the error. I can print to the WinXP printer from a WinXP client, just not Win98. Any suggestions My calls are ar per previous discussions in the area: <DllImport("winspool.Drv", EntryPoint:="OpenPrinterW", _ SetLastError:=True, CharSet:=CharSet.Unicode, _ ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _ Public Shared Function OpenPrinter(ByVal src As Strin ...Show All
asiaindian Trouble with blanking and GDI...
I'm using a Graphics.FromHwnd to DrawImage to a PictureBox control on my form, but whenever the form loses focus, whatever gets drawn gets blanked out. How can I fix this Crimony, I posted the solution I discovered the same time you did. Sorry there, and thanks. ^_^ You should attach a handler to the Paint event of the PictureBox control and DrawImage from it. If you draw on a Graphics returned from Graphics.FromHwnd your drawings will be overwrittent by the PictureBox Image or BackgroundColor next time when the PictureBox repaints itself. Such a noob here. XD I solved it by copying my drawing code to the PictureBox1.Paint ...Show All
eiger How do I convert Access 2003 / VBA app to a VB.NET app?
Hello, I have done some research on converting an existing app to VB.NET, but have not found what I am looking for. My existing app is currently created in Access 2003 VBA using access forms, modules, tables queries etc., and would like to convert all of it to VB.NET. What would be the best method or tools to use to accomplish this The VB.NET app would be developed from VisualStudio 2005... ... or, would it be just as easy to recreate the app from scratch Thanks in advance. Rashar, I'm looking at doing a similar thing soon - can you tell me if you have had any luck What approach did you end up taking Although VBA is a close cousing of VB6 you may have iss ...Show All
forrestcupp TROUBLE Inserting dat into access database
I am having some trouble inserting a date into a access database, I have tried sever different ways but always get something like - cannot change date to an integer. Dim theOleDbCommand As New OleDb.OleDbCommand( "INSERT INTO DATASHEET ([TODATE], ACCESSUSER,DEPTID,TOWN) VALUES ( , , , )" ) theOleDbCommand.Connection = New OleDb.OleDbConnection(connectionString) Dim p0 As New OleDbParameter( "@p0" , Me .TODAYSDATE.ToString) p0.Value = Me .TODAYSDATE.ToString theOleDbCommand.Parameters.Add(p0) Dim p1 As New OleDbParameter( "@p1" , Me .theUserNameOnly) p1.Value = Me .theUserNameOnly theOleDbCommand.Parameters.Add(p1) Dim p2 As New OleDbParameter( " ...Show All
