|
You're welcome
|
|
|
|
|
I think you are describing the default instances of the project's forms that are created when the "application framework" is enabled (if this is not the case, please ignore the rest of this). Enabled is the default case when using the "Windows Forms Application" template to create a new project.
To avoid these default instances, create your project using the "Empty Project" template. When starting with "Empty Project", you will not initially have the "My" namespace available, but it will be created for you if you go to Project Properties->Settings and click on "This project does not have a default settings file. Click here to create one.". This will reclaim My.Settings for you but nothing else, but most of that stuff is just icing anyways. If you feel the need, you could always add them back into the "My" namespace.
For more info on recreating the My.Stuff, see: How to: Use the My Namespace (C# Programming Guide)
|
|
|
|
|
I have created a setup of my project and in the custom actions I am running two .EXE file. One for key generation and the other for deleting the Key generation executable. The problem which happens because of the deletion of this key generation file is that the shortcut created then tries to reload the setup since there has been change in the startup folder. I have tried to make the two executable VITAL = "FALSE". Still it does not work.
I am using VB 2008 Setup and Deployment option
Need help in solving either of the two issues:
1. Is there any way I can run an executable without getting it copied into the startup folder?
2. If no, then how to make the shortcut refer to the main executable file even after the file is deleted from the startup folder?
|
|
|
|
|
I am facing a very typical problem. Let me try to define the issue
I have a label which has a text value as $789.75. When I transfer this value to a String variable the value becomes $789.75. Now if I have VB 2008 installed in the machine and when I run the program I can transfer this label text into a Double variable and after transfer the value of the DOUBLE variable becomes 789.75. How This happens I am not aware. This works even if I have installed VB some time and have now un-installed it. But if I make a setup file and install in a machine which does not have VB installed then it gives error "Not able to convert String to Double".
I hope I am able to clearly state my problem.
Can anybody tell me which .NET or .COM file is helping in this conversion from string to double without the $ sign. This will help me in adding that file when I am creating the setup.
|
|
|
|
|
You do not explain how you are converting the value, but the Double::TryParse Method[^] is the best way.
Use the best guess
|
|
|
|
|
Richard, Thanks for the suggestion. What i am using is CType method. As far as Double.Tryparse method is concerned, I find according to MSDN it does not work on strings which contain $ sign. Double.Tryparse can take care of <,> and exponents. My issue is as told before, if VB .net is installed in the machine then CTYPE(string, Double) returns only the number 757.49 where string = $757.49. But when VB .net is not installed same command throws an error "Cannot convert String to Double".
|
|
|
|
|
According to the documentation[^] this is compiled inline so it should work on any system, as long as you have the correct version of .NET installed. Sorry, but I cannot suggest anything more that would help.
Use the best guess
|
|
|
|
|
Thanks Richard. I really appreciate taking some time out and trying to solve my problems. I am also not sure why this is working in one machine and not in another. As far as .Net is concerned I have .net Framework 4 installed in both the machines. I will try out some more combinations.
Thanks again.
|
|
|
|
|
Have you compared the regional settings of the various machines? At a guess I would say that the development environment is using English(United States) or some other culture that has $ for the currency symbol. All the 'helpful' stuff built into the VB conversion routines is probably ignoring the default currency symbol.
|
|
|
|
|
Yes Alan, You are right. Regional Setting issue was causing the problem.
Thanks for the suggestions.
|
|
|
|
|
_ hooray! need help for my project .. I am developing a Payroll System .. I have a Stored Procedure created using SSMS 2005 ..details:
Stored Procedure Name: Find_Emp
Command/Query=
SELECT * FROM EMP0000 INNER JOIN EMP0001 ON EMP0001.EMP_NO =EMP0000.EMP_NO WHERE EMP0000.EMP_NO=@empno
In my GUI using Visual Studio 2010, I have a ListView where the list of employee listed..
I want to call the procedure in SelectedIndexChanged Event of the ListView ..
My problem is don't have an idea how to call this procedure in visual studio 2010 .. any help please ?
|
|
|
|
|
alecxa05 wrote: don't have an idea how to call this procedure in visual studio 2010 The same way you would call it in any version of Visual Studio. Add an event handler for SelectedIndexChanged and put your SQL command in there. See these links[^] for samples and suggestions.
Use the best guess
|
|
|
|
|
|
Dear All,
I have 6 tables created from a class using EF Code First approach, and I'm wondering how to do the relationship between the tables using DataAnnotation, classes as follow:
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.ComponentModel.DataAnnotations
Imports System.ComponentModel.DataAnnotations.Schema
Public Class Customer
<Key, ScaffoldColumn(False)>
Public Property CustomerID() As Integer
<Display(Name:="File No"), StringLength(6)>
Public Property CustomerFileNo() As String
<Required(ErrorMessage:="First Name is required")>
<Display(Name:="First Name"), StringLength(20)>
Public Property FirstName() As String
<Display(Name:="Last Name"), StringLength(20)>
Public Property LastName() As String
<Display(Name:="Street"), StringLength(40)>
Public Property Addr_StreetName() As String
<DefaultSettingValue("0")>
Public Property MaritalStatusID() As Integer
<DefaultSettingValue("0")>
Public Property Addr_AreaID() As Integer
<DefaultSettingValue("0")>
Public Property Wrk_OccupationID() As Integer
End Class
Public Class MaritalStatus
<Key, ScaffoldColumn(False)>
Public Property MaritalStatusID() As Integer
<Required(ErrorMessage:="Name Required")>
<Display(Name:="Marital Status"), StringLength(10)>
Public Property MaritalName() As String
<DefaultSettingValue("1")>
Public Property RecStatus() As Boolean
End Class
Public Class Area
<Key, ScaffoldColumn(False)>
Public Property AreaID() As Integer
<Required(ErrorMessage:="Name Required")>
<Display(Name:="Area Name"), StringLength(30)>
Public Property AreaName() As String
<DefaultSettingValue("1")>
Public Property RecStatus() As Boolean
End Class
Public Class Occupation
<Key, ScaffoldColumn(False)>
Public Property OccupationID() As Integer
Public Property OccupationName() As String
End Class
Public Class InvoiceHdr
<Key, ScaffoldColumn(False)>
Public Property InvoiceID() As Integer
Public Property InvoiceNo() As String
Public Property Amount() As Integer
Public Property CustomerID As Integer
End Class
Public Class InvoiceDetails
<Key, ScaffoldColumn(False)>
Public Property InvoiceDetailsID() As Integer
Public Property InvoiceID() As String
Public Property ItemNo() As String
Public Property ItemDescription() As String
End Class
Description:
Customer table has fields:
- MaritalStatusID which linked to MaritalStatus master table, and displayed as drop downlist in the customer formview
- Addr_AreaID which linked to Area master table, and displayed as drop downlist in the customer formview
- Wrk_OccupationID which linked to Occupation master table, and displayed as drop downlist in the customer formview
Then Invoice table has:
- CustomerID which linked to the customer table
Then InvoiceDetails table has:
- InvoiceID which is linked to Invoice table.
Thanks in advance
|
|
|
|
|
|
True .. but (frazzle-me) suggested to submit it in the VB forum so I may get the answer .. so I thought it's ok to do that.
Anyhow thanks for the info.
|
|
|
|
|
A good reason to choose the correct forum in the first place.
Use the best guess
|
|
|
|
|
Yes correct.
But still I'm stuck & looking for the answer
|
|
|
|
|
Hello,
i have an application in vb.net with 2 forms running on a pc with two monitors. I'd like to see the first form on both monitor, but the second form only in one of them. Is it possbile? I know it is because i saw an application with these features. So, does anybody help me ?
Thaks a lot for attention
Nick
|
|
|
|
|
NicoTexas wrote: So, does anybody help me ?
Set Top and Left properties to (0,0) and make the size equal to the cumulative width of the screens. Set the height to equal the largest screen. Something similar to below;
Form1.Top = 0
Form1.Left = 0
Form1.Width = Screen.AllScreens(0).Bounds.Width + Screen.AllScreens(1).Bounds.Width
Form1.Height = Screen.PrimaryScreen.Bounds.Height
Form1.ShowDialog()
Works best if both screens are equal in size and resolution; my PC has a left screen that's smaller than the right one. The part that's not visible on the smaller one is still there - it exists in virtual space, and is simply not drawn. Still, it allows you to move a button to a location "beyond" the screen.
If you go to the configuration-screen and look at the display settings (screen resolution), both monitors will be shown, along with two buttons ("Detect" and "Identify") and some settings for the resolution. If your monitors are differently sized, then you can change their virtual location here.
If you want to show a "neat" screen spanning both monitors and still cope with different sizes, I'd suggest using two forms, one for each screen. This approach would be more suitable if you are going to build a screensaver.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
How to make regular Appointment or Schedule using ListView & MonthCalendar?
|
|
|
|
|
That'd be a bit much to explain in detail in a single post. Worse, it'd be too much for a single lesson.
You'll need to decide where and how to store your data. Let's assume you'll use a database for the appointments; you'd then design the tables to store your data and write code to fetch and manipulate appointments.
After that you can set up a UI, and yes, a ListView would be handy to display a list of appointments, and yes, a calendar would be handy to display the appointment-date.
At which of these parts are you stuck? If you say "all of them", I'd suggest getting a good book on C#.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
TYVM dude, for answering my Question
Have been solved with your opinion ; "Let's assume you'll use a database for the appointments" its about database.
|
|
|
|
|
Yazid Aura Robbani wrote: Have been solved with your opinion ; "Let's assume you'll use a database for the appointments" its about database. Does that mean your question is answered, or did you answer "database" on my question?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Indeed, I have no database before on my appointment design. Your Replay has been reminding me to make the database Thank You So much
1 more question friend, I've made a traditional calendar using VB6 and everything goes well, the problem arises when I want to change it to VB2010 express, I've been try to converting the code with my Knowledge and some converting tools, but still stuck with it, because I'm a Newbie in VB2010.
I hope you do not get annoyed when I asked for an e-mail. I really intend to send you an example so that you can analyze it.
Best Regards
|
|
|
|