|
Wouldn't it be too slow to work with worksheets which contain 65000 rows?
modified 6-Oct-18 21:01pm.
|
|
|
|
|
Why don't you try it and benchmark against a sql example. (The Excel solution will definitely be slower.)
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
IMHO with OleDb, creating connection will be a bit slower but querying data should not be.
"The worst code you'll come across is code you wrote last year.", wizardzz[ ^]
|
|
|
|
|
You are correct on a single client, although across a network is a different story.
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
Vista\Win7 - Is it possible to shell and specify an account to run the process under?
Scenario: our company has a program that is a launcher app (kinda like a fancy version of click-once). Based on the arguements passed in, it determines what program the user is trying to run and what files need to be updated (controls, .dlls, etc), pulls them down from a shared directory and registers them (regsvr32 or regasm). After that process is done, the program that was requested is launched via shellex.
In Vista and Win7 the regsvr32 and regasm functionality is broken because of UAC. The user has admin rights to only 1 folder in the Program Files directory (that is the location where the .dlls, etc are pulled down to). Is there a way to perform a shell (so that regsvr32 can be run) using a admin account (specifying user and password in code)?
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Try launching regsvr32 like this:
System.Diagnostics.Process.Start("regsvr32.exe", username, password, domain);
|
|
|
|
|
I tried your suggestion but was unsuccessful.
Process.Start("C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe", """" & "C:\Program Files\CompanyApp\System\dbDAL.dll" & _
"""" & " /codebase", "AdminAcct", pw, "Domain")
The exit code = 100. Nothing errors off, but the assembly isn't registered correctly and can't be instantiated. If I run the SDK command prompt in adminstrative mode and run the same command and arguments, then the object and be instantiated correctly.
Despite specifying the admin account, UAC appears to be blocking the registering. Sigh.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
|
How to use ComboBox DisplayMember and ValueMember without database?
|
|
|
|
|
I use this
color1 = New BaseColor() {iTextSharp.text.BaseColor.BLACK, iTextSharp.text.BaseColor.BLUE, iTextSharp.text.BaseColor.CYAN, iTextSharp.text.BaseColor.DARK_GRAY, iTextSharp.text.BaseColor.GRAY, iTextSharp.text.BaseColor.GREEN, iTextSharp.text.BaseColor.LIGHT_GRAY, iTextSharp.text.BaseColor.MAGENTA, iTextSharp.text.BaseColor.ORANGE, iTextSharp.text.BaseColor.PINK, iTextSharp.text.BaseColor.RED, iTextSharp.text.BaseColor.WHITE, iTextSharp.text.BaseColor.YELLOW}
color2 = New String() {"Черен", "Син", "Циан", "Тъмно сиво", "Сиво", "Зелено", "Светло сиво", "Магента", "Оранжево", "Розово", "Червено", "Бяло", "Жълто"}
For i = 0 To color1.Length - 1
ComboBox2.Items.Add(color2(i))
Next
If File.Exists(TextBox1.Text) Then
File.Delete(TextBox1.Text)
Dim bf As BaseFont = BaseFont.CreateFont(k & "\\arial.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED)
Dim bc As BaseColor
bc = color1(ComboBox2.SelectedIndex)
AddWatermarkText(TextBox3.Text, TextBox1.Text, TextBox2.Text, bf, NumericUpDown1.Value, bc, 50.0F, NumericUpDown2.Value)
Else
Dim bf As BaseFont = BaseFont.CreateFont(k & "\\arial.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED)
Dim bc As BaseColor
bc = color1(ComboBox2.SelectedIndex)
AddWatermarkText(TextBox3.Text, TextBox1.Text, TextBox2.Text, bf, NumericUpDown1.Value, bc, 50.0F, NumericUpDown2.Value)
End If
|
|
|
|
|
There is no need for a database, a DataTable, or anything pre-existing. You want some class, with at least two public properties, and a collection of instances of said class. The collection (e.g. a List) becomes your DataSource; the one string property your DisplayMember, and the other property your ValueMember; so you need to provide the names of those properties in the "DisplayMember" and "ValueMember" properties of your Control (e.g. ComboBox).
|
|
|
|
|
This work for me thanks
Public Class WatermarColors
Private mWatermarkColor As iTextSharp.text.BaseColor
Private mWatermarkBGName As String
Public Sub New(ByVal name As String, ByVal code As iTextSharp.text.BaseColor)
mWatermarkBGName = name
mWatermarkColor = code
End Sub
Public Property WatermarkBGNames() As String
Get
Return mWatermarkBGName
End Get
Set(ByVal value As String)
mWatermarkBGName = value
End Set
End Property
Public Property WatermarkColors() As iTextSharp.text.BaseColor
Get
Return mWatermarkColor
End Get
Set(ByVal value As iTextSharp.text.BaseColor)
mWatermarkColor = value
End Set
End Property
Public Overrides Function ToString() As String
Return mWatermarkBGName
End Function
End Class
color1 = New BaseColor() {iTextSharp.text.BaseColor.BLACK, iTextSharp.text.BaseColor.BLUE, iTextSharp.text.BaseColor.CYAN, iTextSharp.text.BaseColor.DARK_GRAY, iTextSharp.text.BaseColor.GRAY, iTextSharp.text.BaseColor.GREEN, iTextSharp.text.BaseColor.LIGHT_GRAY, iTextSharp.text.BaseColor.MAGENTA, iTextSharp.text.BaseColor.ORANGE, iTextSharp.text.BaseColor.PINK, iTextSharp.text.BaseColor.RED, iTextSharp.text.BaseColor.WHITE, iTextSharp.text.BaseColor.YELLOW}
color2 = New String() {"Черен", "Син", "Циан", "Тъмно сиво", "Сиво", "Зелено", "Светло сиво", "Магента", "Оранжево", "Розово", "Червено", "Бяло", "Жълто"}
For i = 0 To color1.Length - 1
CboWatermarkColor.Items.Add(New WatermarColors(color2(i), color1(i)))
Next
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
If File.Exists(TextBox1.Text) Then
File.Delete(TextBox1.Text)
Dim bf As BaseFont = BaseFont.CreateFont(k & "\\arial.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED)
Dim bc As BaseColor
Dim WatermarkSelectColor As WatermarColors
WatermarkSelectColor = CType(CboWatermarkColor.SelectedItem, WatermarColors)
bc = WatermarkSelectColor.WatermarkColors
AddWatermarkText(TextBox3.Text, TextBox1.Text, TextBox2.Text, bf, NumericUpDown1.Value, bc, 50.0F, NumericUpDown2.Value)
Else
Dim bf As BaseFont = BaseFont.CreateFont(k & "\\arial.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED)
Dim bc As BaseColor
bc = color1(CboWatermarkColor.SelectedIndex)
AddWatermarkText(TextBox3.Text, TextBox1.Text, TextBox2.Text, bf, NumericUpDown1.Value, bc, 50.0F, NumericUpDown2.Value)
End If
|
|
|
|
|
Dim lst as New List(Of WatermarkColor)
lst.Add(New WatermarkColor(watermarkBGName,watermarkColor)
cboWatermarkColors.DataSource = lst
cboWatermarkColors.DisplayMember = "WatermarkBGName"
cboWatermarkColors.ValueMember = "WatermarkColor"
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
I need some help here. First I have never replease a VB app before, so I'm new to this.
Second details. The app is developed in Visual Studio VB 2010 under XP Pro SP3. It's to be run in Win PE for Windows 7.
Now I know I'll have to have the .NET Framework installed on the Win PE disk, but can I just install the latest version or do I have to have all the versions available on the development machine?
How do I release the application into the appropiate Win PE build area?
The application uses the system.management namespace, do I have to manually copy the appropiate dll to build area or will be automatically there as part of .NET Framework install.
Thank you in advance
|
|
|
|
|
Since the app is built using VS 2010, you'll need (atleast) .NET Framework 4.0 installed on the target computer.
Starting .NET 4.0, Applications that are built to target '.NET 4.0 Client Profile' automatically install a trimmed version of .NET Framework 4.0 if it does not find .NET Framework 4.0 already installed.
|
|
|
|
|
.NET is AFAIK[^] not officially supported in the PE-environment.
Bastard Programmer from Hell
|
|
|
|
|
Right answer unfortunately
It looks like I'll have to have a rethink
|
|
|
|
|
C will be good, Delphi would be supported, VB6 would also be supported. You could also take a look at the CrossNet Compiler[^] if you "must" work in the .NET environment. Another alternative might be incorporating the Mono-runtime from a C application.
The Preinstall Environment isn't meant to be used as a lightweight OS, and it'll be lacking all kind of stuff that you're grown used to in Windows. If you're looking for a small OS with .NET support, consider Knoppix with Mono.
Hope this helps a bit more than the previous answer
Bastard Programmer from Hell
|
|
|
|
|
|
This is not good form. Post your question here, as I fear you will be down voted.
For what it is worth, you can use ADODBConnection to JET engine and write queries against your Worksheets.
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
OK I looked, now what?
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
This event fires twice when the right or left arrow is clicked, but only some times with no rhyme or reason.
Protected Overrides Function ProcessKeyPreview(ByRef m As System.Windows.Forms.Message) As Boolean
Select Case m.WParam.ToInt32()
Case 37
Me.DtRecordInfoBindingSource.MovePrevious()
Return True
Case 39
Me.DtRecordInfoBindingSource.MoveNext()
Return True
End Select
Return False
End Function
I read elsewhere that some times this particular thing occurs when an event is double-subscribed, but I don't believe that is the case here. Anyone have a thought on why this might be double firing?
Cheers, --EA
|
|
|
|
|
I've never overriden ProcessKeyPreview and don't really know the specifics of its working but the first thing I think of would be if its called on each key make and break (key down and up).
|
|
|
|
|
That helped me to isolate the issue, it seems to be firing on down and up. I was able to fix it with this:
Protected Overrides Function ProcessKeyPreview(ByRef m As System.Windows.Forms.Message) As Boolean
Const WM_KEYDOWN As Integer = 256
If m.Msg = WM_KEYDOWN Then
Select Case m.WParam.ToInt32()
Case 37
Me.DtRecordInfoBindingSource.MovePrevious()
Return True
Case 39
Me.DtRecordInfoBindingSource.MoveNext()
Return True
End Select
End If
Return False
End Function
|
|
|
|
|
Receiving a message on both key up and key down is desired behaviour
With key-repeat, when holding down a key, you'll get lots of WM_KEYDOWN messages before receiving a WM_KEYUP.
|
|
|
|
|