|
Are you trying to find out if a particular person has permissions before writing to a file or what?? Why are you doing this?? Maybe there is another way besides trying to get the ACL for a folder.
|
|
|
|
|
FileSystem.GetAttr("C:\here") = vbReadOnly
You don't get very much more.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
hi
Previously I was using frmStart as my startup object and in Form_Load I was calling LinkExecute if my frmStart is already loaded.
Now I have changed my startup object and using Sub Main() to show or hide frmStart.
Problem is that now when I call LinkExecute in the frmStart Load the execution goes fine but Object gets unloaded automatically. I get Error '364'
After LinkExecute I have Unload Me command but control never reaches there.
please tell me how to avoid the "Object was unloaded" error.
Thanks.
|
|
|
|
|
I have no clue what you're talking about...
Is this a VB6 app or VB.NET?? What are you doing with "LinkExecute"?? on what object is it being called?? What's the complete error message you're getting??
|
|
|
|
|
please see following details:
public Sub Main()
If App.PrevInstance Then
If Command$ <> vbNullString Then
myform.HiddenText.Text = Command$
myform.HiddenText.LinkTopic = "MyApplication|SendCmd"
myform.HiddenText.LinkMode = vbLinkManual
myform.HiddenText.LinkExecute myform.HiddenText.Text
myform.HiddenText.LinkMode = vbLinkNone
End If
Unload myform
Exit Sub
Else
'perform some checks
End If
'pseudo code
If checks are not valid
show message and exit
else
if command$ has value
myform.show
else
myform.hide
end if
end if
Exit sub
End Sub
Now in this case i get "Timeout while waiting for DDE response".
Please reply.
modified on Monday, June 15, 2009 12:39 AM
|
|
|
|
|
I couldn't tell you. I haven't touched VB6 in over 8 years now. Sorry.
|
|
|
|
|
Hi CP,
i am using the custom font to hide the properties
Public Class MyCustomFont
Inherits FontConverter
Public Overrides Function GetPropertiesSupported(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean
Return False
End Function
End Class
Now i want to hide the Script : ComboBox which exists in the bottom of the FONT Dialog .
how can i implement in this code ??
Regards ,
|
|
|
|
|
I don't know if this is what you are looking for or not. This doesn't make the combobox disappear completely, but it gets rid of all of the choices except for the default.
Dim myFont As New FontDialog
myFont.AllowScriptChange = True
myFont.ShowDialog()
Hope that helps.
-Ray
|
|
|
|
|
Public Class MyCustomFont
Inherits FontConverter
Public Overrides Function GetPropertiesSupported(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean
Return False
End Function
End Class
<Category("Appearance")> <Description("The font used to display text in the control")> _
<TypeConverter(GetType(MyFont))> _
Public Property Font() As Font
Get
Return _Font
End Get
Set(ByVal Value As Font)
_Font = Value
End Set
End Property
I am showing the FONT in this way in the propertygrid . While showing the FONT Dialog then the Script Combobox should not be shown .
Regards
|
|
|
|
|
I am reading an excel sheet into datatable. in excel sheet one column has values like (70,1) instead of decimal "," is used as decimal seperator.
i want to change the "," into "." in the table without looping each row for that column. one way is to set the culture but that doesnt change the value of the data already in the table.
is there a way of changing the values of columns
|
|
|
|
|
I imagine the answer is probably that the data should be stored as numbers, so that it reflects the current culture when it is read in. I think there may be a tryParse that takes a culture, so you could convert from the known source culture, put in the table as double, and then let the system display it correctly ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
another way is setting the culture and then changing it
Dim dt As New DataTable
Dim myCultureInfo As New System.Globalization.CultureInfo("nb-NO")
dt.Locale = myCultureInfo
dt.Columns.Add("T", System.Type.GetType("System.Decimal"))
Dim dr As DataRow
dr = dt.NewRow
dr(0) = "70,1"
dt.Rows.Add(dr)
dr = dt.NewRow
dr(0) = "80,1"
dt.Rows.Add(dr)
Dim myCultureInfo1 As New System.Globalization.CultureInfo("en-US")
dt.Locale = myCultureInfo1
|
|
|
|
|
Im looking for some help;
I have a windows application devekoped. In vb.net
I have a crystal report viewer for displaying my reports, I have various different report forms which use this viewer.
My problem is that the export button defaults to a .rpt extension , and I need it to default to .xls
I have come across the exportoptions class and created a button using this, but this exports as soon as button is hit.
I want the exact same functionality as you get for the standard export button, I just don’t want the default save as to be ‘rpt’, I want it to be ‘xls’ and still allow the user to changes their export type, probably involving the SaveFiledialog component
Prob is.. I have no idea how its done.. anyone got any ideas or better some code. Id really appreciate help on this.
|
|
|
|
|
I have a program that does something similar, but I always export to PDF. I don't think there is a way to set the default file extension of the export button on the viewer. You need to hide the button on the crystal reports viewer and create your own version of the button in order to do what you are asking. In order to export it, you need to use the ExportToDisk method on the ReportDocument object, not the Viewer. You don't actually even need a crystal reports viewer object to export a report, only to display it to the user.
|
|
|
|
|
Ooops, I meant to comment about the dialog too. Drag a Save Dialog box control onto your form, to set the default file extension you would do something like this:
'This sets default settings on a save dialog called dlgExport
With dlgExport
.Filter = "Excel Files (*.xls)|*.xls|All Extensions (*.*)|*.*"
.FilterIndex = 1
.RestoreDirectory = True
.Title = "Export"
.AddExtension = True
.FileName = String.Empty
End With
'This is what you would put in the export button's click event:
If dlgExport.ShowDialog = Windows.Forms.DialogResult.OK Then
'You probably want to add checks to make sure dlgExport.FileName is valid first
reportDocument1.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.Excel, dlgExport.FileName)
End If
|
|
|
|
|
Works Perfect! Thank you.
|
|
|
|
|
Hello,
could someone please give me an idea how to get the localized folder names (e.g. 'users', 'program files' etc) in VB.NET? I'm using the GetDirectories method, and can only get the English folder names.
Thank you
Michael
modified on Friday, June 12, 2009 3:12 AM
|
|
|
|
|
Michael Schäuble wrote: could someone please give me an idea how to get the localized folder names (e.g. 'users', 'program files' etc) in VB.NET? I'm using the GetDirectories method, and can only get the English folder names.
I'm not quite understanding what you want. If you ask for a list of directories you will get back a list of what exists on the disk. If the directrory names are in your local language then that is what you will get.
Or, are you looking for something line Environment.SpecialFolder[^] which is used in conjunction with Environment.GetFolderPath[^]?
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
I've just seen your other question and I think I understand a little better now, but it stumped me. I've not seen that before (and I have used the Dutch and Spanish versions of Windows in he past).
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
From the responses I figured that I'm facing an unusual behaviour of GetDirectories!
So I published the project and run it on an XP Machine... finding out that under XP I get the localized (German) folder names shown! Under Vista, GetDirectories lists the English folder names only.
Does anyone know a bit more about the issue?
Thanks a lot,
Michael
|
|
|
|
|
How to looping all items in combobox in a web page with a for next???
Just for example use one combobox from a web page wich you desire
I know Html Library and use the ie object
|
|
|
|
|
Your going to have to expain what you're doing with this a bit more. Are you saying you want to iterate through the items in a combo on the client-side?? Or are you retrieving a web page in your VB.NET code and trying to get at the combo box in the HTML you get back??
|
|
|
|
|
How can I get ARW Thumbnails with VB.Net. Windows Explorer can! So there should be a solution......
Regards
Hans
|
|
|
|
|
I assume you're talking about the Sony RAW image format. The software you install for the Sony camera installs a componet that is registered with Explorer to generate the thumbnail images. Explorer actually doesn't generate the images at all. It just calls various components that register themselves with Explorer so Explorer knows which one to call to have a thumbnail generated.
No, I don't know what that component is called or how to get at it.
|
|
|
|
|
Working on converting an application from VB6 to .net.
After conversion I got the following error:
A custom wrapper for this COM component has been installed on your machine after you added this reference. This wrapper may provide additional cpabilities not offered by the auto-generated wrapper currently in use
it asked if I wanted to update it so I did, now I get several errors
'MSComctlib.Button' add one to you project.
I am not sure exactly what this is telling me to do...
Help!
[edit] never mind. Figured out what happened... boy this is fun....
modified on Thursday, June 11, 2009 2:23 PM
|
|
|
|