Readonly with Editor is not working as readonly after setting the image and it is working as readonly but not setting the iMage to picture
<[ReadOnly](True)> <Editor(GetType(ImageOpenFileDialog), GetType(System.Drawing.Design.UITypeEditor))> _
Public Property BackgroundPicture() As String
Public Class ImageOpenFileDialog
Dim openFileDialog As OpenFileDialog
Public Overrides Function EditValue(ByVal context As System.ComponentModel.ITypeDescriptorContext, ByVal provider As System.IServiceProvider, ByVal value As Object) As Object
openFileDialog = New OpenFileDialog()
openFileDialog.FileName = ""
openFileDialog.Filter = "JPEG Images|*.jpg|GIF Images|*.gif|Bitmaps|*.bmp"
openFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyPictures
If openFileDialog.ShowDialog() = DialogResult.OK Then
Return MyBase.EditValue(context, provider, value)
Public Overrides Function GetEditStyle(ByVal context As System.ComponentModel.ITypeDescriptorContext) As System.Drawing.Design.UITypeEditorEditStyle
I am creating a readonly Property and if i click i open the Images to select the image . as it is a readonly property i am not able to set teh image to picture box .
Working on Visual Studio 2005 PropertyGrid .
I want to lock all the keys not to enter in the propertygrid at the Picture Property like in Visual Basic 6.0 after selecting the image . Only Delete has to work
PictureBox -- Picture Property -- (Bitmap) after setting the image
so that the user shouldnot change the value
Presently i got the (None) in this way . Now i want to set the ReadOnly and only Delete key has to work and i want to set the Picture to PictureBox.
While trying to create a group of tables in msaccess using VB.NET ADOX, i am facing the error "System.Runtime.InteropServices.COMException...at ADOX.columns.Append(Object item, DatatypeEnum Type, Int32 DefinedSize)".
The coding is given below..
Public Function CreateAccessDatabaseandtables( _
ByVal DatabaseFullPath As String) As Boolean
Dim bAns As Boolean
Dim con As New ADODB.Connection
Dim cat As New ADOX.Catalog()
Dim ADOXtable As New ADOX.Table
Dim ADOXindex As New ADOX.Index
Dim sCreateString As String
sCreateString = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
No...Actually the first table "ACN_CHARX" is created successfully... when it crosses the line "ADOXtable.Name = "ACN_CHARX_INSTANCE" ", the first created table name is automatically renamed.. ie)from "ACN_CHARX" into "ACN_CHARX_INSTANCE". Then the control tried to create the first column of the second table "Logical_db_name"...Then it shows this error....
For obvious reasons it is not possible to just retrieve passwords to anything, through .net, think about it.
So unless you are intending to build a spam bot, you will simply have to offer the user the possibility to enter email address and password somewhere, and build a secure storage for that password, so hackers won't be able to abuse your program to collect passwords.
My advice is free, and you may get what you paid for.
The control is MdiClient. You just need to enumerate the Controls collection of the form, looking for a control of Type MdiClient. Then you need to turn off the Dock proeprty and set the position and size properties to whatever you need.
That code works fine and as expected, though I'd probably add an Exit For before the End If.
If you're saying that the title bar for the child form takes up the entire width of the patent form, this is the expected behavior and you can't turn it off.
If you're saying that if you maximize the parent form and this causes the child form to maximize also, then something in your code is causing this. The code you posted will not do cause that problem to happen.
i have 2 applications. one developed in c# and other in vb 6. vb application makes some changes to sql database. These changes need to be recorded in another database(used by c# code). Due to privilages on the databases, i need vb to call the c# exe and provide it with 2 arguments. That is, my vb code needs to call a C# exe and provide it with two arguments. C# application is a console application. is this possible in vb. If yes, some help would be greatly appreciated.
I am not at all sure that you can call into a managed .EXE from VB6.
However, if C-like exports between VB6 and VB.Net[^] is correct you can call into a managed .dll. If you are able to separate the parts of your application to be called into a dll and apply the principles from the article to it, that might be a resolution to your problem.
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
thanx for replying.
I went through the article you forwarded, and realized that it requires editing in IL. I also read some comments and other articles and am confused whether i should take this approach or not?
If you can provide some more help, i would be really greatfull . Thanx
you probably could organize the C# app as a console app taking its parameters from the command line; and invoke it the way VB6 invokes all EXE files, through some magic function (system? ShellExecute? I don't recall).
FWIW: if the parameters become more complex, I tend to have the master EXE put them in a file, and pass the full filepath (which would contain numeric date and time to make it unique) as the single parameter to the slave EXE.
Luc Pattyn [Forum Guidelines][My Articles] DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
Last Visit: 31-Dec-99 18:00 Last Update: 28-Sep-23 12:25