|
yes i have used a menustrip
what i want when theu user Log enable the menu
when he logout ,disbale the menu
Regards
Ramy
|
|
|
|
|
Then my previous advice should work. Just use MenuStrip1.Enabled = False and MenuStrip1.Enabled = True.
|
|
|
|
|
but what u suggest
MenuStrip1.Enabled = False
enable and diseable all the menu ,means enables the login menu also//
so how the user will logon
Regards
Ramy
|
|
|
|
|
You stated you wanted to disable/enable the main menu. This to me meant the whole menu. To individually set items you can create a loop that iterates through each item and disable/enables it.
'Option #1
With MenuStrip1
'Disable each menu item
For i As Integer = 0 To .Items.Count - 1
.Items(i).Enabled = False
Next
'Enable the one(s) we want by index
.Items(0).Enabled = True
End With
'Option #2
'Disable each menu item
For Each item As ToolStripItem In MenuStrip1.Items
item.Enabled = False
Next
'Enable by using it's name
MenuStrip1.Items("FileToolStripMenuItem").Enabled = True
Enabling the items would just be a simple change
|
|
|
|
|
dear friends
when create a sql connection this code is automatically generated
Me.OleDbConnection1.ConnectionString="Provider=SQLOLEDB.1;Password=xyz;Persist Security Info=True;User ID=sa;Initial Catalog=try;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False"
but my application gets the code from the external file, reads the string n generates the connectionstring. So I want to use my custom connection string in the application. so when i assign as
Me.OleDbConnection1.ConnectionString=customstring
it gives me an initialization error.what should i do please help me.
Taher
|
|
|
|
|
hi
i've got my app that i now need to consider making multiuser environment. i guess my question is what exactly do i need to look at when working this out.. is it as simple as just setting mode type to for example :SHARE DENY NONE etc.
any advice and material would be appreciated. My DB is Access 2003..
thanks
Robbo
|
|
|
|
|
Try searching on "optimistic locking" and "concurrency". .NET provides a bunch of support for this.
Regards
Andy
|
|
|
|
|
Hello all,
I have heard rumors that there is logic or an algorithm that will analyze a live video stream through software and will give a numeric value for the focus. I am looking for a way to calibrate/focus CCTV cameras through a custom piece of software. If this type of algorithm exists, it would allow me to get the tighest focus possible (by using the software and numeric value) rather than trusting what looks good to my eyes.
If you know of something or find something, let me know also if it work with either BNC video out or with the IP based cameras. Most of the cameras I use are IP based (which also happen to be motion jpeg or mjpeg instead of true video stream) so I am sure that will affect things.
All I have found is people talking about this for thier telescopes/astronomy.
Thanks for your help!!!
Mike
|
|
|
|
|
"Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))"
Do you know why this is hapenning? And also is there any other way to read the Word Doc Files....Pls some one help me
Private Sub ListBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox3.SelectedIndexChanged
Dim Nothingobj As Object = System.Reflection.Missing.Value
'Dim wordApp As WordApplicationClass = New Word.ApplicationClass
'Dim Nothingobj As Object
'Dim stream As StreamReader
Dim myFile As System.IO.FileInfo
'Dim i As String
'Dim fs As FileStream
'Dim filepath As String
' Dim doc As Microsoft.Office.Interop.Word.Document
myFileName = ListBox3.SelectedItem.ToString
myFile = New System.IO.FileInfo(fileName:=myFileName) 'fileInfo
Dim WordApp As Microsoft.Office.Interop.Word.ApplicationClass = New Microsoft.Office.Interop.Word.ApplicationClass
Dim file As Object = myFile
Dim nullobj As Object = System.Reflection.Missing.Value
Dim doc As Microsoft.Office.Interop.Word.Document = WordApp.Documents.Open(file, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj)
doc.ActiveWindow.Selection.WholeStory()
doc.ActiveWindow.Selection.Copy()
Dim data As IDataObject = Clipboard.GetDataObject
Dim text As String = data.GetData(DataFormats.Text).ToString
doc.Close(nullobj, nullobj, nullobj)
WordApp.Quit(nullobj, nullobj, nullobj)
text = RichTextBox1.Text
Thanks
|
|
|
|
|
If this is using COM, Microsoft do have a .NET framework for working with Office in .NET.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Yes i've used the Com component.so pls how do solve this problems..pls....pls....
somasundaram G
Thanks
|
|
|
|
|
Start with what I said. There's a .NET Office library from MS, you can try to use that.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I've used MSoffice library also. But displaying the Error is :
But fileName path is Perfectly correct.....
Error is follow...
ComException Not handled....
"This file could not be found.
Try one or more of the following:
* Check the spelling of the name of the document.
* Try a different file name.
(Prem-Java-Chennai-3-Prem@pnbsoftware.com.doc)"
Thanks
|
|
|
|
|
I have a rich text box and I would like to replace a line of text e.g. "4443334" with ("SSS"+ RTB.text + "people") how would you do that?
Also, I have a button save called "SaveRTF" how would you get it to save the contents of the Rich text box "WebRTF" as a HTML file?
In the end we're all just the same
|
|
|
|
|
I am writing a website and find it hard putting in similar information for pages that will be similar all the time. I have created a program HTM Generator that I want to to this for me.
Many of the pages I put in are similar, except for some details. What i want to know (Using VB.net 2005) How I could load up file "LepTem.htm" when program loads and use text box "txtheading" with text say "Welcome to our site" to generate a heading tag or replace current one with <tag>"text from text box". If tag exists i want the program to overwrite it. The when you click save, I want it to bring up a save as screen and save only as a HTML file.
How would I do this? I hate having to write the same things over again cause I only have to modify a few things.
Also, I have another text box called "txtxscientific" and on the second column to the right on the table, I want it to put text there. And I have another text box I want text on third right. How would you do this?
In the end we're all just the same
|
|
|
|
|
Dave McCool wrote: find it hard putting in similar information for pages that will be similar all the time.
Create a base page class which holds all this information. If it's visual, use master pages, if you are using 2005.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Had a far better idea. Same principals, but instead I have three tab pages. Pages one and two have text boxes for inputting information. How would I get say "txtscientific" when iformation is typed in, automatically replace a certian tag on a certian line in the rich text box "RTFHTML"? This way seems easier.
I have put the whole HTML info on the rich text box and set the box to read only. The I want to whenever I type in text boxes in tab pages 1 and 2, the info to automatically change. How would you do that instead?
In the end we're all just the same
|
|
|
|
|
Hi,
I want to make a web application in vb.net connected to access database. How do I do that?
I noticed that when oracle is used, the following code is neccessary:
imports oracle.dataaccess.client
imports oracle.dataaccess.types
How about access db?
==========================
Be positive, it helps...
==========================
|
|
|
|
|
Access uses the standard Sql namespaces, SQL Server and Oracle get their own, specialised versions.
If you google, you'll find tons of info on this.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hello,
How can I filter last 30, 60, 90 and last year's records in my dataGridView?
I would like to do it in VB.NET
thanks, Joseph
programmer
|
|
|
|
|
Have you stored the date in your database ? If so, your SQL can filter it. If not, I doubt you can.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
Yes. dates are in the dataset in the table. I am looking for the SQl statement to do that.
thanks, Joseph
programmer
|
|
|
|
|
GetDate() will return todays date, use that in your SQL statement. DateAdd is the other function you need to get a date that's a certain distance from today, I believe.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i think you can do this
col1 = is a date colum
select col1 from table
where col1 > getdate() - 30
|
|
|
|
|
What is the difference in purpose/whatever between just creating a Method or Function and calling it when necessary and creating an Event and then raising an event? I just discovered this but cant think of a whole lot of reasons for me to use it.
Cleako
|
|
|
|