|
LPalma wrote:
I'm using the "TaskbarNotifier.vb" file which is included in the pack. So, I'm not mixing C# and VB.NET.
OK, you said .cs file. You meant .vb file.
LPalma wrote:
I am looking for the code that VisualStudio creates automatically (Imports, the name of the form, title of the form, default icon for the form, etc...).
Yes, a using statement exists at the top, in fact, you should see a group of them. Search your code file for using and see where it takes you, that's where they go. IT's not THAT critical ( as in, they don't need to go EXACTLY there ), but they will be in a group at the top. You should only have one class in each file, in almost all cases.
LPalma wrote:
Once I got to the code, but I forget how to access it.
A lot of auto generated code is hidden behind a comment with a + tag. You can create these yourself with #region and #end region in your code, then you can hide a section of code by clicking the +. Never mess with this code though, if it's in a method. The designer auto generates this.
LPalma wrote:
About buying the book, I'm waiting for framework 2.0... because I think v1.1 isn't so complete
I disagree. Sure, it's getting better, but there's no reason to wait at least 6 months before you can start learning. PLenty of full features apps have been written with 1.0/1.1. Do you ahve the beta of 2005 ? If so, you can certainly buy books on it today.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
I disagree. Sure, it's getting better, but there's no reason to wait at least 6 months before you can start learning. PLenty of full features apps have been written with 1.0/1.1. Do you ahve the beta of 2005 ? If so, you can certainly buy books on it today.
Yes, I'm beta testing SQL Server 2005 and they give us VS.NET 2005 B2 and I find it interesting and I started creating simples applications for home use. One of them has already 1000 lines codes and it just work perfectly (Yeah, VS2005 is so ease that I could use it just knowing ASP 3)
However, as I never used so complete tool, I'm a bit dizzy with these names "Constructor, Imports, etc"... I'll try to find a book to learn the basics, I tried to skip the begin, but it isn't working. eheheheh.
Thanks!
|
|
|
|
|
LPalma wrote:
However, as I never used so complete tool, I'm a bit dizzy with these names "Constructor, Imports, etc"... I'll try to find a book to learn the basics, I tried to skip the begin, but it isn't working. eheheheh.
Yeah, ASP.NET 2005 has a lot of automagic stuff built in, which means you can get a lot done, and still have no idea about programming. I see this as a bad thing, although so long as you do some study so you know what's going on, it's obviously productive to not need to write reams of code to get a little thing done.
Introducing Microsoft Visual Basic 2005 for Developers (Pro - Developer)[^] looks like a good book for you. Amazon also has one on SQL Server 2005.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
looks like a good book for you. Amazon also has one on SQL Server 2005.
Thanks for the book. I'll check with my local book store if they can import it (I'm not from USA, as you may have notice because of my English).
|
|
|
|
|
LPalma wrote:
(I'm not from USA, as you may have notice because of my English).
No, I didn't. You can order from Amazon, I do ( I'm in Australia ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ok, I am in the midst of planning a forms/reports app and need to get some good feedback on the thoughts. The app is supposed to be n-tier.
My thoughts are this;
1. There will be a thin-client.exe installed to the PC (Sorry no ASP.Net we tried!)
2. The VB.Net front end will talk to a SQL2000-sp3/4 backend.
3. The users will access the report templates from a central doc repository on the net.
4. The App will have a directory on the network where modules are stored that can be updated.
Now is there a simple/efficient way to put a function in VB that onstart it will compare a version number or something in it with a version on the server and if the server version is newer to download/replace it and prompt for restart?? I have seen this with other apps but am not sure what the development enviro for those are.
5. The users will have SQL/Table based authentication for the application based on 3/4 levels.
6. We will probably use ORM.Net/Olero to build out the DAL.
Thoughts, Suggestions or general comments would be greatly appreciated as this will be my first VB.Net application.
Thanks,
David
You are only as good as your last project.
|
|
|
|
|
DEWright_CA wrote:
. There will be a thin-client.exe installed to the PC (Sorry no ASP.Net we tried!)
What does 'we tried' mean ? Do you have reasons to want ASP.NET ? The main issue is that ASP.NET GUI will never be as rich as a winforms app.
DEWright_CA wrote:
Now is there a simple/efficient way to put a function in VB that onstart it will compare a version number or something in it with a version on the server and if the server version is newer to download/replace it and prompt for restart??
If you use VS.NET 2005, then you can set it up to do this for you, yes. Otherwise, you'd have to store the version number somewhere, and then run a bootstrap program that checks the version number, downloads the file and replaces it ( you can't overwrite a file that is running ), and then runs it either way.
DEWright_CA wrote:
this will be my first VB.Net application.
It sounds like you really know what you're doing, do you come to VB.NET from VB6 ? ( i.e. this is obviously not your first application )
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
What does 'we tried' mean ? Do you have reasons to want ASP.NET ? The main issue is that ASP.NET GUI will never be as rich as a winforms app.
Originally the Requirements Document we wrote favored a Web Server based platorm. But the clients IT staff balked at that. So we are now going to the desktop. The web would be the lowest maintanence option as it would require maintaining a single code point, and the app it self is pretty straight forward so hopefully it will go off well.
Christian Graus wrote:
If you use VS.NET 2005, then you can set it up to do this for you, yes. Otherwise, you'd have to store the version number somewhere, and then run a bootstrap program that checks the version number, downloads the file and replaces it ( you can't overwrite a file that is running ), and then runs it either way.
I wish we could, but as this is a federal client we can only use stable software. I have played with 2005 and like it quite a bit, just wish it was truly ready for prime time today!
Christian Graus wrote:
It sounds like you really know what you're doing, do you come to VB.NET from VB6 ? ( i.e. this is obviously not your first application )
A variety of minor things, ASP, ASP.Net/C# and VB4/5 and once upon a time VFP!
Thanks for the Info, now if anybody has any other thoughts I think we should be set!
David
You are only as good as your last project.
|
|
|
|
|
DEWright_CA wrote:
But the clients IT staff balked at that.
Oh, OK. The client is the problem. Been there, done that.
DEWright_CA wrote:
I wish we could, but as this is a federal client we can only use stable software. I have played with 2005 and like it quite a bit, just wish it was truly ready for prime time today!
When will you release though ? You can actually sign an agreement with Microsoft to let you release beta version code, so long as you update it on release. I'm suggesting that if you use unit and regression testing, you can be sure that versions you give the client during production are stable, and if the turnaround time is long enough ( say, 6 months minimum ), then VS.NET 2005 will be out by the time you hit your actual release date.
But I agree, it is a risky strategy.
DEWright_CA wrote:
A variety of minor things, ASP, ASP.Net/C# and VB4/5 and once upon a time VFP!
Cool. Why are you going VB.NET instead of C# this time ? ( Not trying to make a case, just curious why the switch ? )
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
then VS.NET 2005 will be out by the time you hit your actual release date.
We actually are going to have a pretty short schedule, we expect to be rolling out the initial release in 2 months or less for client testing.
Christian Graus wrote:
Cool. Why are you going VB.NET instead of C# this time ? ( Not trying to make a case, just curious why the switch ? )
It's the client thing again, they want to maintain the app in the future and they don't like the C# aspect. I could do it faster in that, since my VB is really dated.
David @ Premier
You are only as good as your last project.
|
|
|
|
|
DEWright_CA wrote:
We actually are going to have a pretty short schedule, we expect to be rolling out the initial release in 2 months or less for client testing.
OK, definately not an option then.
DEWright_CA wrote:
It's the client thing again, they want to maintain the app in the future and they don't like the C# aspect. I could do it faster in that, since my VB is really dated.
VB.NET is really different to VB of yore, as well. I thought this may be the case, only because I've had the same experience, where clients assume VB is easy and VB developers are a dime a dozen, so they will get an app that's easier to maintain.
Good luck with your project, it sounds like you're headed in the right direction, anyhow.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi
i have ms sql data base and i want to edit datatype column in table by code form vb.net
i write this code
Code:
Try
Dim strUID As String = "sa"
Dim strpwd As String = ""
Dim strDATABASE As String = "MyDataBase"
Dim strAddress As String = "MyServer"
Dim strConnectionString As String = "data source=" & strAddress & ";user id=" & strUID & ";password=" & strpwd & ";initial catalog=" & strDATABASE
Dim MsSqlCon As New SqlConnection(strConnectionString)
If MsSqlCon.State = ConnectionState.Closed Then
MsSqlCon.Open()
End If
Dim strEditTable As String = "ALTER TABLE MyTable ALTER COLUMN ID INTEGER IDENTITY (1, 1) "
Dim Cmd As New SqlCommand(strEditTable, MsSqlCon)
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Cmd = Nothing
If MsSqlCon.State = ConnectionState.Open Then
MsSqlCon.Close()
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
but when i try i get this errer
Incorrect syntax near the keyword 'IDENTITY'
ID field is't IDENTITY and i want to convert and edit it ti IDENTITY field
i want to do it by code from vb.net
thankes
|
|
|
|
|
Hi all,
How to get the values of some selected cells of say 3 rows
i want to give an option of copy to clipboard
i have done the same by counting all the cells of the selected rows,then putting the values in a table and then retrieving the values from the table and converting it to string format,but then i am getting values of all the cells of that row which is not required
i want only the values of selected cells of that row
Plz,anyone can help me out on this
Thanks in advance
|
|
|
|
|
is there any source for building a calendar like outlook calendar in vb.net, you can input a link or button in each date, and when you click it, it will open another window. any idea?
Lisa
|
|
|
|
|
I'm stumbling (yet again) and I need some help.
Here is the background/what I want to accomplish:
1) VB.NET project
2) Default page has a number of buttons which redirect to their respective URL's
One in particular I would like NOT to be visible unless specific users (AD DNS Admins) are hitting the page. This would need to be authenticated agains either an AD group or a <location path="..."> in my Web.Config file that I have set up so that only the AD DNS Admins 'can' access the page.
3) If the client is a member of the list in the web.config or specific group in AD, the button would then be visible.
How do I go about doing this? I have tried a number of things on the default.aspx.vb page within the Page_Load but to no avail.
Any help is greatly appreciated.
Regards,
- -
KoalaCowboy
|
|
|
|
|
What you're looking for is Role-based Authentication. This is a topic that is much too large to cover in the forums. I suggest picking up any book on ASP.NET to get a better description of what's going on and how to use it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave,
Thanks!
Hopefully this isn't a stupid question, but can I use Role-based Authentication IN CONJUNCTION with Windows Authentication?
This web-app is used on our Intranet for AD DNS information maintanance and administration, so it utilizes AD credentials to authenticate (through a DL).
If I can use Role-based Authentication to make the "UpdateDNS" button visible when the AD DNS Admins access the default page, then that will work. Guess I'll have to dig through my reference book (ASP.NET Unleashed by Stephen Walther).
KoalaCowboy
Knowledge Monger
|
|
|
|
|
Yes. They're completely seperate from each other. Role-based authentication is setup and managed by you. You determine what the roles are and what access each of those roles has. It's up to you to determine which authenitcation provider to use. In your case, it's Windows and AD.
The AD authentication is done by you to determine if this person is who they say they are and if they're part of the Admin group. Based on this, you can setup the users website roles.
Good book, BTW. I have the 2nd edition...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm working on building some foundational controls for my current VB.NET project. I have subclassed System.Windows.Forms.ListView to extend it a bit for our needs. The functionality I'm trying to develop is a listview where the user can select which columns they would like to display (when ListView.View = View.Details). My initial vision for the UI of the "selection" functionality is some modal pop-up form with a checked list box of column names (checked = displayed).
My question is one of architecture. Is it good practice to include a pop-up form as a private member of a subclassed control? Something like:
--------------------------------------------------------------------
Public Class MyListView
Inherits System.Windows.Forms.ListView
Protected Class SelectionPopupForm
Inherits System.Windows.Forms.Form
...
End Class
Public Sub SelectDisplayColumns()
Dim popupForm as New SelectionPopupForm
popupForm.ShowDialog()
...
End Sub
End Class
--------------------------------------------------------------------
Am I going down a good design trail here? Thanks in advance for any input on this.
--
Dave
|
|
|
|
|
I am making an UNO card game and I want to make random numbers from 1 to 10 and with different colors. Now when i draw a card I want that only 2 numbers which are the same color and number can be shown. For example: 3 red (2 times only). How can i make this? I want to make 4 types of colors (Blue, Red, Green and Yellow) I want to make suffled card in the middle so that one can take a card if he doesn't have the same number in the shown cards that will be placed in the middle. Please help me on this one!!
Adrian De Battista
|
|
|
|
|
Create an array of cards, and then go right through the array, using the Random class to generate a random number between 1 and the number of cards. Then swap the item you've counted to with the item at the random position. So the first time, you swap the first card with a random card, the second time you swap the second card with a random card. The order becomes random, but the cards are fixed, that is you have the range of values you want.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian is correct about making an array of all of your cards, then suffling them. But, there's another method of shuffling that doesn't involve swapping cards. This alternate method is used by the secured shufflers in just about every internet poker site that's honest.
What you'll do is create an array of cards, just like Christian described. Then pick a random card in the deck (1 to 52), remove it from the deck and add it to the top of a new deck, or second array. Now, pick another random card (1 to 51), remove it and add it to the top of the new deck, and so on until you've exhausted the source deck.
You can read more about this research, and why card swapping and a 32-bit RNG can only generate about 4 billion or so decks (assuming 52 cards) out of the possible 8.0658175170943878571660636856404e+67 decks, by Googling for "How we learned to cheat internet poker".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
OK - thanks for the info. I've used code like this to do shuffle in the past ( C++ offers a random_shuffle method as standard, I wish the .NET standard library would catch up ), but I'll use your method in future.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I found the article link that I read before, here[^]. Seriously, check it out. It's very interesting.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks - it's a slow day, so I'm reading it now...
Christian Graus - Microsoft MVP - C++
|
|
|
|
|