|
yeah, I had already tried that (I should´a mention it), but when I compiled and tried to 'use' the .dll (like an api) from another one of my proj´s, there was an error that read 'There is no insertion point for my_1st_dll.dll', or sth of the like.
Well, 10x for the interest j15, any other ideas?
Pablo.Ar
|
|
|
|
|
Have you tested the dll by adding the project to a project group with just a test form? I would test like this first, then if all seems ok i would re-compile the dll and dont forget to regsvr32 it (should not need this as i think the process of compiling does this but it wont hurt)
Jon
|
|
|
|
|
oooooh, thanks for reminding me of regsvr32!!! I think that´s what it´s been all about. Well, I´ll try that (...and testing the dll from a vbg) and tell you about it later. Thanks a million.
Pablo.Ar
|
|
|
|
|
Hi all,
Is there any way to find out if a word is a reserved keyword of SQL Server with .NET? Or how can I retrieve all the reserved keywords of SQL Server?
Thanks.
Frank
|
|
|
|
|
There is no way to get SQL Server to return all the reserved words. You'll have to put a table together and type them in from the documentation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi coders
I'm very new to coding and desperately need some help
I am writing a small Internet cafe type program that controls internet access. It works fine by stopping the process "iexplorer". however users can still access internet via other applications and windows-explorer (explorer.exe). I can close any programs started after my application, but i cannot work out how to control / close explorer without forcing shut down. On my machine I can check if explorer has a mainwindowtitle and then process.closemainwindow. This works fine on my machine but on some other machines closing explorer (even if it has a visible open window) forces a shut-down.
any advice on:
a. ways to hide or restrict explorer
c. why my explorer launches a new visble process and others dont (i have set folder options "launch in seperate process" )
b. ways to deny access to Internet via any method
please help
|
|
|
|
|
check out this link it may help
http://www.winguides.com/registry/display.php/1288/
"Small Men Standing on Giants Is Better Than Giants Standing on Small Men"
|
|
|
|
|
I am working in Whidbey (VStudio 2005) using Visual Basic. I am trying to create a picture box that is simply a light transparent yellow (kind of like a highlighter) where I can see the controls, images, etc... that are underneath.
I was able to do this in VB6, but can't seem to figure it out in Whidbey. Anyone know how to do this?
Thanks!
|
|
|
|
|
I have the following code where I want to delete a directory that might have multiple levels of sub-directories and multiple files and additional folders within each directory.
Try
Dim strToDir As String = "c:\test"
If Directory.Exists(strToDir) Then
Directory.Delete(strToDir, True)
End If
Catch ex As Exception
MsgBox("Error: " & ex.Message)
End Try
When one of the files anywhere within the directory that I am deleting is read-only, I receive the following error:
Error: Access to the path "IamReadOnlyHaHa.txt" is denied.
Is there any way around this error?
Thanks in advance for any input you might have...
Lost in the vast sea of .NET
|
|
|
|
|
Access Denied would indicate that you don't have the rights to delete that file, not that it is ReadOnly. There is no way around that kind of a problem because of security other than getting the account that your app is running under the proper rights.
It is possible to delete a ReadOnly file if it's attribute in the directory are ReadOnly. The Delete method will still delete the file without any problems if this is the case.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If I change the read-only attribute on the file to no longer be read-only and I rerun the process it works fine. I've had this application running for a couple of months and the only time it errors out is when a read-only file is put in the directory the app is trying to delete.
Like I said the app has no problem deleting normal attribute files, but read-only files it errors out. Maybe the security is causing an issue on read-only files being deleted. I'll test the app locally and see if I receive the same results.
Thanks
Lost in the vast sea of .NET
|
|
|
|
|
It wasn't security related at all. Below is a link to the suggested code I received on another message board. This code worked great and solved the problem entirely.
http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=259421&Page=1#259432
Thanks for the reply! Every bit of input helps...
Lost in the vast sea of .NET
|
|
|
|
|
Yesterday I posted the thread Help With Find Functionality. I am still in need of help. I am trying to put a search field in a simple contact manager. The manager uses an Access 2000 table to store the contacts last names. I would like to search these last names using partial matches, (ie. re would find Reid.) Is there a simple way to do this? If anyone has any ideas, a code snipit, or a starting point that I can adapt it would be greatly appreciated. The post Help With Find Functionality has several pieces of code that represent my attempts.
Thanks for your help.
Andy S.
|
|
|
|
|
The problem your previous code is having is in the fact that your doing the search yourself instead of using the functionality of the database to do it for you, which is much simpler. All you need to do is write up an SQL SELECT statement that uses the search criteria provided by the user.
In a general case
SELECT * FROM Contacts WHERE LastName LIKE "%[?LastName]%"
[?LastName] is a placeholder for a parameter that you have to supply with an OleParameter object.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the help Dave. I am a beginner, and am not familiar with the OleParameter object. Your post gives me a good place to start learning from. My work with SQL statements have been primarilly through the wizard.
Thanks
Andy S.
|
|
|
|
|
i need to retrieve all object from a project
the project is an acces database adp or mdb or ade
iwant to show all objects name with out opening the project
i need help about opening a mdb acces file
shay dayan
shay@amitec-g.com
|
|
|
|
|
In the "rich text box", i set "Scrollbars" to "3-rtfboth" with "Multilines" set to "true". The problem is the horizontal scrollbar never appear and the text just return and re-start at the beginning of next line when it reach the right side of the rich box.
|
|
|
|
|
The horizontal scroll bar will NOT appear if the WordWrap property is set to True , which is the default for a RichTextBox .
See the docs for WordWrap here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The horizontal scroll bar appear only when you set muti-line to false. But it won't show the vertical scroll bar wether you set Scroll bar to "3-rtfboth".
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Komsot man from SCN-CO wrote:
The horizontal scroll bar appear only when you set muti-line to false
This is not true. You can have a multi-line RTB with lines that extend beyond the limit of the control, thereby showing the horizontal scroll bar. The MultiLine property doesn't disable any of the scrollbars.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I mean in vb6. Not vb.net.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
According to the docs, still not true.
From the VB6 RichTextBox docs:
Remarks
For a RichTextBox control with setting 1 (Horizontal), 2 (Vertical), or 3 (Both), you must set the MultiLine property to True.
At run time, the Microsoft Windows operating environment automatically implements a standard keyboard interface to allow...
And from the VB6 MultiLine (RTB Control) docs:
Remarks
A multiple-line RichTextBox control wraps text as the user types text extending beyond the text box.
You can also add scroll bars to a larger RichTextBox control using the ScrollBars property. If no HScrollBar control (horizontal scroll bar) is specified, the text in a multiple-line RichTextBox automatically wraps.
[EDIT]
Oooppss! I forget to put in here, that you can change the RightMargin property so it sits outside the visible boundries of the RTB control to get the scroll bar to appear when multiline text goes outside the visible boundries of the control.
From the VB6 ScrollBars property of the RichTextBox control:
A horizontal scrollbar will appear only when the RightMargin property is set to a value that is larger than the width of the control. (The value can also be equal to, or slightly smaller than the width of the control.)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I wrote a small program, that accesses a database to pull information. My problem is that I am not working on the program at the install location, and the file needed resides on a network share at the location. How can I code the program to use the file that I need it to? I can send the code if needed for what I have done so far, and any help would be greatly appriciated.
|
|
|
|
|
I would have to see the code really, and then i still might not be able to help.
cheers
|
|
|
|
|
Here is a snipit of the code. I can e-mail the source file to you if you supply me with an e-mail address. Also, when looking at the code, it is fairly simple. Most of the work is done with an (odbdataadapter).
Public Class frmUPS
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents OleDbDataAdapter1 As System.Data.OleDb.OleDbDataAdapter
Friend WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand
Friend WithEvents OleDbConnection1 As System.Data.OleDb.OleDbConnection
Friend WithEvents txtOENum As System.Windows.Forms.TextBox
Friend WithEvents btnExecute As System.Windows.Forms.Button
Friend WithEvents lblOENum As System.Windows.Forms.Label
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
Friend WithEvents Dsups1 As UPS.dsups
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmUPS))
Me.OleDbDataAdapter1 = New System.Data.OleDb.OleDbDataAdapter
Me.OleDbSelectCommand1 = New System.Data.OleDb.OleDbCommand
Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection
Me.txtOENum = New System.Windows.Forms.TextBox
Me.btnExecute = New System.Windows.Forms.Button
Me.lblOENum = New System.Windows.Forms.Label
Me.DataGrid1 = New System.Windows.Forms.DataGrid
Me.Dsups1 = New UPS.dsups
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Dsups1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'OleDbDataAdapter1
'
Me.OleDbDataAdapter1.SelectCommand = Me.OleDbSelectCommand1
Me.OleDbDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "calPackage", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("Sm_referenceText0", "Sm_referenceText0"), New System.Data.Common.DataColumnMapping("Sm_trackingNo", "Sm_trackingNo")})})
'
'OleDbSelectCommand1
'
Me.OleDbSelectCommand1.CommandText = "SELECT Sm_referenceText0, Sm_trackingNo, m_foreignKey FROM calPackage WHERE (m_is" & _
"PkgVoid = 0) AND (Sm_referenceText0 = ?) ORDER BY m_foreignKey DESC"
Me.OleDbSelectCommand1.Connection = Me.OleDbConnection1
Me.OleDbSelectCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Sm_referenceText0", System.Data.OleDb.OleDbType.VarWChar, 35, "Sm_referenceText0"))
'
'OleDbConnection1
'
Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _
"ocking Mode=0;Jet OLEDB:Database Password=;Data Source=""C:\upsdb.mdb"";Password=;" & _
"Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk Transactions=1;Provider=""Microsoft" & _
".Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;Extended Properti" & _
"es=;Mode=Read;Jet OLEDB:New Database Password=;Jet OLEDB:Create System Database=" & _
"False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Rep" & _
"lica Repair=False;User ID=Admin;Jet OLEDB:Encrypt Database=False"
'
'txtOENum
'
Me.txtOENum.Location = New System.Drawing.Point(172, 40)
Me.txtOENum.Name = "txtOENum"
Me.txtOENum.Size = New System.Drawing.Size(96, 20)
Me.txtOENum.TabIndex = 0
Me.txtOENum.Text = "Order Number"
'
'btnExecute
'
Me.btnExecute.Location = New System.Drawing.Point(184, 280)
Me.btnExecute.Name = "btnExecute"
Me.btnExecute.Size = New System.Drawing.Size(72, 24)
Me.btnExecute.TabIndex = 1
Me.btnExecute.Text = "E&xecute"
'
'lblOENum
'
Me.lblOENum.Location = New System.Drawing.Point(172, 16)
Me.lblOENum.Name = "lblOENum"
Me.lblOENum.Size = New System.Drawing.Size(96, 16)
Me.lblOENum.TabIndex = 3
Me.lblOENum.Text = "Order Number"
'
'DataGrid1
'
Me.DataGrid1.DataMember = ""
Me.DataGrid1.DataSource = Me.Dsups1.calPackage
Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.DataGrid1.Location = New System.Drawing.Point(16, 88)
Me.DataGrid1.Name = "DataGrid1"
Me.DataGrid1.PreferredColumnWidth = 125
Me.DataGrid1.ReadOnly = True
Me.DataGrid1.Size = New System.Drawing.Size(416, 184)
Me.DataGrid1.TabIndex = 4
'
'Dsups1
'
Me.Dsups1.DataSetName = "dsups"
Me.Dsups1.Locale = New System.Globalization.CultureInfo("en-US")
'
'frmUPS
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(440, 318)
Me.Controls.Add(Me.DataGrid1)
Me.Controls.Add(Me.lblOENum)
Me.Controls.Add(Me.btnExecute)
Me.Controls.Add(Me.txtOENum)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False
Me.Name = "frmUPS"
Me.Text = "UPS Tracking # Retreiver"
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Dsups1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub btnExecute_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExecute.Click
' The following line passes the value the user enters for the OE Number.
OleDbDataAdapter1.SelectCommand.Parameters("Sm_referenceText0").Value = txtOENum.Text
Dsups1.Clear()
OleDbDataAdapter1.Fill(Dsups1)
End Sub
End Class
|
|
|
|