|
Hi,
... or you can ask a Windows Explorer component to do it its way; in C# you would need
this P/Invoke prototype, something similar would apply to VB.NET:
[DllImport("shlwapi.dll", CharSet=CharSet.Unicode, ExactSpelling=true)]
private static extern int StrCmpLogicalW(string s1, string s2);
|
|
|
|
|
Hi, I have written a small Windows Service app in VB.Net (1.1) to monitor the event logs on my server (Windows Server 2003), and I have modified a couple of my existing apps to write to the Application Event Log.
The events are writing to the log OK (I can see them fine in Event Viewer). And the Monitor can see new events being logged in both the System and Security logs.
But it does not react to any events being created in the Application log, either from my own apps or any others.
Does anyone have any suggestions why this could be? I have coded the three event log instances just the same, yet only 2 out of 3 work as expected. Thanks in advance.
|
|
|
|
|
Well.. I've done something similar in the past and never had issues with it. The Application log is not really different so my best guess (without any code) would be a typo somewhere.
Do you have any errors it returns ? Or maybe an idea where in your code it happens ? Posting this would help a lot..
Meanwhile.. simple, little piece of code to list stuff in the eventlogger:
(console app)
dim elEvent as new system.diagnostics.EventLog("Application")
dim elEventEntry as System.diagnostics.EventLogEntry
for each elEventEntry in elEvent.Entries
console.writeline(elEventEntry.TimeGenerated.Tostring & " - " & elEventEntry.Source.Tostring & " - " & _
elEventEntry.Category.Tostring & " - " & vbcrlf & vbcrlf & elEventEntry.Message.tostring)
next
|
|
|
|
|
Thanks. I've now discovered that it is in fact managing to react to some events in the application log - I left it active overnight and it spotted some virus software log entries.
So the problem is actually not what I thought - it is reacting to some changes in the Application log, just not all of them.
I think I'll have to look more deeply into the difference between my events and the virus software ones to see where they differ.
Helen Bull
|
|
|
|
|
i have two WebBrowser object on my Form with following line of code against a button click event
WebBrowser1.Navigate("http://localhost/WebApplication1/Default.aspx")
WebBrowser2.Navigate("http://localhost/WebApplication1/Default.aspx")
in Default.aspx i am displaying SessionID ...
Default.aspx page is showing same SessionID for both WebBrowser1,and WebBrowser2 objects.
how to get different sessionID in both WebBrowser1,and WebBrowser2 controls?
r00d0034@yahoo.com
|
|
|
|
|
Make sure you are on different sessions.. i think the default behaviour of the WebBrowser control inherits from Internet Explorer stuff ( probably).. and as I recall, while in the same thread or executable, sessions are shared. ( like in internet explorer when you open different tabs in the same browser)
|
|
|
|
|
am using asp role / membership provider i created with aspnet_reg
i can create user and assign them role
but when the want sign in it keep rejecting them. any solution pls
|
|
|
|
|
Perhaps asking in the right forum ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi all
i want to change the leftmost dimension of a two - dimensional array. but redim statement does not change the Left Most dimension. For example i declare a two-dimensional array as following
Dim WrappingItemInfo(0, 4) As String
after that i write following statement at particular condition
ReDim Preserve WrappingItemInfo(1, 4)
but above statement give error "'ReDim' can only change the rightmost dimension.".
so how can i change the leftmost dimension of an array ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
set WrappingItemInfo(1) to be a new array of four elements. This would work in C#, should work in VB.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
sir,
thanks for your response but i does not properly get you
can you explain it bit more with code(whether in c# or vb)
one more thing. in my previous post, i simply give a example. In real condition, Leftmost dimension of an array is increased every time by one when a particular condition is found.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
int [,] n = new int[5,5]();
n[0] = new int[5]();
something like that
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You should use a dynamic collection instead of an array, like a List(Of String()).
An array can't be resized, so what the ReDim command does is to create a new array, and copy all data from the old array to the new array. It can get pretty expensive as the array grows...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello
How i can let the user who use my application when he click enter
so the button1_click event is fire
Thank for your help
Assaf
|
|
|
|
|
Well, don't call it button1, for a start ( that's just dumb )
You have properties on the form for the AcceptButton and CancelButton. These set what buttons are pressed by Enter and Escape
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm sorry to ask this question on this form, it's an asp.net application
But Thanks for your help
Assaf
|
|
|
|
|
Ah... well, it's good to consider the forum you use, and how you word the question, so you can feel sure people will actually understand what you're asking.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi ALl
I have one windows based application in vb.net.
when i place one button named as "Report" on form,it appears perfectly at design time but when run this application,i have not seen "Report" button on my
form.
what happened excetly?
pls help me
Thanks
monika
|
|
|
|
|
Check Visible property of button it has to be true, to be sure of it you may also set this property on Form load event.
-Ajay.
|
|
|
|
|
Hii Monika
Just check the button Location,Size,Visible property.
else delete the button and re add the new button.
May be it solve your problem
Thanx
Mitesh Khatri
|
|
|
|
|
Good Morning All
i have the Following App.Config file in VB2003 and a Windows Application.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<!-- User application and configured property settings go here.-->
<!-- Example: <add key="settingName" value="settingValue"/> -->
<add key="timer.Enabled" value="True" />
<add key="timer.Interval" value="1000" />
<connectionstring>
<add name ="Tshwane_Train"
connectionString = "login=sde;Password=topology;Database=Tshwane_Valuations_Train;
Server=SGIICORNETGS01"/>
</connectionstring>
</appSettings>
</configuration>
and am Accessing this Connction string from the Vb App, like this
Dim constr As String = Configuration.ConfigurationSettings.AppSettings("Tshwane_Train")
When i compile the Application, i get no Errors ,but but when i try to run the application, i mean the Part that will need to Connect to the Database i get the Following Error.
An unhandled exception of
type 'System.Configuration.ConfigurationException' occurred in system.dll<br />
Additional information: Unrecognized element
What is Wrong
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
You might try something like this:
connStr = My.Settings.ConnectionString
Works for me.
I don't speak Idiot - please talk slowly and clearly
|
|
|
|
|
hi man
Am i missing Something here, your My(.), intelisense does not recognise it, am creating a Windows Application. Are there any references that i missed ?
thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
At First i saw my e-mail with this Code from you
Public Sub initializeDataConnection()
Dim strConn As String
Dim settings As ConnectionStringSettings
settings = ConfigurationManager.ConnectionStrings _
(WindowsApplication1.My.MySettings.APPProdConnectionString")
If Not settings Is Nothing Then
strConn = settings.ConnectionString
cn = New SqlConnection(strConn)
End If
End Sub
and when i click to go to CodeProject, i see a Different Answer, did you change it?
let us look at the above code, i understand what you are doing and in the Following line where you declare like this
Dim settings As ConnectionStringSettings
The ConnectionStringSetting is not recognised, am using VS2003 and VB(Windows App) is this Applicable to it?
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Your app.config has a seperate section for connection strings. Have a google.
|
|
|
|