|
how can i hide the Start Button in Vista using VB.NET2005??
Please give me a code!!!!
from japan(sorry for bad English)
|
|
|
|
|
|
thank you your reply.
im upgrading the application from XP to Vista.
my program fails to hide and disable startbutton in Vista..
the link is really helpful for me!!!!
i could make startbutton disable with using API EnableWindow.
i've tried using showwindow,SW_HIDE and its only made startbutton smaller.
my client said it is okay only disable startbutton not hide.
i really appreciated your answer!!!!
|
|
|
|
|
hello guys!
I know this question might sound a litle stupid but this my first application and things are still confused for me.I'm developing a data centric application in VB.NET with Visual Studio 2005 that is supposed to connect to sql server installed on the machine or in the network.
For exemple in my application project i use the data adapter to connect to the database X with my settings (i mean my user name and password of the sql server on my machine or integrated security) in the connection string on every windowsforms.
Then i wanted a way to deploy my application that will create my database during the installation.I liked one of the msdn ways that use the installer class to read an sql file.But i was more interrested by the method used by
Mukund PUJARI in his article "create a database during installation version 2".My anxiety is this:if the end user has the freedom to choose the database Y and his location, then my application will definitively not be connected to the database end since my connectionstring is different connection to a database X.
In my point of there should be a method that can put in the connectionstring the data provided by the end user.I don't have any idea.Even though i knew and then using data adapters and datasets stuffs how can i make them use it?Supposing i kew it too,it would be then after deployement that i can test that my application is using the database name that i provided during installation.
All this are confusing me and if somebody can just help it would make a programmer have a litle more knowledge
thanks
eager to learn
|
|
|
|
|
You can replace the name of the server, the database name, user name and password at runtime and update the connectionstring in config file.
For example:
Driver={SQL Native Client};Server={0};Database={1};Uid={2};Pwd={3};
You can replace the string like that ~
String.Format(Driver={SQL Native Client};Server={0};Database={1};Uid={2};Pwd={3}, txtServerName.Text, txtDatabaseName.Text, txtUserName.Text, txtPassword.Text) <br />
then, you can update your config file if you want to.
|
|
|
|
|
hi michael thanks for giving so fast answera though i'm not sur i understood.Right now i don't know how to do such a thing, should it be in the installer class?In my architecture i have about 8 forms and 3 crystalreports and each of them has at least one data adapter.then i add an installer class that use a masterconnectionstring and then change the database master to the one provided by the end user in a user interface.The values entered is past to a variable in the overrided install method(if i'm not wrong).So it 'll read my sql text file to create all the object of this database.How should i implement what you just suggested?
Thanks a lot.i went to michael.net not bad
eager to learn
|
|
|
|
|
I NEED SOME HELP DETERMINING WHERE TO START IF YOU WANT TO BE PROFICIENY IN VB OR VB.NET
|
|
|
|
|
1 - DON'T SHOUT
2 - BUY A BOOK
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
how can i access status bar on MDI form from child or methods in Module file?
|
|
|
|
|
You don't. The module shouldn't have any need to get at the controls of a form. The module should be concerned with just doing it's job, not updating controls. The only thing that should be updating the controls on a form is the form itself. (There's a multitude of reasons for this...)
There really is no use for modules anymore, other than backward compatibility with VB6 users. But, in either case, your code should be exposing an event or a delegate callback that the form subscribes to in order to receive update messages.
|
|
|
|
|
sorry foy my english again.
I want clic on my WinForm and move it (rigth, left, up, down)
how can i do it?
i am from mexico....thanks CodeProject
|
|
|
|
|
You need to write the code to do this, handle a mouse down, mouse move and mouse up on your form. While the mouse is down, if the mouse moves, move the form.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
This Works like a dream for me.
Dim pt as point
dim hdMousDown as Boolean
Private Sub SetPoint()
If hdMousedown = True Then hdMousedown = False Else hdMousedown = True
pt = Me.PointToClient(Control.MousePosition)
End Sub
Private Sub Form1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Form1.MouseDown
SetPoint()
End Sub
Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Form1.MouseUp
SetPoint()
End Sub
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Form1.MouseMove
If hdMousedown = True Then
Me.Location = New Point(Control.MousePosition.X - pt.X, Control.MousePosition.Y - pt.Y)
End If
End Sub
|
|
|
|
|
A couple of days ago I posted the questionon how to do this:
Datagridname.Columns.Add(New DataColumn("Name", Gettype(String)))
for a gridview and I got this answer: "It said it suppose to be a DataControlField. DataControlField is the abstract class of TemplateField, BoundField, hyperlinkfield and etc.. "
BoundField bf = new BoundField();
bf.DataField = "DateOfBirth";
GridView1.Columns.Add (bf);
Thank you so very much - you helped tremendously. Now I'm wondering if you or anyone else can help me to create an Itemtemplate field in the same manner - I need it to be a dropdownlist but don't see where the dropdown is a choice for the Itemtemplate. Any help on this would be greatly appreciated. And - the help I received is VERY appreciated! Thanks!
Coleen
"Even the smallest foot leaves an impression"
|
|
|
|
|
You can use TemplateField instead of BoundField.
|
|
|
|
|
Thanks Michael - I tried that; the problem is that there is not a member of the TemplateField that allows me to "tell" that field that it needs to be a dropdownlist in the VB codebehind. When I do this:
Dim tfModeTy as new TemplateField
tfModeTy. there is no selection of dropdown list - so I tried tfModeTy.EditItemTemplate and the only available method is InstantiateIn - which I don't understand how to use. Is there any documentation on how to make the EditItemTemplate into a dropdownlist? I've gotten a very good link on this - but unfortunately I don't quite understand how to implement it. It really makes no sense that in the ASP.Net code I could easily write:
<asp:TemplateField HeaderText="Cities">
<ItemTemplate>
<asp:DropDownList ID="ddlCities"AutoPostBack="true" runat="server"
OnSelectedIndexChanged="ddlCities_SelectedIndexChanged"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
And yet in the VB Code Behind there is no option on the ItemTemplate of DropDownList! Why not? And if there is, can you please give me an example of what it is - 'cause I sure am not getting those choices in my VB.Net codebehind!
Thanks!
Coleen
"Even the smallest foot leaves an impression"
|
|
|
|
|
Adding the template column to Gridview is tricky. I will show you three ways to achieve your goal. but None of those ways is perfect. Each way has each own pros and cons.
1. Adding HTML dropdown to Template column
For example :
TemplateField tf = new TemplateField (); <br />
TemplateBuilder dBdr = new TemplateBuilder ();<br />
dBdr.AppendLiteralString ("<select name="\"ctl00$DefaultContent$GridView1$ctl09$DropDownList1\"" id="\"ctl00_DefaultContent_GridView1_ctl09_DropDownList1\"">");<br />
dBdr.AppendLiteralString ("</select>");<br />
tf.ItemTemplate = dBdr; <br />
<br />
GridView1.Columns.Add (tf);
2. Loading the custom control
This way is what I found in other site. I haven't tried yet. You can place all controls that you want to show in User control. Load this custom control and set it to ItemTemplate.
For example ~
<br />
TemplateField tf = new TemplateField (); <br />
tf.ItemTemplate = LoadControl("mycontrols.ascx"); <br />
GridView1.Columns.Add (tf);
3. Creating your own template column
Example : http://msdn2.microsoft.com/en-us/library/aa289501(VS.71).aspx[^]
|
|
|
|
|
Thanks Michael
Wow - no matter how you do it programmatically it is complicated! You'd think that since it is so easy to do in the ASP.Net portion (all the nice little tools to allow you to connect to your datasource and change to ItemTemplate fields) that it would be just a little less complicated to do this in code!
Thanks so very much for all of your help. At this point, what we have decided to do is to go back and re-write our connection to the DB2 database in a separate function (instead of within the VB.net codebehind of the page) and then we can connect directly to the datasource as an object. I'm still working on it, but it sure helps to have the information on how to do this programmatically. I may still end up doing it that way...Either way it is a lot more complicated because of the way in which we connect to our database (using COBOL and CICS) and calling an RPC to create a datatable to bind to. What a pain!
Again, thank you very much for your help!
Coleen
"Even the smallest foot leaves an impression"
|
|
|
|
|
Hi,
Using .netframework 2.0, I can see the My.Computer.Info.OSPlatform information for the XP I am using, i.e. "Win32NT", and and the .OSversion i.e. "5.1.2600.131072".
As I don't have a Vista pc, can anyone tell me what the My.Computer.Info.OSPlatform string would be if I was running Vista?
If the same as above, what would the version no. be like?
Thanks for your help
BillyTheKidney
|
|
|
|
|
Hi,
the OS family is identified by the first two numbers; the others depend on the exact build and optional service packs.
NT starts with 5.0.
XP starts with 5.1.
Vista starts with 6.0.
|
|
|
|
|
hi all,
i m trying to store the path of file in mysql database using vb.net. This path contains "\" but Mysql database does not store it. Also when i directly edit the field in database and insert "\" in database field then it stores backward slash.
anybody have idea where i m wrong ?
any help will be greatly appreciated.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
What does the code look like that's storing the data?? What does the schema look like for the table you're storing this data in?
I never use MySQL so my knowledge quite is limited. But, the first thing I would suspect is that MySQL is interpreting the backslash as an escape character.
You're single best source of information specific to MySQL would be the support forums at http://forums.mysql.com[^].
|
|
|
|
|
Hi All,
I am Atheeq Software Developer in VB.Net using backend SQL2000. I need help in writing Sql Query in VB.Net. Please any body help me how to write the following code in VB.Net procedure.
Select 'AsplData','Select * from Customer order by customer','C:\test.xls'
Best Regards
Atheeq
India
|
|
|
|
|
Atheeque wrote: Select 'AsplData','Select * from Customer order by customer','C:\test.xls'
Would you mind describing what you want this to do?? It doesn't mean anything in the form you've prsented it.
|
|
|
|