|
Thanks Richard,
I knew that access rights was the problem, and the keyword answer for me is "Application Manifest". I wondered why it didn't prompt the user (me in this case) to decide whether or not to allow the program to write to the hard drive.
I should be able to alter the manifest accordingly.
Thanks again.
|
|
|
|
|
No problem; it's strange how the obvious is often the last thing we look at.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Actually, now a funny thing. I altered the app.manifest accordingly, and no matter what edit I had done, still I had "ring-around-the-collar" - Windows wouldn't let me write there because of Access rights.
At 6am, when I finally decided to call it a night and leave the problem to be revisited tomorrow-today (lol), I did a save all in VS12 and hit the magic "x". When VS shut down, it prompted me with a dialog saying that it "did not function correctly" and suggested that it log me in as administrator - and once it re-logged me in, it wrote just fine with the code that I had.
Moral of the story: Go ahead and give up, then Windows will allow your code to work correctly!!!
|
|
|
|
|
I guess you were trying to run the application from within a 'non-administrative' execution of Visual Studio. Had you run the enhanced app from a command prompt or Windows Explorer, then it probably would have done what you required. Yes, it's sometimes a pain, but much better than some cheap virus trashing your system.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
The "All Users" folder is only writable by account with admin priv's. If a normal user runs your app, they will never be able to write the shortcut (you ARE putting a shortcut and not the actual .EXE in there aren't you?!) to that folder.
If an admin rusns the app, it'll work just fine. If the system has UAC turned on, the user will get the UAC prompt to ask you if they want to use their admin priv's to do this. This won't work when launched from inside Visual Studio by the way.
Since "All Users" is considered a system setting, this makes perfect sense. If you want individual users to be able to pick whether they want this app to launch when they log in, you should be putting the shortcut in the users Startup folder, not All Users. Every user has read/write permissions to their own Startup folder.
|
|
|
|
|
HI everyone,
I wanted to display the report data in the range of 2 datetimepicker but I am not experience and knowledgeable in ReportViewer.
My situation:
Form1 is a form where user select a range of date between 2 datetimepicker then click the button to show the report in form2.
My query in query builder will be like this:
"Where (Date Between @Param1 AND @Param2)"
If there is better way like able to have selection like select monthly, yearly to display the report is even better.
I would really appreciate it, if someone can give me an example of coding and explanation. So far, I know how to create the report and dataset for it but the parameter part I am really out of Ideas.
|
|
|
|
|
Why my report menu does not have the "Report Parameter" selection expect for "Report Properties","Add Page Header","Add Page Footer","Ruler", and "Grouping"? How to get the Report Parameter out?
|
|
|
|
|
hi
Want to know more about Trace
What used to be
Thank
modified 14-Sep-12 13:20pm.
|
|
|
|
|
alirezamansoori wrote: apples
What kind of apples do you want to know more about? Red apples? Green apples? Yellow apples? Apple the company? What does this have to do with any kind of Visual Basic question?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
|
alirezamansoori wrote: trace
And what about trace? Are you looking for something like this[^]?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
They used to be seeds.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
|
That still doesn't help much, but I guess you are looking for something along these lines[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hi, I'm new in vb.net
What the difference of these codes
for u = 0 to datatable.rows.count - 1
next
for each rows in datatable.rows
next
assuming process code are to parsing data datatable.rows either to search or to print or to calculate.
which one is faster ?
can someone give me some enlighment ?
sorry for bad english.
|
|
|
|
|
One loop is an indexer and the other is an enumator.
Indexers can modify the collection while you're iterating over it while enumators cannot.
Indexers are a little faster than enumerators, but also require you to know more about the size and types the array holds.
|
|
|
|
|
Thank You Dave. It clear my mind.
|
|
|
|
|
Just to add to Dave's comment - The for-loop is faster than the foreach-loop if the array must only be accessed once per iteration. (More Details with Benchmark Test[^]).
|
|
|
|
|
Thank you Pravin for the link. It gives me an understanding.
|
|
|
|
|
My pleasure yuifox... Happy coding
|
|
|
|
|
El segundo código es mas eficiente y rapido.
_______________________
Edward J. Ocando. | Desarrollador | SoyDesarrollador.net
Telefono. +58 (416) 164.34.88 | Edward.Ocando@soydesarrollador.net
|
|
|
|
|
I'm having a problem I can't seem to find the source of in a program I'm developing. The following function parses an XML file to find the names of registry keys and associated values that are linked to the selection of a drop-down box in the UI. The function retrieves keys with no problem. when asking for the values, it always returns 0, and I can't seem to figure out why. Thanks for taking a look and any suggestions/solutions you may come up with.
I've included the source of the function below and a sample of the XML -
Public Function GetCfgOption(ByVal strSetting As String, ByVal intSelectedIndex As Integer, ByVal strDataType As String, Optional ByVal intOptIndex As Integer = 0) As String
Dim xmlSettings As New Xml.XmlDocument
xmlSettings.Load("SrcBench.xml")
Dim nodeSetting As Xml.XmlNode
nodeSetting = xmlSettings.SelectSingleNode("/CONTENT/Settings/" & strSetting & "[Index='" & intSelectedIndex & "']")
Dim nodeOption As Xml.XmlNode
nodeOption = nodeSetting.SelectSingleNode("/CONTENT/Settings/" & strSetting & "/Setting[@Index='" & intOptIndex & "']")
Select Case strDataType
Case "Key"
Return nodeOption.ChildNodes.Item(0).InnerText
Case "Value"
Return nodeOption.ChildNodes.Item(1).InnerText
End Select
Return Nothing
End Function
This function would be called like so:
GetCfgOption("FilterMode", intFilterModeIndex, "Key"<, 0>)
GetCfgOption("FilterMode", intFilterModeIndex, "Value"<, 0>)
GetCfgOption("FilterMode", intFilterModeIndex, "Key", 1)
GetCfgOption("FilterMode", intFilterModeIndex, "Value", 1)
This could be tested using a Console.WriteLine() statement. Calling the function with "Value" always returns "0".
The following is a section of the XML file being accessed:
="1.0"="UTF-8"
<CONTENT>
<Settings>
<FilterMode>
<Index>0</Index>
<Option>Bilinear</Option>
<Setting Index="0">
<Key>mat_forceaniso</Key>
<Value>0</Value>
</Setting>
<Setting Index="1">
<Key>mat_trilinear</Key>
<Value>0</Value>
</Setting>
</FilterMode>
<FilterMode>
<Index>1</Index>
<Option>Trilinear</Option>
<Setting Index="0">
<Key>mat_forceaniso</Key>
<Value>1</Value>
</Setting>
<Setting Index="1">
<Key>mat_trilinear</Key>
<Value>1</Value>
</Setting>
</FilterMode>
<FilterMode>
<Index>2</Index>
<Option>2x Anisotropic</Option>
<Setting Index="0">
<Key>mat_forceaniso</Key>
<Value>2</Value>
</Setting>
<Setting Index="1">
<Key>mat_trilinear</Key>
<Value>0</Value>
</Setting>
</FilterMode>
<FilterMode>
<Index>3</Index>
<Option>4x Anisotropic</Option>
<Setting Index="0">
<Key>mat_forceaniso</Key>
<Value>4</Value>
</Setting>
<Setting Index="1">
<Key>mat_trilinear</Key>
<Value>0</Value>
</Setting>
</FilterMode>
<FilterMode>
<Index>4</Index>
<Option>8x Anisotropic</Option>
<Setting Index="0">
<Key>mat_forceaniso</Key>
<Value>8</Value>
</Setting>
<Setting Index="1">
<Key>mat_trilinear</Key>
<Value>0</Value>
</Setting>
</FilterMode>
<FilterMode>
<Index>5</Index>
<Option>16x Anisotropic</Option>
<Setting Index="0">
<Key>mat_forceaniso</Key>
<Value>16</Value>
</Setting>
<Setting Index="1">
<Key>mat_trilinear</Key>
<Value>0</Value>
</Setting>
</FilterMode>
</Settings>
</CONTENT>
|
|
|
|
|
How can I design web user account and login using Visual basic 8
|
|
|
|
|
|
I have to design a form with LISTBOX,FIELD to display name,CAPITAL CITY and estimeted population of selected country.
Pleas just give me a clue or enlightment!
|
|
|
|