|
Liefie2000 wrote: We aren't using VB.NET for this I know; the suggestion would be to extend your application using some other language than VB6.
Liefie2000 wrote: How would you suggest I "build one from scratch". The same way any form is built in VB6. That's what the dialog is, just another form with textboxes and buttons.
You're welcome btw
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
When an row in a ListBox is selected, it is highlighted a nice deep blue.
If that ListBox loses focus, the ListBox's selected row remains highlighted in blue.
However, when a ListView loses focus (and it's HideSelection property is set to false), although the selected rows remain highlighted, the highlight is no longer a nice deep blue but rather a barely visible light grey.
Is there a way to change the highlighted color of ListView's selected row when the ListView no longer has focus?
Thanks,
Jim Dolson
|
|
|
|
|
The control is using the system colors to paint itself.
If you want to change the colors it's using, you'll have to paint the control yourself. C# Custom Paint ListView[^]
|
|
|
|
|
In addition to Dave's answer, it's usually not worth the effort. Unless you use the highlight-color as defined in the system-colors, your blue would default to red on my desktop
If it's merely to get consistency then do consider the fact that you are adding code that might throw exceptions/have bugs, while the only advantage is color-consistency (one that is still a non-default, and hence, unexpected)
If you are letting the user make a selection, then you could consider using checkboxes to indicate the selection.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thank you gentlemen. I've decided to leave the default behavior alone.
Jim
|
|
|
|
|
Hello !
I'm using Vb.net 2013 , Entity Framework , SQL Server 2008R2 and SMO.
I want to disconnect from database and set offline.
I try this code using SMO:
conn = New ServerConnection()
conn.ServerInstance = serverName
srv = New Server(conn)
Dim db As Database
db = srv.Databases(databaseName)
db.setoffline
But the problem is that the application hang on the last line and doesn't respond.
Is there anything that I should do with entity framework before set the database offline ?
Thank you !
|
|
|
|
|
You can't use EF to offline a database. You have to use the normal SqlCommand and SqlConnection objects to execute the query yourself.
|
|
|
|
|
Hi Everyone,
I have used below code do open word document from a VB Application with OLEWord control, While opening it below error message is displayed.
"Open Database Connectivity Error" and details below description displayed.
"ODBC Error: [[Microsoft][ODBC Driver Manager] Data Source name not found and no default driver specified
SQL State: IM002
Return Code: SQL_ERROR"
Note:
1. Error occurs randomly.
2. after clicking OK to the Error Message word opening properly.
Code and Images attached.
Kindly help me regarding this issue.
Code:
Dim mWordDoc As Word.Document
Set Data.Recordset = Rx_db.OpenRecordset("SELECT reg_object FROM REGISTER WHERE reg_id = " & vRegId)
If Not Data.Recordset.EOF Then
Data.UpdateControls
If OLEWord.OLEType = vbOLEEmbedded Then
Set mWordDoc = OLEWord.object
If Left(UCase(OLEWord.Class), 13) = "WORD.DOCUMENT" Then
Set mWordDoc = New Word.Document
OLEWord.DoVerb vbOLEOpen
End If
End If
End If
Data.Recordset.Close
|
|
|
|
|
Check your connection-string; it's not related to Word, it's related to the query.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks for your reply.
My connection string like below
"ODBC;DSN=SampleDSN;;UID=SampleId;PWD=sample;"
The error says default driver missing where can we set default driver for specified ODBC connection
|
|
|
|
|
I am trying to mirror a VB frame to RightToLeft direction. I succeeded to mirror the frame, but all the text of frame components(Labels and text box) are mirrored too.
Is there any way to prevent the components to be mirror?
Const WS_EX_LAYOUTRTL = &H400000
Const WS_EX_NOINHERITLAYOUT = &H100000
Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
Get
Dim CP As System.Windows.Forms.CreateParams = MyBase.CreateParams
If Not MyBase.DesignMode() Then
CP.ExStyle = CP.ExStyle Or WS_EX_LAYOUTRTL
End If
Return CP
End Get
End Property
When I tried to add "OR WS_EX_NOINHERITLAYOUT " the frame didn't mirror at all.
|
|
|
|
|
Hi Everyone,
I created a usercontrol and don't know how to put it in Datagridview cell. I already tried to find many solutions here but i totally failed to do that.
I did tried to populate my usercontrols to 3000 times and my form crashed.
Is there any way to place it in datagridview and populate it?
My control looks like this
-----------------------------------------------
[ photo ] Miller Nguyen [button][button]
[ ..... ] VB.NET, SQL, HTML, ASP
[ ..... ] He needs help
[ ..... ] He needs work
-----------------------------------------------
Or anyway to customize a cell like this?
======================
Miller Nguyen
VB.NET, SQL, HTML, ASP
He needs help
He needs work
======================
Thanks a lot.
|
|
|
|
|
Nguyen Ngoc Cuong wrote: tried to populate my usercontrols to 3000 times and my form crashed Error Message? OutOfMemory?
By the way, do you think it is a good UI design to show 3000 items on a single form?
|
|
|
|
|
Yes, it said out of memory
Actually, it will have 700 rows and each row has 4 columns.
Each cell will contain one UserControl
So, I need to have maximum 2800 controls to be loaded
However, I can unload some empty cell to make it lesser
|
|
|
|
|
What do you mean Usercontrol?.
I have populated a access Database to a Datagridview.|
My Skype:nguyentuananh921
If you need contact me.
|
|
|
|
|
It's not only text, it's a control that contain a picture box, 4 labels with nicely format.
|
|
|
|
|
Hi All.
I am new here.I have a Visual Basic 2010 project.In this project I connect to Access 2007 DB File.Everything Is OK.Now I Want to publish this project.It is not ok and I have error message that "Unhandled Exception has occurred in your Applicaiton......"
I know application can't connect to access file but I don't know how to solve.
Please help me.
Thanks
|
|
|
|
|
Nguyen Tuan Anh wrote: Unhandled Exception has occurred in your Applicaiton This tells you that something fatal happened, and your application has not been written to trap and report the error properly. Exceptions should be caught in Try ... Catch blocks, and information reported to the user about what is happening, and where. If you don't know where the error occurred then you will need to run your application in the debugger to find out. Once you have done that you should be able to discover why the error occurred. See http://msdn.microsoft.com/en-GB/library/fk6t46tz.aspx[^] for more information.
|
|
|
|
|
Everything is OK before I Publish.After publish I Think Application can't connect to DB because it is not include in the setup file or .....that i don't know.
|
|
|
|
|
Nguyen Tuan Anh wrote: or .....that i don't know. Well I am afraid there is no way anyone here would know. It is no good trying to guess what is wrong. You need to do some serious debugging of your application to find the problem and fix it properly so it does not happen again, or if it does, that it produces some useful information about the exception.
|
|
|
|
|
Hopefully, you didn't put the Access database in the same folder as your application under Program Files. If you did, the Program Files folder, and everything under it, is READ ONLY to normal users. They won't be able to open the Access database because of that.
You have to put the Access database in a folder more appropriate, such as under CommonApplicationData[^] somewhere.
|
|
|
|
|
Yes.
After I Publish.
1. I run Settup.I Install my application to the folder.
2. I copy access file to this folder at the step 1 then application run.
Question 1. How to manual the folder at the step 1?
Question 2. How the settup include the DB file?
|
|
|
|
|
I have no idea what you're talking about. "the folder" and "this folder" do not tell me EXACTLY which folder you're talking about.
Nor do I have any idea what you're using to package up your application into a Setup.
|
|
|
|
|
I Mean The Folder after I Install the application.
My Skype: nguyentuananh921
Please help me.
|
|
|
|